WP_Theme_JSON_Resolver::clean_cached_data()
- Since
- 5.8.0, 5.9.0, 6.1.0
- Source
wp-includes/class-wp-theme-json-resolver.php:735
Cleans the cached data so it can be recalculated.
Used by · 1
- wp_clean_theme_json_cache()Cleans the caches under the theme_json group.
Source
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; }History
Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
6.1.0
Added the
$blocks and $blocks_cache variables to reset.from the docblock5.9.0
Added the
$user, $user_custom_post_type_id, and $i18n_schema variables to reset.from the docblock5.8.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, from
src/wp-includes/class-wp-theme-json-resolver.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.