rest_oembed_ttl WordPress Filter Hook
The rest_oembed_ttl WordPress hook allows you to change the default cache duration for oEmbed results. This is useful if you want to ensure that your oEmbed results are always up-to-date. By default, WordPress will cache oEmbed results for 12 hours.
apply_filters( 'rest_oembed_ttl', int $time , string $url , array $args ) #
Filters the oEmbed TTL value (time to live).
Description
Similar to the ‘oembed_ttl’ filter, but for the REST API oEmbed proxy endpoint.
Parameters
- $time
(int)Time to live (in seconds).
- $url
(string)The attempted embed URL.
- $args
(array)An array of embed request arguments.
Source
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |