Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.

See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2016-08-31 04:55:54 +00:00
parent 049c36d11f
commit e5225324a2
9 changed files with 38 additions and 42 deletions

View File

@@ -729,14 +729,10 @@ class WP_Object_Cache {
* Sets up object properties; PHP 5 style constructor.
*
* @since 2.0.8
*
* @global int $blog_id Global blog ID.
*/
public function __construct() {
global $blog_id;
$this->multisite = is_multisite();
$this->blog_prefix = $this->multisite ? $blog_id . ':' : '';
$this->blog_prefix = $this->multisite ? get_current_blog_id() . ':' : '';
/**