bp_akismet_build_akismet_data_package

Filters activity data before being sent to Akismet to inspect.

Description

apply_filters( 'bp_akismet_build_akismet_data_package', (array) $activity_data, (BP_Activity_Activity) $activity ); 

Parameters (2)

0. $activity_data (array)
Array of activity data for Akismet to inspect.
1. $activity (BP_Activity_Activity)
Activity item data.

Usage

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

Defined (1)

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

/bp-activity/classes/class-bp-akismet.php  
  1. return apply_filters( 'bp_akismet_build_akismet_data_package', $activity_data, $activity );