Customizing the special multisite dashboards

Edit (9/8/2011): This used to global $wp_meta_boxes and then unset() things from the array. NO MORE. Now we’ll do it the WordPress Way™ with remove_meta_box().

There are plenty of resources out there on customizing the usual WordPress Dashboard widgets, but not a whole lot (or maybe even anything beyond Xref) on the two additional screens WordPress multisite introduces: the Network Admin screen, available to superadmins, and the Global Dashboard screen, which is seen by users who have an account but are not assigned to a site or sites*. The hooks for these screens are wp_network_dashboard_setup and wp_user_dashboard_setup, respectively.

To clear out the Network Admin Dashboard (remove or comment out the lines for ones you do want to keep):

add_action('wp_network_dashboard_setup', 'hhs_remove_network_dashboard_widgets' );
function hhs_remove_network_dashboard_widgets() {
 	remove_meta_box ( 'network_dashboard_right_now', 'dashboard-network', 'normal' ); // Right Now
 	remove_meta_box ( 'dashboard_plugins', 'dashboard-network', 'normal' ); // Plugins
 	remove_meta_box ( 'dashboard_primary', 'dashboard-network', 'side' ); // WordPress Blog
 	remove_meta_box ( 'dashboard_secondary', 'dashboard-network', 'side' ); // Other WordPress News

To clear out the Global Dashboard:

add_action('wp_user_dashboard_setup', 'hhs_remove_user_dashboard_widgets' );
function hhs_remove_user_dashboard_widgets() {
 	remove_meta_box ( 'dashboard_primary', 'dashboard-user', 'normal' ); //WordPress Blog
 	remove_meta_box ( 'dashboard_secondary', 'dashboard-user', 'normal' ); //Other WordPress News

* In case you’re wondering how a user ends up logged in but not belonging to a site: sometimes you might bulk add users, especially when using another authentication system, or you might have materials available to anybody who’s logged into the network but doesn’t necessarily have to belong to a site. I’ve got a custom dashboard widget (using the same wp_user_dashboard_setup hook) for Eastman’s Global Dashboard to hopefully un-confuse users (yes, the ghost of George Eastman is logged in).

Eastman Global Dashboard Widget

Customizing the special multisite dashboards