Action hook 'after_switch_theme'

in WP Core File wp-includes/theme.php at line 3504

Description

Fires on the next WP load after the theme has been switched. The parameters differ according to whether the old theme exists or not. If the old theme is missing, the old name will instead be the slug of the old theme. See {@see 'switch_theme'}.

Occurrences

Filename Line Number
wp-includes/theme.php 3504
wp-includes/theme.php 3507

Parameters

Type Name Description
string $old_name Old theme name.
WP_Theme $old_theme WP_Theme instance of the old theme.

PHP Doc

/**
			 * Fires on the next WP load after the theme has been switched.
			 *
			 * The parameters differ according to whether the old theme exists or not.
			 * If the old theme is missing, the old name will instead be the slug
			 * of the old theme.
			 *
			 * See {@see 'switch_theme'}.
			 *
			 * @since 3.3.0
			 *
			 * @param string   $old_name  Old theme name.
			 * @param WP_Theme $old_theme WP_Theme instance of the old theme.
			 */