From 50f062f711caf04dec62693c4460018ee04e9b6a Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Fri, 16 Sep 2011 07:18:05 +0000 Subject: [PATCH] Show correct blogs in the admin bar sites menu. see #18197. git-svn-id: https://develop.svn.wordpress.org/trunk@18685 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/admin-bar.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 485802aa3c..7e4dc96917 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -193,9 +193,10 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) { $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { - // Skip the current blog. - if ( $blog->userblog_id == $wp_admin_bar->user->active_blog->blog_id ) + // Skip the current blog (unless we're in the network/user admin). + if ( $blog->userblog_id == get_current_blog_id() && ! is_network_admin() && ! is_user_admin() ) { continue; + } // @todo Replace with some favicon lookup. //$blavatar = 'Blavatar';