A WordPress-centric search engine for devs and theme authors



switch_theme ›

Since4.5.0
Deprecatedn/a
do_action( 'switch_theme', $new_name, $new_theme, $old_theme )
Parameters: (3)
  • (string) $new_name Name of the new theme.
    Required: Yes
  • (WP_Theme) $new_theme WP_Theme instance of the new theme.
    Required: Yes
  • (WP_Theme) $old_theme WP_Theme instance of the old theme.
    Required: Yes
Defined at:
Codex:

Fires after the theme is switched.





Source

do_action( 'switch_theme', $new_name, $new_theme, $old_theme );