Fires when the blog is switched.
$new_blog_idint$prev_blog_idint$contextstringwp-includes/ms-blogs.php:522switch_to_blog()wp-includes/ms-blogs.php:582switch_to_blog()wp-includes/ms-blogs.php:616restore_current_blog()wp-includes/ms-blogs.php:677restore_current_blog() * * @param int $new_blog_id New blog ID. * @param int $prev_blog_id Previous blog ID. * @param string $context Additional context. Accepts 'switch' when called from switch_to_blog() * or 'restore' when called from restore_current_blog(). */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' ); $GLOBALS['switched'] = true; return true; }Introduced in 5.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.