WordPress at a glance
action is not described

switch_theme action-hook . WP 1.5.0

Fires after the theme is switched.

Usage

add_action( 'switch_theme', 'action_function_name_6751', 10, 3 );
function action_function_name_6751( $new_name, $new_theme, $old_theme ){
	// action...
}
$new_name(string)
Name of the new theme.
$new_theme(WP_Theme)
WP_Theme instance of the new theme.
$old_theme(WP_Theme)
WP_Theme instance of the old theme.

Notes

  • Since 4.5.0 Introduced the $old_theme parameter.

Where the hook is called

switch_theme()
switch_theme
wp-includes/theme.php 753
do_action( 'switch_theme', $new_name, $new_theme, $old_theme );

Where the hook is used (in WP core)

Does not used.