Last active
August 29, 2015 13:56
-
-
Save jimmitchell/8939880 to your computer and use it in GitHub Desktop.
Disable Default WordPress Dashboard Widgets
This file contains hidden or 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
/* | |
Disable Default Dashboard Widgets | |
@ http://digwp.com/2014/02/disable-default-dashboard-widgets/ | |
*/ | |
function disable_default_dashboard_widgets() { | |
global $wp_meta_boxes; | |
// wp.. | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); | |
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']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); | |
// bbpress.. | |
unset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); | |
} | |
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets', 999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment