Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

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

Version File Line Type
1.5.2 wp-admin/admin-functions.php 602 View in context action
1.5.2 wp-admin/admin-functions.php 609 View in context action
1.5.2 wp-admin/themes.php 16 View in context action
2.0 wp-admin/admin-functions.php 1126 View in context action
2.0 wp-admin/admin-functions.php 1133 View in context action
2.0 wp-admin/themes.php 14 View in context action
2.0.11 wp-admin/admin-functions.php 1187 View in context action
2.0.11 wp-admin/admin-functions.php 1194 View in context action
2.0.11 wp-admin/themes.php 14 View in context action
2.1 wp-admin/themes.php 14 View in context action
2.1 wp-includes/theme.php 423 View in context action
2.1 wp-includes/theme.php 430 View in context action
2.2 wp-admin/themes.php 14 View in context action
2.2 wp-includes/theme.php 425 View in context action
2.2 wp-includes/theme.php 432 View in context action
2.3 wp-admin/themes.php 14 View in context action
2.3 wp-includes/theme.php 458 View in context action
2.3 wp-includes/theme.php 465 View in context action
2.5 wp-includes/theme.php 487 View in context action
2.6 wp-includes/theme.php 529 View in context action
2.7 wp-includes/theme.php 928 View in context action
2.8 wp-includes/theme.php 952 View in context action
2.9 wp-includes/theme.php 1129 View in context action
3.0 wp-includes/theme.php 1221 View in context action
3.1 wp-includes/theme.php 1261 View in context action
3.2 wp-includes/theme.php 1263 View in context action
3.3 wp-includes/theme.php 1274 View in context action
3.4 wp-includes/theme.php 675 View in context action
3.5 wp-includes/theme.php 700 View in context action
3.6 wp-includes/theme.php 700 View in context action
3.7 wp-includes/theme.php 709 View in context action
3.8 wp-includes/theme.php 799 View in context action
3.9 wp-includes/theme.php 817 View in context action
4.0 wp-includes/theme.php 825 View in context action
4.1 wp-includes/theme.php 824 View in context action
4.2 wp-includes/theme.php 824 View in context action
4.3 wp-includes/theme.php 740 View in context action
4.4 wp-includes/theme.php 750 View in context action
4.5 wp-includes/theme.php 753 View in context action
4.6 wp-includes/theme.php 754 View in context action
4.7 wp-includes/theme.php 754 View in context action
4.8 wp-includes/theme.php 754 View in context action
4.9 wp-includes/theme.php 752 View in context action
5.0 wp-includes/theme.php 753 View in context action
5.1 wp-includes/theme.php 792 View in context action
5.2 wp-includes/theme.php 798 View in context action
5.3 wp-includes/theme.php 815 View in context action
5.4 wp-includes/theme.php 818 View in context action
5.5 wp-includes/theme.php 829 View in context action
5.6 wp-includes/theme.php 829 View in context action
5.7 wp-includes/theme.php 829 View in context action
5.8 wp-includes/theme.php 829 View in context action
5.9 wp-includes/theme.php 829 View in context action
6.0 wp-includes/theme.php 829 View in context action
6.1 wp-includes/theme.php 829 View in context action
6.2 wp-includes/theme.php 835 View in context 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.