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_9379', 10, 2 );
function action_function_name_9379( $new_blog, $new_blog ){
	// action...
}
$new_blog(int)
New blog ID.
$new_blog(int)
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, $new_blog );
wp-includes/ms-blogs.php 548
do_action( 'switch_blog', $new_blog, $prev_blog_id );
wp-includes/ms-blogs.php 581
do_action( 'switch_blog', $blog, $blog );
wp-includes/ms-blogs.php 616
do_action( 'switch_blog', $blog, $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 );