bp_activity_get_embed_excerpt

Filter the activity embed excerpt.

Description

apply_filters( 'bp_activity_get_embed_excerpt', (unknown) $content, (unknown) $globals_activities_template_activity_content ); 

Parameters (2)

0. $content (unknown)
The content.
1. $globals_activities_template_activity_content (unknown)
The globals activities template activity content.

Usage

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

Defined (2)

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

/bp-activity/bp-activity-embeds.php  
  1. return apply_filters( 'bp_activity_get_embed_excerpt', $content, $GLOBALS['activities_template']->activity->content ); 
  1. $caption .= sprintf( '<div class="caption-description">%s</div>', apply_filters( 'bp_activity_get_embed_excerpt', $oembed->description ) );