wp_cache_themes_persistently хук-фильтрWP 3.4.0

Filters whether to get the cache of the registered theme directories.

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

add_filter( 'wp_cache_themes_persistently', 'wp_kama_cache_themes_persistently_filter', 10, 2 );

/**
 * Function for `wp_cache_themes_persistently` filter-hook.
 * 
 * @param bool   $cache_expiration Whether to get the cache of the theme directories.
 * @param string $context          The class or function name calling the filter.
 *
 * @return bool
 */
function wp_kama_cache_themes_persistently_filter( $cache_expiration, $context ){

	// filter...
	return $cache_expiration;
}
$cache_expiration(true|false)
Whether to get the cache of the theme directories.
По умолчанию: false
$context(строка)
The class or function name calling the filter.

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

С версии 3.4.0 Введена.

Где вызывается хук

search_theme_directories()
wp_cache_themes_persistently
WP_Theme::__construct()
wp_cache_themes_persistently
wp-includes/theme.php 487
$cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' );
wp-includes/class-wp-theme.php 257
self::$persistently_cache = apply_filters( 'wp_cache_themes_persistently', false, 'WP_Theme' );

Где используется хук в WordPress

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