WP_Theme_JSON_Resolver::clean_cached_data
Cleans the cached data so it can be recalculated.
Method of the class: WP_Theme_JSON_Resolver{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WP_Theme_JSON_Resolver::clean_cached_data();
Changelog
| Since 5.8.0 | Introduced. |
| Since 5.9.0 | Added the $user, $user_custom_post_type_id, and $i18n_schema variables to reset. |
| Since 6.1.0 | Added the $blocks and $blocks_cache variables to reset. |
WP_Theme_JSON_Resolver::clean_cached_data() WP Theme JSON Resolver::clean cached data code WP 6.9
public static function clean_cached_data() {
static::$core = null;
static::$blocks = null;
static::$blocks_cache = array(
'core' => array(),
'blocks' => array(),
'theme' => array(),
'user' => array(),
);
static::$theme = null;
static::$user = null;
static::$user_custom_post_type_id = null;
static::$i18n_schema = null;
}