after_switch_theme – action

Fires on the first WP load after a theme switch if the old theme still exists. This action fires multiple times and the parameters differs according to the context, if the old theme exists or not. If the old theme is missing, the parameter will be the slug of the old theme.

Parameters

.
( 3.3.0 ) . .
( string ) $old_name Old theme name. . . .
$old_theme
( WP_Theme ) WP_Theme instance of the old theme. . . .
API Letters: ,,

Implementers