WPSEO_Sitemaps_Cache::clear_on_option_update() public Yoast 3.2
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 15.9.1
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 );
}
}
}