wppaste
WordPress

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).

Parameters

$timeint
Time to live (in seconds).
$urlstring
The attempted embed URL.
$attrarray
An array of shortcode attributes.
$post_idint
Post ID.

Fired at · 1

  • wp-includes/class-wp-embed.php:249WP_Embed::shortcode()

Source

		 *		 * @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 );

History

Introduced in 4.0.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 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.