embed_handler_html

Filters the returned embed handler.

Description

apply_filters( 'embed_handler_html', (string) $return, (string) $url, (array) $attr ); 

Parameters (3)

0. $return (string)
Handler callback for the oEmbed.
1. $url (string)
URL attempting to be embedded.
2. $attr (array)
Shortcode attributes.

Usage

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

Defined (1)

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

/bp-core/classes/class-bp-embed.php  
  1. return apply_filters( 'embed_handler_html', $return, $url, $attr );