WordPress at Your Fingertips
filter is not described

rest_oembed_ttl filter-hook . 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_7537', 10, 3 );
function filter_function_name_7537( $time, $url, $args ){
	// filter...

	return $time;
Time to live (in seconds).
The attempted embed URL.
An array of embed request arguments.


Since 4.8.0 Introduced.

Where the hook is called

wp-includes/class-wp-oembed-controller.php 239
$ttl = apply_filters( 'rest_oembed_ttl', DAY_IN_SECONDS, $url, $args );

Where in WP core the hook is used WordPress

Usage not found.