[wp-trac] [WordPress Trac] #34217: Explicitly globalize $blog_id, $public, and $site_id in ms-settings.php
WordPress Trac
noreply at wordpress.org
Thu Oct 8 18:20:07 UTC 2015
#34217: Explicitly globalize $blog_id, $public, and $site_id in ms-settings.php
-----------------------------+------------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4
Component: Bootstrap/Load | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
-----------------------------+------------------------
Changes (by jeremyfelt):
* keywords: needs-patch => has-patch
* version: => 3.0
* milestone: Future Release => 4.4
Comment:
`$blog_id` as an almost explicit global was introduced in [3011] and moved
to its current less explicit location in [12732]. I think we'll need to
mark it right before calling `wp_initial_constants()` in `wp-
settings.php`.
I don't remember ever reading this inline comment:
{{{
* The $blog_id global, which you can change in the config allows you to
create a simple
* multiple blog installation using just one WordPress and changing
$blog_id around.
}}}
[https://core.trac.wordpress.org/attachment/ticket/34217/34217.diff
34217.diff] addresses the `$blog_id` issue.
`$public` was merged over with MU. I'm not sure if it was ever used by
core, but it is no longer. I think we can get away with not explicitly
globalizing it and we should instead think about the consequences of
removing it. :)
`$site_id` was also merged over with MU. It is no longer used anywhere by
core either. We should think about the consequences of removing this as
well.
Related: we accidentally (maybe?) got rid of the `$sites` global in 3.9
and there were no explosions, just a desire to have a replacement via
`wp_get_networks()` in #29415.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34217#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list