bp_activity_delete_for_user_by_component

Delete a user's activity for a component.

Description

bp_activity_delete_for_user_by_component( (int) $user_id, (string) $component ); 

You should use bp_activity_delete() instead.

Parameters (2)

0. $user_id (int)
The user id.
1. $component (string)
The activity component.

Usage

  1. if ( !function_exists( 'bp_activity_delete_for_user_by_component' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; 
  3.  
  4. // The user id. 
  5. $user_id = -1; 
  6.  
  7. // The activity component. 
  8. $component = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_activity_delete_for_user_by_component($user_id, $component); 
  12.  

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_delete_for_user_by_component( $user_id, $component ) { 
  2. return bp_activity_delete( array( 
  3. 'user_id' => $user_id,  
  4. 'component' => $component 
  5. ) );