WP_Theme_JSON_Resolver::clean_cached_data()

In this article

Cleans the cached data so it can be recalculated.

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;
}

Changelog

VersionDescription
6.1.0Added the $blocks and $blocks_cache variables to reset.
5.9.0Added the $user, $user_custom_post_type_id, and $i18n_schema variables to reset.
5.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.