bp_activity_get_specific

Filters the requested specific activity item.

Description

apply_filters( 'bp_activity_get_specific', (BP_Activity_Activity) $bp_activity_activity, (array) $args, (array) $get_args ); 

Parameters (3)

0. $bp_activity_activity (BP_Activity_Activity) => BP_Activity_Activity::get( $get_args )
Requested activity object.
1. $args (array)
Original passed in arguments.
2. $get_args (array)
Constructed arguments used with request.

Usage

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

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. return apply_filters( 'bp_activity_get_specific', BP_Activity_Activity::get( $get_args ), $args, $get_args );