Changeset 39492
- Timestamp:
- 12/04/2016 09:20:44 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/admin-bar.php
r38814 r39492 302 302 303 303 // Show only when the user is a member of this site, or they're a super admin. 304 if ( ! is_user_member_of_blog() && ! is_super_admin() ) 305 return; 304 if ( ! is_user_member_of_blog() && ! current_user_can( 'manage_network' ) ) { 305 return; 306 } 306 307 307 308 $blogname = get_bloginfo('name'); … … 416 417 417 418 // Show only when the user has at least one site, or they're a super admin. 418 if ( count( $wp_admin_bar->user->blogs ) < 1 && ! is_super_admin() ) 419 return; 419 if ( count( $wp_admin_bar->user->blogs ) < 1 && ! current_user_can( 'manage_network' ) ) { 420 return; 421 } 420 422 421 423 if ( $wp_admin_bar->user->active_blog ) { … … 431 433 ) ); 432 434 433 if ( is_super_admin() ) {435 if ( current_user_can( 'manage_network' ) ) { 434 436 $wp_admin_bar->add_group( array( 435 437 'parent' => 'my-sites', … … 487 489 'id' => 'my-sites-list', 488 490 'meta' => array( 489 'class' => is_super_admin() ? 'ab-sub-secondary' : '',491 'class' => current_user_can( 'manage_network' ) ? 'ab-sub-secondary' : '', 490 492 ), 491 493 ) );
Note: See TracChangeset
for help on using the changeset viewer.