WP_Theme_JSON_Resolver::clean_cached_data() WordPress Method

The WP_Theme_JSON_Resolver::clean_cached_data() method is used to clean up any cached data that is no longer needed. This is important to do periodically to ensure that your site is running smoothly and efficiently.

WP_Theme_JSON_Resolver::clean_cached_data() #

Cleans the cached data so it can be recalculated.


Source

File: wp-includes/class-wp-theme-json-resolver.php

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

Top ↑

Changelog

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.