ms_load_current_site_and_network( string $domain, string $path, bool $subdomain = false ): bool|string
- Since
- 4.6.0
- Source
wp-includes/ms-load.php:297
Description
Prior to 4.6.0, this was a procedural block in ms-settings.php. It was wrapped into a function to facilitate unit tests. It should not be used outside of core.
Usually, it's easier to query the site first, which then declares its network.
In limited situations, we either can or must find the network first.
If a network and site are found, a true response will be returned so that the request can continue.
If neither a network or site is found, false or a URL string will be returned so that either an error can be shown or a redirect can occur.
Compatibility
- WordPress
- since 4.6.0
- PHP
- 7.4–8.6-dev
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.
Parameters
$domainstring- The requested domain.
$pathstring- The requested path.
$subdomainbooloptional- Whether a subdomain (true) or subdirectory (false) configuration.
Default false.Default:false
Return value
bool|string- True if bootstrap successfully populated
$current_blogand$current_site.
False if bootstrap could not be properly completed.
Redirect URL if parts exist, but the request as a whole can not be fulfilled.
Performance profile
How much work a call to ms_load_current_site_and_network() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Light
- Scaling
- Constant
- Instructions
- 24–120
- Plugin surface
- 3 hooks
- Called by
- 0
Only touches the object cache, via wp_cache_get().
No loop in the body: the same number of instructions runs whatever you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 279.
Third-party callbacks on 'ms_network_not_found', 'ms_site_not_found', 'network_site_url' run inside this call, and their cost is not bounded by anything here.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- cacheobject cache
wp_cache_get()called directly - hookthird-party callbacks
do_action()called directly
What one call costs · 293 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost ms_load_current_site_and_network() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
| always | 24–26 | wp_cache_get(), do_action() |
empty($networks) | 24–26 | wp_cache_get(), get_networks() |
empty($current_site) | 30–40 | get_site_by_path(), ::WP_Network(), do_action() |
empty($current_site) | 30–32 | wp_cache_get(), ::WP_Network(), do_action() |
!empty($current_site) && !empty($current_blog) | 31–41 | get_site_by_path(), ::WP_Network() |
!empty($networks) | 33–35 | wp_cache_get(), get_networks(), do_action() |
!empty($current_site) | 34–51 | get_site_by_path(), ::WP_Network(), wp_installing() |
$path === false | 36–43 | wp_cache_get(), get_site_by_path(), do_action() |
!empty($current_site) && $path === false && !empty($current_blog) | 37–44 | wp_cache_get(), get_site_by_path() |
!empty($current_blog) | 38–48 | get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && empty($current_site) | 39–41 | wp_cache_get(), get_networks(), ::WP_Network(), do_action() |
!empty($current_site) && $path === false | 40–54 | wp_cache_get(), get_site_by_path(), wp_installing() |
281 further outcomes, up to 120 instructions
| always | 41–58 | get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
empty($current_site) | 41–46 | get_site_by_path(), ::WP_Network(), ::WP_Network(), do_action() |
!defined('DOMAIN_CURRENT_SITE') | 41 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), do_action() |
!empty($current_site) && !empty($current_blog) | 42–47 | get_site_by_path(), ::WP_Network(), ::WP_Network() |
$path !== false | 42–49 | wp_cache_get(), substr_count(), get_site_by_path(), do_action() |
$path === false | 42–49 | wp_cache_get(), ::WP_Network(), get_site_by_path(), do_action() |
!empty($current_site) && $path !== false && !empty($current_blog) | 43–50 | wp_cache_get(), substr_count(), get_site_by_path() |
$path === false && !empty($current_blog) | 43–50 | wp_cache_get(), ::WP_Network(), get_site_by_path() |
$path === false && !empty($current_blog) | 44–51 | wp_cache_get(), get_site_by_path(), get_main_site_id() |
!empty($current_site) | 45–57 | get_site_by_path(), ::WP_Network(), ::WP_Network(), wp_installing() |
!empty($networks) && $path === false | 45–52 | wp_cache_get(), get_networks(), get_site_by_path(), do_action() |
!empty($networks) && !empty($current_site) && $path === false && !empty($current_blog) | 46–53 | wp_cache_get(), get_networks(), get_site_by_path() |
!empty($current_site) && $path !== false | 46–60 | wp_cache_get(), substr_count(), get_site_by_path(), wp_installing() |
$path === false | 46–60 | wp_cache_get(), ::WP_Network(), get_site_by_path(), wp_installing() |
$path === false | 47–61 | wp_cache_get(), get_site_by_path(), wp_installing(), get_main_site_id() |
$path === false | 47–49 | wp_cache_get(), get_site_by_path(), ::WP_Network(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && empty($current_site) | 47 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), do_action() |
!empty($current_site) && $path === false && !empty($current_blog) | 48–50 | wp_cache_get(), get_site_by_path(), ::WP_Network() |
$path !== false | 48–55 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), do_action() |
!empty($current_blog) | 49–54 | get_site_by_path(), ::WP_Network(), ::WP_Network(), get_main_site_id() |
$path !== false && !empty($current_blog) | 49–56 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path() |
!empty($networks) && !empty($current_site) && $path === false | 49–63 | wp_cache_get(), get_networks(), get_site_by_path(), wp_installing() |
$path !== false && !empty($current_blog) | 50–57 | wp_cache_get(), substr_count(), get_site_by_path(), get_main_site_id() |
$path === false && !empty($current_blog) | 50–57 | wp_cache_get(), ::WP_Network(), get_site_by_path(), get_main_site_id() |
!empty($current_site) && $path === false | 51–60 | wp_cache_get(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($networks) && $path !== false | 51–58 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), do_action() |
!empty($networks) && $path === false | 51–58 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), do_action() |
!empty($networks) && !empty($current_site) && $path !== false && !empty($current_blog) | 52–59 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path() |
!empty($networks) && $path === false && !empty($current_blog) | 52–59 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path() |
| always | 52–64 | get_site_by_path(), ::WP_Network(), ::WP_Network(), wp_installing(), get_main_site_id() |
$path !== false | 52–66 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing() |
!empty($current_site) && defined('NOBLOGREDIRECT') | 53–66 | get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && $path === false && !empty($current_blog) | 53–60 | wp_cache_get(), get_networks(), get_site_by_path(), get_main_site_id() |
$path !== false | 53–67 | wp_cache_get(), substr_count(), get_site_by_path(), wp_installing(), get_main_site_id() |
$path !== false | 53–55 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), do_action() |
$path === false | 53–67 | wp_cache_get(), ::WP_Network(), get_site_by_path(), wp_installing(), get_main_site_id() |
$path === false | 53–55 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 53–58 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), do_action() |
!empty($current_site) && $path !== false && !empty($current_blog) | 54–56 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network() |
$path === false && !empty($current_blog) | 54–56 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network() |
!empty($current_site) | 54–68 | get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($current_site) && $path === false && !empty($current_blog) | 54–59 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path() |
$path === false && !empty($current_blog) | 55–57 | wp_cache_get(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && !empty($current_site) && $path !== false | 55–69 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), wp_installing() |
!empty($networks) && $path === false | 55–69 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), wp_installing() |
!empty($current_site) && empty($current_blog) && defined('NOBLOGREDIRECT') | 56–76 | get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
$path !== false && !empty($current_blog) | 56–63 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), get_main_site_id() |
!empty($networks) && $path === false | 56–70 | wp_cache_get(), get_networks(), get_site_by_path(), wp_installing(), get_main_site_id() |
!empty($networks) && $path === false | 56–58 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), do_action() |
!empty($networks) && !empty($current_site) && $path === false && !empty($current_blog) | 57–59 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network() |
!empty($current_site) && $path !== false | 57–66 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing() |
$path === false | 57–66 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($current_site) && empty($current_blog) | 57–78 | get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false | 57–64 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), do_action() |
!empty($current_site) && $path === false | 57–69 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), wp_installing() |
$path === false | 58–67 | wp_cache_get(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!empty($networks) && $path !== false && !empty($current_blog) | 58–65 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path() |
!empty($current_site) && $path === false && defined('NOBLOGREDIRECT') | 59–69 | wp_cache_get(), get_site_by_path(), is_ssl(), do_action() |
!empty($networks) && $path !== false && !empty($current_blog) | 59–66 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), get_main_site_id() |
!empty($networks) && $path === false && !empty($current_blog) | 59–66 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), get_main_site_id() |
$path !== false | 59–73 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), get_main_site_id() |
$path !== false | 59–61 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), do_action() |
$path !== false | 59–66 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 59–64 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), do_action() |
!empty($current_site) && $path === false | 60–71 | wp_cache_get(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
$path !== false && !empty($current_blog) | 60–62 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network() |
!empty($networks) && !empty($current_site) && $path === false | 60–69 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($current_site) && $path !== false && !empty($current_blog) | 60–67 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !empty($current_blog) | 60–65 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path() |
$path !== false && !empty($current_blog) | 61–63 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
$path === false && !empty($current_blog) | 61–63 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && $path !== false | 61–75 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing() |
$path === false && !empty($current_blog) | 61–66 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), get_main_site_id() |
!empty($current_site) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 62–79 | wp_cache_get(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($networks) && $path !== false | 62–76 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), wp_installing(), get_main_site_id() |
!empty($networks) && $path !== false | 62–64 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), do_action() |
!empty($networks) && $path === false | 62–76 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), wp_installing(), get_main_site_id() |
!empty($networks) && $path === false | 62–64 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), do_action() |
!empty($current_site) && !defined('NOBLOGREDIRECT') | 63–74 | get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path !== false && !empty($current_blog) | 63–65 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network() |
!empty($networks) && $path === false && !empty($current_blog) | 63–65 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network() |
!empty($current_site) && $path === false && empty($current_blog) | 63–81 | wp_cache_get(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
$path !== false | 63–72 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($current_site) && $path !== false | 63–77 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), wp_installing() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 63–75 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), wp_installing() |
!empty($current_site) && defined('NOBLOGREDIRECT') | 64–72 | get_site_by_path(), ::WP_Network(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && $path === false && !empty($current_blog) | 64–66 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
$path !== false | 64–73 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
$path === false | 64–73 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
$path === false | 64–76 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), wp_installing(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 64 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), do_action() |
!empty($current_site) && $path !== false && defined('NOBLOGREDIRECT') | 65–75 | wp_cache_get(), substr_count(), get_site_by_path(), is_ssl(), do_action() |
$path === false && defined('NOBLOGREDIRECT') | 65–75 | wp_cache_get(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action() |
!empty($current_site) | 65–74 | get_site_by_path(), ::WP_Network(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && !empty($current_blog) | 65–72 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && !empty($current_blog) | 65 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 65–70 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), do_action() |
!empty($current_site) && empty($current_blog) && !defined('NOBLOGREDIRECT') | 66–84 | get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false | 66–77 | wp_cache_get(), substr_count(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
$path === false | 66–77 | wp_cache_get(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path !== false | 66–75 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($networks) && $path === false | 66–75 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && !empty($current_blog) | 66–71 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path() |
!empty($current_site) && empty($current_blog) && defined('NOBLOGREDIRECT') | 67–82 | get_site_by_path(), ::WP_Network(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
$path !== false && !empty($current_blog) | 67–69 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && $path === false | 67–76 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
$path !== false && !empty($current_blog) | 67–74 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !empty($current_blog) | 67–72 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), get_main_site_id() |
!empty($networks) && !empty($current_site) && $path === false && defined('NOBLOGREDIRECT') | 68–78 | wp_cache_get(), get_networks(), get_site_by_path(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 68–85 | wp_cache_get(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
$path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 68–85 | wp_cache_get(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && empty($current_blog) | 68–84 | get_site_by_path(), ::WP_Network(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false | 68–82 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), get_main_site_id() |
!empty($networks) && $path !== false | 68–70 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false | 68–75 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($current_site) && $path === false && !defined('NOBLOGREDIRECT') | 69–77 | wp_cache_get(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path === false | 69–80 | wp_cache_get(), get_networks(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && !empty($current_blog) | 69–71 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network() |
!empty($current_site) && $path !== false && empty($current_blog) | 69–87 | wp_cache_get(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
$path === false && empty($current_blog) | 69–87 | wp_cache_get(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 69–81 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing() |
!empty($current_site) && $path === false && defined('NOBLOGREDIRECT') | 70–75 | wp_cache_get(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && $path !== false && !empty($current_blog) | 70–72 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && $path === false && !empty($current_blog) | 70–72 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
$path !== false | 70–79 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
$path !== false | 70–84 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), wp_installing(), get_main_site_id() |
$path !== false | 70–72 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 70–82 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), wp_installing(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 70 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), do_action() |
!empty($current_site) && $path === false | 71–77 | wp_cache_get(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
$path !== false && defined('NOBLOGREDIRECT') | 71–81 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action() |
!empty($networks) && !empty($current_site) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 71–88 | wp_cache_get(), get_networks(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && !empty($current_blog) | 71–73 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !empty($current_blog) | 71 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network() |
!empty($current_site) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 72–87 | wp_cache_get(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
$path !== false | 72–83 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path === false && empty($current_blog) | 72–90 | wp_cache_get(), get_networks(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false | 72–81 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !empty($current_blog) | 72 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($current_site) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 73–85 | wp_cache_get(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($networks) && $path !== false | 73–82 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!empty($networks) && $path === false | 73–82 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && !empty($current_blog) | 73–78 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), get_main_site_id() |
!empty($current_site) && !defined('NOBLOGREDIRECT') | 74–80 | get_site_by_path(), ::WP_Network(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path !== false && defined('NOBLOGREDIRECT') | 74–84 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), is_ssl(), do_action() |
!empty($networks) && $path === false && defined('NOBLOGREDIRECT') | 74–84 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action() |
!empty($current_site) && $path === false && empty($current_blog) | 74–87 | wp_cache_get(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
$path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 74–91 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false | 74–83 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 74–81 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing() |
!empty($current_site) && $path !== false && !defined('NOBLOGREDIRECT') | 75–83 | wp_cache_get(), substr_count(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
$path === false && !defined('NOBLOGREDIRECT') | 75–83 | wp_cache_get(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path !== false | 75–86 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path === false | 75–86 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
$path !== false && empty($current_blog) | 75–93 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 75–82 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!empty($current_site) && $path !== false && defined('NOBLOGREDIRECT') | 76–81 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
$path === false && defined('NOBLOGREDIRECT') | 76–81 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && $path !== false && !empty($current_blog) | 76–78 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($current_site) && $path === false && defined('NOBLOGREDIRECT') | 76–84 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 76–88 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 76 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), do_action() |
!empty($current_site) && empty($current_blog) && !defined('NOBLOGREDIRECT') | 77–90 | get_site_by_path(), ::WP_Network(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false | 77–83 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
$path === false | 77–83 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 77–94 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($networks) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 77–94 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path === false | 77–86 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && !empty($current_blog) | 77 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network() |
!empty($networks) && !empty($current_site) && $path === false && !defined('NOBLOGREDIRECT') | 78–86 | wp_cache_get(), get_networks(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 78–93 | wp_cache_get(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
$path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 78–93 | wp_cache_get(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path !== false && empty($current_blog) | 78–96 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path === false && empty($current_blog) | 78–96 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
$path !== false && !empty($current_blog) | 78–80 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !empty($current_blog) | 78 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && !empty($current_site) && $path === false && defined('NOBLOGREDIRECT') | 79–84 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 79–91 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
$path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 79–91 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($networks) && $path !== false | 79–88 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 79–94 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path === false && !defined('NOBLOGREDIRECT') | 80–83 | wp_cache_get(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path === false | 80–86 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && defined('NOBLOGREDIRECT') | 80–90 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && empty($current_blog) | 80–93 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
$path === false && empty($current_blog) | 80–93 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($current_site) && $path === false && empty($current_blog) | 80–96 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 80–87 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing() |
$path !== false && !defined('NOBLOGREDIRECT') | 81–89 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 81–96 | wp_cache_get(), get_networks(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path !== false | 81–92 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
$path !== false | 81–90 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 81–88 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
$path !== false && defined('NOBLOGREDIRECT') | 82–87 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && !empty($current_site) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 82–94 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && defined('NOBLOGREDIRECT') | 82–92 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && defined('NOBLOGREDIRECT') | 82–90 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action() |
!empty($current_site) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 83–93 | wp_cache_get(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
$path !== false | 83–89 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path === false && empty($current_blog) | 83–96 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 83–100 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false | 83–94 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 83–92 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path !== false && !defined('NOBLOGREDIRECT') | 84–92 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path === false && !defined('NOBLOGREDIRECT') | 84–92 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
$path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 84–99 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path !== false && empty($current_blog) | 84–102 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && !empty($current_blog) | 84 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), get_main_site_id() |
!empty($networks) && !empty($current_site) && $path !== false && defined('NOBLOGREDIRECT') | 85–90 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && $path === false && defined('NOBLOGREDIRECT') | 85–90 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
$path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 85–97 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 85–102 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 85–100 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && !defined('NOBLOGREDIRECT') | 86–89 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
$path === false && !defined('NOBLOGREDIRECT') | 86–89 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path !== false | 86–92 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path === false | 86–92 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($current_site) && $path === false && !defined('NOBLOGREDIRECT') | 86–92 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
$path !== false && empty($current_blog) | 86–99 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($current_site) && $path !== false && empty($current_blog) | 86–104 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && empty($current_blog) | 86–102 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 87–102 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 87–102 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && defined('NOBLOGREDIRECT') | 87–90 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 87–94 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), get_main_site_id() |
!empty($networks) && !empty($current_site) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 88–100 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($networks) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 88–100 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false | 88–92 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && defined('NOBLOGREDIRECT') | 88–96 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action() |
!empty($networks) && !empty($current_site) && $path === false && !defined('NOBLOGREDIRECT') | 89–92 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 89–99 | wp_cache_get(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
$path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 89–99 | wp_cache_get(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path !== false && empty($current_blog) | 89–102 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path === false && empty($current_blog) | 89–102 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 89–102 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 89–98 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && !defined('NOBLOGREDIRECT') | 90–98 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 90–100 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($networks) && $path !== false && defined('NOBLOGREDIRECT') | 91–96 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && empty($current_blog) | 91–102 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 91–106 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action() |
$path !== false && !defined('NOBLOGREDIRECT') | 92–95 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && !empty($current_site) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 92–102 | wp_cache_get(), get_networks(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path !== false | 92–98 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($current_site) && $path !== false && !defined('NOBLOGREDIRECT') | 92–100 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !defined('NOBLOGREDIRECT') | 92–98 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && empty($current_blog) | 92–108 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 93–108 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false && defined('NOBLOGREDIRECT') | 93–98 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && defined('NOBLOGREDIRECT') | 93–96 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!empty($networks) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 94–106 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false | 94–100 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path === false | 94–98 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path !== false && !defined('NOBLOGREDIRECT') | 95–98 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path === false && !defined('NOBLOGREDIRECT') | 95–98 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
$path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 95–105 | wp_cache_get(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path !== false && empty($current_blog) | 95–108 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($current_site) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 95–110 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 95–108 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 96–108 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && empty($current_blog) && defined('NOBLOGREDIRECT') | 96–106 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && !defined('NOBLOGREDIRECT') | 97–98 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false && empty($current_blog) | 97–110 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && empty($current_blog) | 97–108 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && !empty($current_site) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 98–108 | wp_cache_get(), get_networks(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($networks) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 98–108 | wp_cache_get(), get_networks(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && !defined('NOBLOGREDIRECT') | 98–104 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && defined('NOBLOGREDIRECT') | 99–102 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action() |
!defined('DOMAIN_CURRENT_SITE') && !empty($current_site) && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 100–108 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false | 100–104 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && !defined('NOBLOGREDIRECT') | 101–104 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 101–114 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && empty($current_blog) && defined('NOBLOGREDIRECT') | 102–112 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action() |
!empty($current_site) && $path !== false && !defined('NOBLOGREDIRECT') | 103–106 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && !defined('NOBLOGREDIRECT') | 103–104 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && empty($current_blog) | 103–114 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), strcasecmp() |
!empty($networks) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 104–114 | wp_cache_get(), get_networks(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!empty($current_site) && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 106–116 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path === false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 106–114 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && !defined('NOBLOGREDIRECT') | 109–110 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), is_ssl(), do_action(), apply_filters() |
!defined('DOMAIN_CURRENT_SITE') && $path !== false && empty($current_blog) && !defined('NOBLOGREDIRECT') | 112–120 | wp_cache_get(), get_networks(), array_shift(), wp_cache_add(), ::WP_Network(), substr_count(), get_site_by_path(), ::WP_Network(), wp_installing(), is_ssl(), do_action(), apply_filters() |
This body has more branch combinations than are worth enumerating, so the table covers the outcomes found first rather than every one that exists.
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 279 | 24–120 | 32 | |
| 8.5 | 279 | 24–120 | 32 | |
| 8.4 | 279 | 24–120 | 32 | 6 fewer instructions than PHP 8.3 |
| 8.3 | 285 | 24–123 | 32 | |
| 8.2 | 285 | 24–123 | 32 | |
| 8.1 | 285 | 24–123 | 32 | 2 fewer instructions than PHP 7.4 |
| 7.4 | 287 | 24–123 | 32 |
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Hooks and filters fired · 4
4 hooks fire while ms_load_current_site_and_network() runs, in this order:
- do_action( ms_network_not_found )actionline 359 (+62 into the body)
Fires when a network cannot be found based on the requested domain and path.
- do_action( ms_network_not_found )actionline 387 (+90 into the body)
Fires when a network cannot be found based on the requested domain and path.
- do_action( ms_site_not_found )actionline 418 (+121 into the body)
Fires when a network can be determined but a site cannot.
Uses · 13
- get_site_by_path()Retrieves the closest matching site object by its domain and path.
- stripos()
- wp_cache_get()Retrieves the cache contents from the cache by key and group.
- get_networks()Retrieves a list of networks.
- wp_cache_add()Adds data to the cache, if the cache key doesn't already exist.
- do_action()Calls the callback functions that have been added to an action hook.
- wp_installing()Checks or sets whether WordPress is in "installation" mode.
- is_ssl()Determines if SSL is used.
- apply_filters()Calls the callback functions that have been added to a filter hook.
- get_main_site_id()Gets the main site ID.
- stdClass::__construct()
- WP_Network::get_by_path()Retrieves the closest matching network for a domain and path.
Show all 13
- WP_Network::get_instance()Retrieves a network from the database by its ID.
Source code
function ms_load_current_site_and_network( $domain, $path, $subdomain = false ) { global $current_site, $current_blog; // If the network is defined in wp-config.php, we can simply use that. if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) { $current_site = new stdClass(); $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1; $current_site->domain = DOMAIN_CURRENT_SITE; $current_site->path = PATH_CURRENT_SITE; if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) { $current_site->blog_id = BLOG_ID_CURRENT_SITE; } elseif ( defined( 'BLOGID_CURRENT_SITE' ) ) { // Deprecated. $current_site->blog_id = BLOGID_CURRENT_SITE; } if ( 0 === strcasecmp( $current_site->domain, $domain ) && 0 === strcasecmp( $current_site->path, $path ) ) { $current_blog = get_site_by_path( $domain, $path ); } elseif ( '/' !== $current_site->path && 0 === strcasecmp( $current_site->domain, $domain ) && 0 === stripos( $path, $current_site->path ) ) { /* * If the current network has a path and also matches the domain and path of the request, * we need to look for a site using the first path segment following the network's path. */ $current_blog = get_site_by_path( $domain, $path, 1 + count( explode( '/', trim( $current_site->path, '/' ) ) ) ); } else { // Otherwise, use the first path segment (as usual). $current_blog = get_site_by_path( $domain, $path, 1 ); } } elseif ( ! $subdomain ) { /* * A "subdomain" installation can be re-interpreted to mean "can support any domain". * If we're not dealing with one of these installations, then the important part is determining * the network first, because we need the network's path to identify any sites. */ $current_site = wp_cache_get( 'current_network', 'site-options' ); if ( ! $current_site ) { // Are there even two networks installed? $networks = get_networks( array( 'number' => 2 ) ); if ( count( $networks ) === 1 ) { $current_site = array_shift( $networks ); wp_cache_add( 'current_network', $current_site, 'site-options' ); } elseif ( empty( $networks ) ) { // A network not found hook should fire here. return false; } } if ( empty( $current_site ) ) { $current_site = WP_Network::get_by_path( $domain, $path, 1 ); } if ( empty( $current_site ) ) { /** * Fires when a network cannot be found based on the requested domain and path. * * At the time of this action, the only recourse is to redirect somewhere * and exit. If you want to declare a particular network, do so earlier. * * @since 4.4.0 * * @param string $domain The domain used to search for a network. * @param string $path The path used to search for a path. */ do_action( 'ms_network_not_found', $domain, $path ); return false; } elseif ( $path === $current_site->path ) { $current_blog = get_site_by_path( $domain, $path ); } else { // Search the network path + one more path segment (on top of the network path). $current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) ); } } else { // Find the site by the domain and at most the first path segment. $current_blog = get_site_by_path( $domain, $path, 1 ); if ( $current_blog ) { $current_site = WP_Network::get_instance( $current_blog->site_id ? $current_blog->site_id : 1 ); } else { // If you don't have a site with the same domain/path as a network, you're pretty screwed, but: $current_site = WP_Network::get_by_path( $domain, $path, 1 ); }Changelog
Introduced in 4.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/ms-load.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.