Welcome, visitor! Log in
 

WordPress hook directory
after_switch_theme

Description

Runs when the blog's theme is changed. Action function argument: name of the new theme. If used in a theme, it only works if the theme that adds action is the one being enabled. Can be used to run certain code when enabling a theme.

This description was scraped automatically from the WordPress filter reference or action reference. If it looks like this is the wrong description, please tell me so I can fix my code.

WordPress version history for after_switch_theme

This database has information for all major versions from WP 1.2.1 through 3.8.

Version File Line Type
3.3 wp-includes/theme.php 2007 View hook in source action
3.4 wp-includes/theme.php 1566 View hook in source action
3.4 wp-includes/theme.php 1568 View hook in source action
3.5 wp-includes/theme.php 1613 View hook in source action
3.5 wp-includes/theme.php 1615 View hook in source action
3.6 wp-includes/theme.php 1615 View hook in source action
3.6 wp-includes/theme.php 1617 View hook in source action
3.7 wp-includes/theme.php 1642 View hook in source action
3.7 wp-includes/theme.php 1644 View hook in source action
3.8 wp-includes/theme.php 1781 View hook in source action
3.8 wp-includes/theme.php 1784 View hook in source action

Related Hooks

We find related hooks using word stems. after_switch_theme has 3 significant word stem(s): after, switch, theme. Note that some of the hooks below may not appear in all versions of WP.