WPSEO_Sitemaps_Cache::clear_on_option_update()
Clears the transient cache when a given option is updated, if that option has been registered before.
Метод класса: WPSEO_Sitemaps_Cache{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$result = WPSEO_Sitemaps_Cache::clear_on_option_update( $option );
- $option(строка) (обязательный)
- The option name that's being updated.
Список изменений
С версии 3.2 | Введена. |
Код WPSEO_Sitemaps_Cache::clear_on_option_update() WPSEO Sitemaps Cache::clear on option update Yoast 20.3
public static function clear_on_option_update( $option ) { if ( array_key_exists( $option, self::$cache_clear ) ) { if ( empty( self::$cache_clear[ $option ] ) ) { // Clear all caches. self::clear(); } else { // Clear specific provided type(s). $types = (array) self::$cache_clear[ $option ]; self::clear( $types ); } } }