Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add function for cleaning cached data across instances of WP_Theme_JSON.
This is needed for testing.
  • Loading branch information
nerrad committed Jul 27, 2022
commit 10e627f99309ced3045c68c1461f1418df45181b
9 changes: 9 additions & 0 deletions lib/experimental/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@
*/
class WP_Theme_JSON_Gutenberg extends WP_Theme_JSON_6_1 {

/**
* Cleans cached data across class instances.
*
* @since 6.1.0
*/
public static function clean_cached_data() {
static::$blocks_metadata = null;
}

}