oembed_fetch_url

Filters the oEmbed URL to be fetched.

Description

add_filter( 'oembed_fetch_url', (string) $ted_filter_oembed_fetch_url, (int) $int, (int) $int ); 

Parameters (3)

0. $ted_filter_oembed_fetch_url (string) => 'ted_filter_oembed_fetch_url'
The ted filter oembed fetch url.
1. $int (int) => 10
The int.
2. $int (int) => 3
The int.

Usage

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

Defined (5)

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

/modules/shortcodes/ted.php  
  1. add_filter( 'oembed_fetch_url', 'ted_filter_oembed_fetch_url', 10, 3 ); 
  1. remove_filter( 'oembed_fetch_url', 'ted_filter_oembed_fetch_url', 10 ); 
/modules/shortcodes/tweet.php  
  1. add_filter( 'oembed_fetch_url', array( 'Jetpack_Tweet', 'jetpack_tweet_url_extra_args' ), 10, 3 ); 
  1. remove_filter( 'oembed_fetch_url', array( 'Jetpack_Tweet', 'jetpack_tweet_url_extra_args' ), 10 ); 
/modules/videopress/shortcode.php  
  1. add_filter( 'oembed_fetch_url', array( $this, 'add_oembed_for_parameter' ) );