bp_activity_delete_by_activity_id

Delete an activity item by activity id.

Description

bp_activity_delete_by_activity_id( (int) $activity_id ); 

Parameters (1)

0. $activity_id (int)
ID of the activity item to be deleted.

Usage

  1. if ( !function_exists( 'bp_activity_delete_by_activity_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; 
  3.  
  4. // ID of the activity item to be deleted. 
  5. $activity_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_delete_by_activity_id($activity_id); 
  9.  

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_delete_by_activity_id( $activity_id ) { 
  2. return bp_activity_delete( array( 'id' => $activity_id ) );