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.


Top ↑

Source

File: wp-includes/class-wp-embed.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.