apply_filters( 'oembed_ttl', int $time, string $url, array $attr, int $post_id )
- Since
- 4.0.0
Filters the oEmbed TTL value (time to live).
Compatibility
- WordPress
- since 4.0.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.
$attrarray- An array of shortcode attributes.
$post_idint- Post ID.
Where this hook fires · 1
wp-includes/class-wp-embed.php:249WP_Embed::shortcode()
Source code
* * @param int $time Time to live (in seconds). * @param string $url The attempted embed URL. * @param array $attr An array of shortcode attributes. * @param int $post_id Post ID. */ $ttl = apply_filters( 'oembed_ttl', DAY_IN_SECONDS, $url, $attr, $post_id ); $cache = ''; $cache_time = 0; $cached_post_id = $this->find_oembed_post_id( $key_suffix );Changelog
Introduced in 4.0.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 7.1.0 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.