diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index fb9f2befb9..efc678b4fb 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -567,6 +567,17 @@ function restore_current_blog() { return true; } +/** + * Determines if switch_to_blog() is in effect + * + * @since 3.5.0 + * + * @return bool True if switched, false otherwise. + */ +function is_ms_switched() { + return $GLOBALS['_wp_switched']; +} + /** * Check if a particular blog is archived. *