Welcome, visitor! Log in
 

WordPress hook directory
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 disabled.

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 switch_theme

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

Version File Line Type
1.5.2 wp-admin/admin-functions.php 602 View hook in source action
1.5.2 wp-admin/admin-functions.php 609 View hook in source action
1.5.2 wp-admin/themes.php 16 View hook in source action
2.0 wp-admin/admin-functions.php 1126 View hook in source action
2.0 wp-admin/admin-functions.php 1133 View hook in source action
2.0 wp-admin/themes.php 14 View hook in source action
2.0.11 wp-admin/admin-functions.php 1187 View hook in source action
2.0.11 wp-admin/admin-functions.php 1194 View hook in source action
2.0.11 wp-admin/themes.php 14 View hook in source action
2.1 wp-admin/themes.php 14 View hook in source action
2.1 wp-includes/theme.php 423 View hook in source action
2.1 wp-includes/theme.php 430 View hook in source action
2.2 wp-admin/themes.php 14 View hook in source action
2.2 wp-includes/theme.php 425 View hook in source action
2.2 wp-includes/theme.php 432 View hook in source action
2.3 wp-admin/themes.php 14 View hook in source action
2.3 wp-includes/theme.php 458 View hook in source action
2.3 wp-includes/theme.php 465 View hook in source action
2.5 wp-includes/theme.php 487 View hook in source action
2.6 wp-includes/theme.php 529 View hook in source action
2.7 wp-includes/theme.php 928 View hook in source action
2.8 wp-includes/theme.php 952 View hook in source action
2.9 wp-includes/theme.php 1129 View hook in source action
3.0 wp-includes/theme.php 1221 View hook in source action
3.1 wp-includes/theme.php 1261 View hook in source action
3.2 wp-includes/theme.php 1263 View hook in source action
3.3 wp-includes/theme.php 1274 View hook in source action
3.4 wp-includes/theme.php 675 View hook in source action
3.5 wp-includes/theme.php 700 View hook in source action
3.6 wp-includes/theme.php 700 View hook in source action
3.7 wp-includes/theme.php 709 View hook in source action
3.8 wp-includes/theme.php 799 View hook in source action

Related Hooks

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