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

Fires after the theme is switched.

25 related hooks found for: switch_theme

Top ↑

Related terms found for this post

wp-parser-related-wordsswitch, theme, theme-php, themes, wp-includes
wp-parser-packageTheme, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • switch
  • theme
  • Theme
  • theme-php
  • themes
  • wp-includes
  • wp-includes/theme.php

Top ↑

Description Description

Top ↑

Parameters Parameters


(string) Name of the new theme.


(WP_Theme) WP_Theme instance of the new theme.


(WP_Theme) WP_Theme instance of the old theme.

Top ↑

Source Source

File: wp-includes/theme.php

View on Trac

Top ↑

Changelog Changelog

Version Description
4.5.0 Introduced the $old_theme parameter.
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.