xprofile_register_activity_action

Filters the return value of bp_activity_set_action.

Description

apply_filters( 'xprofile_register_activity_action', (bool) $bp_activity_set_action, (string) $key, (string) $value ); 

Parameters (3)

0. $bp_activity_set_action (bool) => bp_activity_set_action( buddypress()->profile->id, $key, $value )
Whether or not an action was successfully registered.
1. $key (string)
Key used for the registered action.
2. $value (string)
Value used for the registered action.

Usage

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

Defined (1)

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

/bp-xprofile/bp-xprofile-activity.php  
  1. return apply_filters( 'xprofile_register_activity_action', bp_activity_set_action( buddypress()->profile->id, $key, $value ), $key, $value );