ms_is_switched() WordPress Function
The ms_is_switched() function is used to check if a WordPress site is in a switched state. This function will return true if the site is switched, and false otherwise. This function is useful for plugin and theme developers who need to know if a site is switched.
ms_is_switched() #
Determines if switch_to_blog() is in effect
Return
(bool) True if switched, false otherwise.
Source
File: wp-includes/ms-blogs.php
function ms_is_switched() { return ! empty( $GLOBALS['_wp_switched_stack'] ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |