Multisite: use `get_current_site()` instead of `$GLOBALS['current_site']` (stop yelling!) in a few remaining spots.

See #37699.

Built from https://develop.svn.wordpress.org/trunk@38458


git-svn-id: http://core.svn.wordpress.org/trunk@38399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2016-08-31 05:04:29 +00:00
parent e5225324a2
commit cabb4a03c8
3 changed files with 6 additions and 5 deletions

View File

@ -28,7 +28,7 @@ function get_dashboard_blog() {
if ( $blog = get_site_option( 'dashboard_blog' ) )
return get_blog_details( $blog );
return get_blog_details( $GLOBALS['current_site']->blog_id );
return get_blog_details( get_current_site()->blog_id );
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38457';
$wp_version = '4.7-alpha-38458';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -336,14 +336,15 @@ function retrieve_password() {
$message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
if ( is_multisite() )
$blogname = $GLOBALS['current_site']->site_name;
else
if ( is_multisite() ) {
$blogname = get_current_site()->site_name;
} else {
/*
* The blogname option is escaped with esc_html on the way into the database
* in sanitize_option we want to reverse this for the plain text arena of emails.
*/
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
}
$title = sprintf( __('[%s] Password Reset'), $blogname );