StarComp Technology Blog

0

WordPress Function to WordPress Profiling tools

WordPress Profiling tools I like to add profiling tools in a separate file, which I then include from functions.php when needed: <?php if ( !defined(‘SAVEQUERIES’) && isset($_GET[‘debug’]) && $_GET[‘debug’] == ‘sql’ ) define(‘SAVEQUERIES’, true);...

0

WordPress Function to Customize the Dashboard

Customize the Dashboard add_action(‘wp_dashboard_setup’, ‘my_custom_dashboard_widgets’); function my_custom_dashboard_widgets() { global $wp_meta_boxes; Remove these dashboard widgets… unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_plugins’]); unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]); unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]); Add a custom widget called ‘Help and Support’ wp_add_dashboard_widget(‘custom_help_widget’, ‘Help and Support’, ‘custom_dashboard_help’); } This is the...