Opened 13 years ago
Closed 13 years ago
#18990 closed defect (bug) (invalid)
My Sites menu appears for 1 item
Reported by: | kawauso | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Administration | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
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.
Steps to reproduce:
- Visit a site where the current user has capabilities, has capabilities on one other site and isn't a super admin
- The current site will be hidden from the My Sites admin bar menu, but will still appear.
Attachments (1)
Change History (5)
#2
@
13 years ago
- Keywords needs-patch added; has-patch removed
Further to discussion with nacin, patch doesn't address when the current blog isn't included in the My Sites menu (such as when the user is browsing a site where they have no permissions).
Version 0, edited 13 years ago
by
(next)
Note: See
TracTickets for help on using
tickets.
Check early on for the current site removal conditions