bp_activity_maybe_truncate_entry

Provides a filter that lets you choose whether to skip this filter on a per-activity basis.

Description

apply_filters( 'bp_activity_maybe_truncate_entry', (bool) $isset ); 

Parameters (1)

0. $isset (bool) => isset( $activities_template->activity->type ) && ! in_array( $activities_template->activity->type, array( 'new_blog_post', ), true )
If true, text should be checked to see if it needs truncating.

Usage

To run the hook, copy the example below.
  1. $isset = apply_filters( 'bp_activity_maybe_truncate_entry', $isset ); 
  2.  
  3. if ( !empty( $isset ) ) { 
  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_maybe_truncate_entry callback 
  2. function filter_bp_activity_maybe_truncate_entry( $isset ) { 
  3. // make filter magic happen here... 
  4. return $isset
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_activity_maybe_truncate_entry', 'filter_bp_activity_maybe_truncate_entry', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_activity_maybe_truncate_entry', 'filter_bp_activity_maybe_truncate_entry', 10, 1 ); 

Defined (1)

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

/bp-activity/bp-activity-filters.php  
  1. $maybe_truncate_text = apply_filters(