Add an "Edit Site" submenu to the admin bar site menu when a super admin visits a blog dashboard. see #18188
git-svn-id: http://svn.automattic.com/wordpress/trunk@19855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
afb70b3f36
commit
391fd02047
|
@ -248,9 +248,17 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
|
|||
'href' => home_url( '/' ),
|
||||
) );
|
||||
|
||||
// We're on the front end, print a copy of the admin menu.
|
||||
if ( is_blog_admin() && is_multisite() && current_user_can( 'manage_sites' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'site-name',
|
||||
'id' => 'edit-site',
|
||||
'title' => __( 'Edit Site' ),
|
||||
'href' => network_admin_url( 'site-info.php?id=' . get_current_blog_id() ),
|
||||
) );
|
||||
}
|
||||
|
||||
} else {
|
||||
// Add the dashboard item.
|
||||
// We're on the front end, link to the Dashboard.
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'site-name',
|
||||
'id' => 'dashboard',
|
||||
|
|
Loading…
Reference in New Issue