rest_url_details_cache_expiration хук-фильтрWP 5.9.0

Filters the cache expiration.

Can be used to adjust the time until expiration in seconds for the cache of the data retrieved for the given URL.


add_filter( 'rest_url_details_cache_expiration', 'wp_kama_rest_url_details_cache_expiration_filter' );

 * Function for `rest_url_details_cache_expiration` filter-hook.
 * @param int $ttl The time until cache expiration in seconds.
 * @return int
function wp_kama_rest_url_details_cache_expiration_filter( $ttl ){

	// filter...
	return $ttl;
The time until cache expiration in seconds.

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

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

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

wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php 479
$cache_expiration = apply_filters( 'rest_url_details_cache_expiration', $ttl );

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

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