WPSEO_Sitemaps_Cache::clear_queued()public staticYoast 1.0

Invalidate storage for cache types queued to clear.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = WPSEO_Sitemaps_Cache::clear_queued();

Код WPSEO_Sitemaps_Cache::clear_queued() Yoast 22.4

public static function clear_queued() {

	if ( self::$clear_all ) {

		WPSEO_Sitemaps_Cache_Validator::invalidate_storage();
		self::$clear_all   = false;
		self::$clear_types = [];

		return;
	}

	foreach ( self::$clear_types as $type ) {
		WPSEO_Sitemaps_Cache_Validator::invalidate_storage( $type );
	}

	self::$clear_types = [];
}