do_action( 'switch_theme', string $new_name, WP_Theme $new_theme, WP_Theme $old_theme )

Fires after the theme is switched.


Parameters

$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.


Source

File: wp-includes/theme.php

View on GitHub



Changelog

Changelog
Version Description
WP-4.5.0 Introduced the $old_theme parameter.
WP-1.5.0 Introduced.