wp_theme_files_cache_ttl хук-фильтрWP 6.6.0

Filters the cache expiration time for theme files.

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

add_filter( 'wp_theme_files_cache_ttl', 'wp_kama_theme_files_cache_ttl_filter', 10, 2 );

/**
 * Function for `wp_theme_files_cache_ttl` filter-hook.
 * 
 * @param int    $cache_expiration Cache expiration time in seconds.
 * @param string $cache_type       Type of cache being set.
 *
 * @return int
 */
function wp_kama_theme_files_cache_ttl_filter( $cache_expiration, $cache_type ){

	// filter...
	return $cache_expiration;
}
$cache_expiration(int)
Cache expiration time in seconds.
$cache_type(строка)
Type of cache being set.

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

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

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

WP_Theme::set_pattern_cache()
wp_theme_files_cache_ttl
wp-includes/class-wp-theme.php 2016
$cache_expiration = (int) apply_filters( 'wp_theme_files_cache_ttl', self::$cache_expiration, 'theme_block_patterns' );

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

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