Make WordPress Core


Ignore:
Timestamp:
02/07/2012 06:35:29 PM (15 years ago)
Author:
ryan
Message:

Add an "Edit Site" submenu to the admin bar site menu when a super admin visits a blog dashboard. see #18188

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r19712 r19855  
    249249                ) );
    250250
    251         // We're on the front end, print a copy of the admin menu.
     251                if ( is_blog_admin() && is_multisite() && current_user_can( 'manage_sites' ) ) {
     252                        $wp_admin_bar->add_menu( array(
     253                                'parent' => 'site-name',
     254                                'id'     => 'edit-site',
     255                                'title'  => __( 'Edit Site' ),
     256                                'href'   => network_admin_url( 'site-info.php?id=' . get_current_blog_id() ),
     257                        ) );
     258                }
     259
    252260        } else {
    253                 // Add the dashboard item.
     261                // We're on the front end, link to the Dashboard.
    254262                $wp_admin_bar->add_menu( array(
    255263                        'parent' => 'site-name',
Note: See TracChangeset for help on using the changeset viewer.