WordPress.org

Make WordPress Core

Ticket #25158: 25158.6.diff

File 25158.6.diff, 1.7 KB (added by SergeyBiryukov, 7 years ago)
  • src/wp-admin/admin-header.php

     
    1212
    1313// In case admin-header.php is included in a function.
    1414global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
    15         $current_site, $update_title, $total_update_count, $parent_file;
     15        $update_title, $total_update_count, $parent_file;
    1616
    1717// Catch plugins that include admin-header.php before admin.php completes.
    1818if ( empty( $current_screen ) )
     
    2222$title = esc_html( strip_tags( $title ) );
    2323
    2424if ( is_network_admin() )
    25         $admin_title = sprintf( __('Network Admin: %s'), esc_html( $current_site->site_name ) );
     25        $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
    2626elseif ( is_user_admin() )
    27         $admin_title = sprintf( __('Global Dashboard: %s'), esc_html( $current_site->site_name ) );
     27        $admin_title = sprintf( __( 'Global Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
    2828else
    2929        $admin_title = get_bloginfo( 'name' );
    3030
  • src/wp-includes/functions.php

     
    33433343 * @return bool True if $network_id is the main network, or if not running multisite.
    33443344 */
    33453345function is_main_network( $network_id = null ) {
    3346         global $current_site, $wpdb;
     3346        global $wpdb;
    33473347
    33483348        if ( ! is_multisite() )
    33493349                return true;
    33503350
    3351         $current_network_id = (int) $current_site->id;
     3351        $current_network_id = (int) get_current_site()->id;
    33523352
    33533353        if ( ! $network_id )
    33543354                $network_id = $current_network_id;