Make WordPress Core


Ignore:
Timestamp:
10/08/2015 09:44:11 PM (9 years ago)
Author:
jeremyfelt
Message:

Make $blog_id explicitly global.

$blog_id is used in both single and multisite configurations as a global variable, though has never been explicitly marked as such in the global scope. This can cause confusion depending on how core is loaded.

Fixes #34217.

File:
1 edited

Legend:

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

    r34912 r34961  
    1212 *
    1313 * @since 3.0.0
     14 *
     15 * @global int $blog_id
    1416 */
    1517function wp_initial_constants() {
     
    2931    }
    3032
    31     /**
    32      * The $blog_id global, which you can change in the config allows you to create a simple
    33      * multiple blog installation using just one WordPress and changing $blog_id around.
    34      *
    35      * @global int $blog_id
    36      * @since 2.0.0
    37      */
    3833    if ( ! isset($blog_id) )
    3934        $blog_id = 1;
Note: See TracChangeset for help on using the changeset viewer.