Skip to content

Commit 2078dda

Browse files
committed
Multisite: use get_current_site() instead of $GLOBALS['current_site'] (stop yelling!) in a few remaining spots.
See #37699. git-svn-id: https://develop.svn.wordpress.org/trunk@38458 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3605bd7 commit 2078dda

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/wp-includes/ms-deprecated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function get_dashboard_blog() {
2828
if ( $blog = get_site_option( 'dashboard_blog' ) )
2929
return get_blog_details( $blog );
3030

31-
return get_blog_details( $GLOBALS['current_site']->blog_id );
31+
return get_blog_details( get_current_site()->blog_id );
3232
}
3333

3434
/**

src/wp-login.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,15 @@ function retrieve_password() {
336336
$message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
337337
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
338338

339-
if ( is_multisite() )
340-
$blogname = $GLOBALS['current_site']->site_name;
341-
else
339+
if ( is_multisite() ) {
340+
$blogname = get_current_site()->site_name;
341+
} else {
342342
/*
343343
* The blogname option is escaped with esc_html on the way into the database
344344
* in sanitize_option we want to reverse this for the plain text arena of emails.
345345
*/
346346
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
347+
}
347348

348349
$title = sprintf( __('[%s] Password Reset'), $blogname );
349350

0 commit comments

Comments
 (0)