WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/13/2013 03:22:48 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Use get_current_site() instead of the $current_site global when possible.

props jeremyfelt.
fixes #25158.

File:
1 edited

Legend:

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

    r26072 r26120  
    244244 */
    245245function wp_admin_bar_site_menu( $wp_admin_bar ) {
    246     global $current_site;
    247 
    248246    // Don't show for logged out users.
    249247    if ( ! is_user_logged_in() )
     
    260258
    261259    if ( is_network_admin() ) {
    262         $blogname = sprintf( __('Network Admin: %s'), esc_html( $current_site->site_name ) );
     260        $blogname = sprintf( __('Network Admin: %s'), esc_html( get_current_site()->site_name ) );
    263261    } elseif ( is_user_admin() ) {
    264         $blogname = sprintf( __('Global Dashboard: %s'), esc_html( $current_site->site_name ) );
     262        $blogname = sprintf( __('Global Dashboard: %s'), esc_html( get_current_site()->site_name ) );
    265263    }
    266264
Note: See TracChangeset for help on using the changeset viewer.