wphooks.info - rest_oembed_ttl

rest_oembed_ttl

*** New in v4.8 ***

The hook occurs in the following file:

wp-includes/class-wp-oembed-controller.php:
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
		 *
		 * Similar to the {@see 'oembed_ttl'} filter, but for the REST API
		 * oEmbed proxy endpoint.
		 *
		 * @since 4.8.0
		 *
		 * @param int    $time    Time to live (in seconds).
		 * @param string $url     The attempted embed URL.
		 * @param array  $args    An array of embed request arguments.
		 */
		$ttl = apply_filters( 'rest_oembed_ttl', DAY_IN_SECONDS, $url, $args );

		set_transient( $cache_key, $data, $ttl );

		return $data;
	}
}