Ticket #25158: 25158.6.diff
File 25158.6.diff, 1.7 KB (added by , 11 years ago) |
---|
-
src/wp-admin/admin-header.php
12 12 13 13 // In case admin-header.php is included in a function. 14 14 global $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; 16 16 17 17 // Catch plugins that include admin-header.php before admin.php completes. 18 18 if ( empty( $current_screen ) ) … … 22 22 $title = esc_html( strip_tags( $title ) ); 23 23 24 24 if ( 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 ) ); 26 26 elseif ( 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 ) ); 28 28 else 29 29 $admin_title = get_bloginfo( 'name' ); 30 30 -
src/wp-includes/functions.php
3343 3343 * @return bool True if $network_id is the main network, or if not running multisite. 3344 3344 */ 3345 3345 function is_main_network( $network_id = null ) { 3346 global $ current_site, $wpdb;3346 global $wpdb; 3347 3347 3348 3348 if ( ! is_multisite() ) 3349 3349 return true; 3350 3350 3351 $current_network_id = (int) $current_site->id;3351 $current_network_id = (int) get_current_site()->id; 3352 3352 3353 3353 if ( ! $network_id ) 3354 3354 $network_id = $current_network_id;