Skip to content

Commit 0bfa2d7

Browse files
committed
Multisite: Explicitly globalize global variables in ms-settings.php.
Explicitly globalize and document `$domain`, `$path`, `$site_id`, and `$public` in `ms-settings.php. Props csloisel, danielbachhuber. Fixes #39419. git-svn-id: https://develop.svn.wordpress.org/trunk@41875 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b040081 commit 0bfa2d7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/wp-includes/ms-settings.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,18 @@
1818
*
1919
* @global WP_Network $current_site The current network.
2020
* @global object $current_blog The current site.
21+
* @global string $domain Deprecated. The domain of the site found on load.
22+
* Use `get_site()->domain` instead.
23+
* @global string $path Deprecated. The path of the site found on load.
24+
* Use `get_site()->path` instead.
25+
* @global int $site_id Deprecated. The ID of the network found on load.
26+
* Use `get_current_network_id()` instead.
27+
* @global bool $public Deprecated. Whether the site found on load is public.
28+
* Use `get_site()->public` instead.
29+
*
2130
* @since 3.0.0
2231
*/
23-
global $current_site, $current_blog;
32+
global $current_site, $current_blog, $domain, $path, $site_id, $public;
2433

2534
/** WP_Network class */
2635
require_once( ABSPATH . WPINC . '/class-wp-network.php' );

0 commit comments

Comments
 (0)