bp_<slug_endpoint>_embed_html

Dynamic filter to return BP oEmbed HTML.

Description

apply_filters( 'bp_<slug_endpoint>_embed_html', (unknown) $fallback_html_retval ); 

Parameters (1)

0. $fallback_html_retval (unknown)
The fallback html retval.

Usage

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

Defined (1)

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

/bp-core/classes/class-bp-core-oembed-extension.php  
  1. return apply_filters( "bp_{$this->slug_endpoint}_embed_html", $fallback_html . $retval );