WP_Theme_JSON_Resolver::clean_cached_data()public staticWP 5.8.0

Cleans the cached data so it can be recalculated.

Метод класса: WP_Theme_JSON_Resolver{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$result = WP_Theme_JSON_Resolver::clean_cached_data();

Список изменений

С версии 5.8.0 Введена.
С версии 5.9.0 Added the $user, $user_custom_post_type_id, and $i18n_schema variables to reset.
С версии 6.1.0 Added the $blocks and $blocks_cache variables to reset.

Код WP_Theme_JSON_Resolver::clean_cached_data() WP 6.1.1

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::$theme_has_support        = null;
	static::$i18n_schema              = null;
}