Skip to content

Commit

Permalink
clean static cache for new variable
Browse files Browse the repository at this point in the history
  • Loading branch information
nerrad committed Jul 22, 2022
1 parent 7f33d40 commit 5ffa617
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/experimental/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,22 @@ public static function get_merged_data( $origin = 'custom' ) {

return $result;
}

/**
* Cleans the cached data so it can be recalculated.
*
* @since 5.8.0
* @since 5.9.0 Added the `$user`, `$user_custom_post_type_id`,
* and `$i18n_schema` variables to reset.
* @since 6.1.0 Added the `$plugins` variables to reset.
*/
public static function clean_cached_data() {
static::$core = null;
static::$theme = null;
static::$user = null;
static::$user_custom_post_type_id = null;
static::$theme_has_support = null;
static::$i18n_schema = null;
static::$plugins = null;
}
}

0 comments on commit 5ffa617

Please sign in to comment.