oembed_ttl

Filters the oEmbed TTL value (time to live).

Description

apply_filters( 'oembed_ttl', (unknown) $day_in_seconds, (string) $var, (array) $array, (int) $int ); 

Parameters (4)

0. $day_in_seconds (unknown) => DAY_IN_SECONDS
The day in seconds.
1. $var (string) => ''
The var.
2. $array (array) => array()
The array.
3. $int (int)
The int.

Usage

To run the hook, copy the example below.
  1. $day_in_seconds = apply_filters( 'oembed_ttl', $day_in_seconds, $var, $array, $int ); 
  2.  
  3. if ( !empty( $day_in_seconds ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the oembed_ttl callback 
  2. function filter_oembed_ttl( $day_in_seconds, $var, $array, $int ) { 
  3. // make filter magic happen here... 
  4. return $day_in_seconds
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'oembed_ttl', 'filter_oembed_ttl', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'oembed_ttl', 'filter_oembed_ttl', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/CMB2_Ajax.php  
  1. $ttl = apply_filters( 'oembed_ttl', DAY_IN_SECONDS, '', array(), 0 );