[wp-trac] [WordPress Trac] #18990: My Sites menu appears for 1 item

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 18 20:27:32 UTC 2011


#18990: My Sites menu appears for 1 item
----------------------------+-----------------------------
 Reporter:  kawauso         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.3
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------------
 In `wp_admin_bar_my_sites_menu()`, there's the following:

 {{{
         // Show only when there are more than two items in the menu.
         if ( count( $wp_admin_bar->user->blogs ) <= 1 && !
 is_super_admin() )
                 return;
 }}}

 However, it also then skips the current blog item in certain
 circumstances:

 {{{
                 // 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;
                 }
 }}}

 Which throws the count out of the window.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18990>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list