StarComp Technology Blog


WordPress Function to Load jQuery from the Google CDN

Tested on: WordPress 3.0.1 // even more smart jquery inclusion 🙂 add_action( ‘init’, ‘jquery_register’ ); // register from google and for footer function jquery_register() { if ( !is_admin() ) { wp_deregister_script( ‘jquery’ ); wp_register_script(...


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);...


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...