ms_is_switched()WP 3.5.0

Determines if switch_to_blog() is in effect.

No Hooks.

Return

true|false. True if switched, false otherwise.

Usage

ms_is_switched();

Notes

  • Global. Array. $_wp_switched_stack

Changelog

Since 3.5.0 Introduced.

ms_is_switched() code WP 6.5.4

function ms_is_switched() {
	return ! empty( $GLOBALS['_wp_switched_stack'] );
}