ms_is_switched

The timeline below displays how wordpress function ms_is_switched has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Determines if switch_to_blog() is in effect.
 *
 * @since 3.5.0
 *
 * @global array $_wp_switched_stack
 *
 * @return bool True if switched, false otherwise.
 */
function ms_is_switched()
{
    return !empty($GLOBALS['_wp_switched_stack']);
}

WordPress Version: 4.3

/**
 * Determines if switch_to_blog() is in effect
 *
 * @since 3.5.0
 *
 * @global array $_wp_switched_stack
 *
 * @return bool True if switched, false otherwise.
 */
function ms_is_switched()
{
    return !empty($GLOBALS['_wp_switched_stack']);
}

WordPress Version: 3.7

/**
 * Determines if switch_to_blog() is in effect
 *
 * @since 3.5.0
 *
 * @return bool True if switched, false otherwise.
 */
function ms_is_switched()
{
    return !empty($GLOBALS['_wp_switched_stack']);
}