mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Show correct blogs in the admin bar sites menu. see #18197.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9229f1f7ed
commit
5a7a91af5f
@ -193,9 +193,10 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
|
|||||||
$blue_wp_logo_url = includes_url('images/wpmini-blue.png');
|
$blue_wp_logo_url = includes_url('images/wpmini-blue.png');
|
||||||
|
|
||||||
foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
|
foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
|
||||||
// Skip the current blog.
|
// Skip the current blog (unless we're in the network/user admin).
|
||||||
if ( $blog->userblog_id == $wp_admin_bar->user->active_blog->blog_id )
|
if ( $blog->userblog_id == get_current_blog_id() && ! is_network_admin() && ! is_user_admin() ) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// @todo Replace with some favicon lookup.
|
// @todo Replace with some favicon lookup.
|
||||||
//$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />';
|
//$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />';
|
||||||
|
Loading…
Reference in New Issue
Block a user