WordPress at a glance
action is not described

switch_blog action-hook . WP 3.0.0

Fires when the blog is switched.

Usage

add_action( 'switch_blog', 'action_function_name_6815', 10, 2 );
function action_function_name_6815( $new_blog_id, $prev_blog_id ){
	// action...
}
$new_blog_id(int)
New blog ID.
$prev_blog_id(int)
Previous blog ID.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

switch_to_blog()
switch_blog
restore_current_blog()
switch_blog
wp-includes/ms-blogs.php 515
do_action( 'switch_blog', $new_blog_id, $prev_blog_id );
wp-includes/ms-blogs.php 547
do_action( 'switch_blog', $new_blog_id, $prev_blog_id );
wp-includes/ms-blogs.php 580
do_action( 'switch_blog', $new_blog_id, $prev_blog_id );
wp-includes/ms-blogs.php 614
do_action( 'switch_blog', $new_blog_id, $prev_blog_id );

Where the hook is used (in WP core)

wp-includes/class-wp-roles.php 359
remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 );
wp-includes/class-wp-roles.php 363
add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );
wp-includes/ms-default-filters.php 36
add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );
wp-includes/ms-site.php 946
remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 );
wp-includes/ms-site.php 956
add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );