oembed_ttl WordPress Filter Hook
The oembed_ttl Wordpress hook allows you to change the time to live for cached oEmbed responses. This is useful if you need to ensure that your oEmbed responses are always up-to-date. By default, the time to live is set to 24 hours.
apply_filters( 'oembed_ttl', int $time , string $url , array $attr , int $post_ID ) #
Filters the oEmbed TTL value (time to live).
Parameters
- $time
(int)Time to live (in seconds).
- $url
(string)The attempted embed URL.
- $attr
(array)An array of shortcode attributes.
- $post_ID
(int)Post ID.
Source
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |