I’m trying to clean up the Admin Dashboard widgets so that only the administrator level users can see the various meta boxes, but no matter what i’ve tried the Broken Link Checker widget will not go away (see example code below).
I’m using WordPress 3.1 MultiSite Network and working with this code in the MU plugins folder … not sure that matters … i’ve also tried Adminimize plugin but that did not work for me on the widget either.
/* Turn off Dashboard Widgets */
if( is_admin() )
add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
unset($wp_meta_boxes['dashboard']['normal']['core']['blc_dashboard_widget']);
}
Thanks in advance for any pointers … cordially,
Chuck Scott