We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d718931 commit ad18c94Copy full SHA for ad18c94
1 file changed
src/wp-includes/theme.php
@@ -877,6 +877,12 @@ function switch_theme( $stylesheet ) {
877
$new_theme->delete_pattern_cache();
878
$old_theme->delete_pattern_cache();
879
880
+ // Clear template content caches.
881
+ delete_transient( 'wp_theme_template_contents_' . $new_theme->get_stylesheet() );
882
+ delete_transient( 'wp_theme_template_contents_' . $new_theme->get_template() );
883
+ delete_transient( 'wp_theme_template_contents_' . $old_theme->get_stylesheet() );
884
+ delete_transient( 'wp_theme_template_contents_' . $old_theme->get_template() );
885
+
886
/**
887
* Fires after the theme is switched.
888
*
0 commit comments