Permalink
Browse files

Add an "Edit Site" submenu to the admin bar site menu when a super ad…

…min visits a blog dashboard. see #18188

git-svn-id: http://svn.automattic.com/wordpress/trunk@19855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent afb70b3 commit 391fd02047d3e8265d67cd79aad0a906587cc27c ryan committed Feb 7, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 wp-includes/admin-bar.php
View
@@ -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',

0 comments on commit 391fd02

Please sign in to comment.