apply_filters( 'rest_oembed_ttl', int $time, string $url, array $args )
- Since
- 4.8.0
Filters the oEmbed TTL value (time to live).
Description
Similar to the 'oembed_ttl' filter, but for the REST API oEmbed proxy endpoint.
Compatibility
- WordPress
- since 4.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$timeint- Time to live (in seconds).
$urlstring- The attempted embed URL.
$argsarray- An array of embed request arguments.
Where this hook fires · 1
wp-includes/class-wp-oembed-controller.php:240WP_oEmbed_Controller::get_proxy_item()
Source code
* @since 4.8.0 * * @param int $time Time to live (in seconds). * @param string $url The attempted embed URL. * @param array $args An array of embed request arguments. */ $ttl = apply_filters( 'rest_oembed_ttl', DAY_IN_SECONDS, $url, $args ); set_transient( $cache_key, $data, $ttl ); return $data; }}Changelog
Introduced in 4.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.