From cabb4a03c89a25de99a2ab8be70ce3c6fae9cb2c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 31 Aug 2016 05:04:29 +0000 Subject: [PATCH] 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 --- wp-includes/ms-deprecated.php | 2 +- wp-includes/version.php | 2 +- wp-login.php | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index 7e43fccd83..686efccc59 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 76f63f8ee4..f3e136a6e3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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. diff --git a/wp-login.php b/wp-login.php index 1764d46f0c..e80be00efd 100644 --- a/wp-login.php +++ b/wp-login.php @@ -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 );