Make WordPress Core


Ignore:
Timestamp:
08/31/2016 04:55:01 AM (8 years ago)
Author:
wonderboymusic
Message:

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

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/cache.php

    r38335 r38457  
    730730     *
    731731     * @since 2.0.8
    732      *
    733      * @global int $blog_id Global blog ID.
    734732     */
    735733    public function __construct() {
    736         global $blog_id;
    737 
    738734        $this->multisite = is_multisite();
    739         $this->blog_prefix =  $this->multisite ? $blog_id . ':' : '';
     735        $this->blog_prefix =  $this->multisite ? get_current_blog_id() . ':' : '';
    740736
    741737
Note: See TracChangeset for help on using the changeset viewer.