mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
Use get_admin_url()
to get the correct My Sites URL without calling switch_to_blog()
directly.
props ocean90. see #31314. Built from https://develop.svn.wordpress.org/trunk@31448 git-svn-id: http://core.svn.wordpress.org/trunk@31429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e2f5a8094e
commit
7e71b1f827
@ -333,13 +333,11 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
|
||||
if ( count( $wp_admin_bar->user->blogs ) < 1 && ! is_super_admin() )
|
||||
return;
|
||||
|
||||
switch_to_blog( $wp_admin_bar->user->active_blog->blog_id );
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'my-sites',
|
||||
'title' => __( 'My Sites' ),
|
||||
'href' => admin_url( 'my-sites.php' ),
|
||||
'href' => get_admin_url( $wp_admin_bar->user->active_blog->blog_id, 'my-sites.php' ),
|
||||
) );
|
||||
restore_current_blog();
|
||||
|
||||
if ( is_super_admin() ) {
|
||||
$wp_admin_bar->add_group( array(
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31447';
|
||||
$wp_version = '4.2-alpha-31448';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user