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

See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2016-08-31 04:55:01 +00:00
parent 84c2742175
commit 3605bd7633
8 changed files with 37 additions and 41 deletions
+1 -5
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() . ':' : '';
/**