Created
May 10, 2013 04:48
-
-
Save erikccoder/5552441 to your computer and use it in GitHub Desktop.
wordpress remove widget from dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HIDING UNWANTED WORDPRESS DASHBOARD WIDGETS | |
add_action('wp_dashboard_setup', 'wpc_dashboard_widgets'); | |
function wpc_dashboard_widgets() { | |
global $wp_meta_boxes; | |
// Today widget | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); | |
// Last comments | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); | |
// Incoming links | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); | |
// Plugins | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment