bp_activity_clear_cache_for_deleted_activity

Clear cached data for deleted activity items.

Description

bp_activity_clear_cache_for_deleted_activity( (array) $deleted_ids ); 

Parameters (1)

0. $deleted_ids (array)
IDs of deleted activity items.

Usage

  1. if ( !function_exists( 'bp_activity_clear_cache_for_deleted_activity' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-cache.php'; 
  3.  
  4. // IDs of deleted activity items. 
  5. $deleted_ids = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_clear_cache_for_deleted_activity($deleted_ids); 
  9.  

Defined (1)

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

/bp-activity/bp-activity-cache.php  
  1. function bp_activity_clear_cache_for_deleted_activity( $deleted_ids ) { 
  2. foreach ( (array) $deleted_ids as $deleted_id ) { 
  3. wp_cache_delete( $deleted_id, 'bp_activity' );