Skip to content

Commit

Permalink
Clean theme data when switching themes in the customizer (#34540)
Browse files Browse the repository at this point in the history
* Clean theme data when switching themes in the customizer

* Hook into setup_theme instead of switch_theme

* Hook into switch_theme & start_previewing_theme
  • Loading branch information
oandregal authored Sep 14, 2021
1 parent 7f13c37 commit 4fc4a03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,3 +531,4 @@ public static function clean_cached_data() {
}

add_action( 'switch_theme', array( 'WP_Theme_JSON_Resolver_Gutenberg', 'clean_cached_data' ) );
add_action( 'start_previewing_theme', array( 'WP_Theme_JSON_Resolver_Gutenberg', 'clean_cached_data' ) );

0 comments on commit 4fc4a03

Please sign in to comment.