rest_oembed_ttl хук-фильтр . WP 4.8.0
Filters the oEmbed TTL value (time to live).
Similar to the 'oembed_ttl' filter, but for the REST API oEmbed proxy endpoint.
Использование
add_filter( 'rest_oembed_ttl', 'filter_function_name_6499', 10, 3 ); function filter_function_name_6499( $time, $url, $args ){ // filter... return $time; }
- $time(число)
- Time to live (in seconds).
- $url(строка)
- The attempted embed URL.
- $args(массив)
- An array of embed request arguments.
Список изменений
С версии 4.8.0 | Введена. |
Где вызывается хук
rest_oembed_ttl
wp-includes/class-wp-oembed-controller.php 237
$ttl = apply_filters( 'rest_oembed_ttl', DAY_IN_SECONDS, $url, $args );