Ticket #19122: 19122.3.diff
File 19122.3.diff, 1.6 KB (added by , 13 years ago) |
---|
-
wp-includes/admin-bar.php
210 210 function wp_admin_bar_site_menu( $wp_admin_bar ) { 211 211 global $current_site; 212 212 213 if ( ! is_user_logged_in() ) 213 // Show if the user is logged in, and they're a member of this site or are a super admin. 214 if ( ! is_user_logged_in() || ! is_user_member_of_blog( 0, get_current_blog_id() ) && ! is_super_admin() ) 214 215 return; 215 216 216 217 $blogname = get_bloginfo('name'); … … 272 273 if ( ! is_user_logged_in() || ! is_multisite() ) 273 274 return; 274 275 275 // Show only when there are more than two items in the menu.276 if ( count( $wp_admin_bar->user->blogs ) < =1 && ! is_super_admin() )276 // Show when the user has at least 1 site, or they're a super admin. 277 if ( count( $wp_admin_bar->user->blogs ) < 1 && ! is_super_admin() ) 277 278 return; 278 279 279 280 $wp_admin_bar->add_menu( array( … … 331 332 $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 332 333 333 334 foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 334 // Skip the current blog (unless we're in the network/user admin).335 if ( $blog->userblog_id == get_current_blog_id() && ! is_network_admin() && ! is_user_admin() ) {336 continue;337 }338 339 335 // @todo Replace with some favicon lookup. 340 336 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />'; 341 337 $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>';