From c22bf34978efb6a0828878d48d222a8fb8651c64 Mon Sep 17 00:00:00 2001 From: PeteMall Date: Thu, 9 Dec 2010 16:55:09 +0000 Subject: [PATCH] Kill blog specific menus from admin-bar in net admin. Fixes #15754 git-svn-id: http://svn.automattic.com/wordpress/trunk@16842 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-admin-bar.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index b0032e30d3..e38692aed8 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -178,13 +178,16 @@ class WP_Admin_Bar { add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 20 ); add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 30 ); add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 40 ); - add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 50 ); - add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 ); - add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 70 ); - add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 80 ); add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 ); - - do_action('add_admin_bar_menus'); + add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 80 ); + + if ( !is_network_admin() && !is_user_admin() ) { + add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 50 ); + add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 ); + add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 70 ); + } + + do_action( 'add_admin_bar_menus' ); } function remove_node( $id, &$menu ) {