Changeset 8076 for trunk/bp-activity/bp-activity-functions.php
- Timestamp:
- 03/07/2014 01:32:04 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r8035 r8076 1241 1241 ) ); 1242 1242 1243 // Clear the comment and item cache for this activity 1244 wp_cache_delete( $parent_id, 'bp_activity_comments' ); 1245 wp_cache_delete( $parent_id, 'bp_activity' ); 1243 // Comment caches are stored only with the top-level item 1244 wp_cache_delete( $activity_id, 'bp_activity_comments' ); 1245 1246 // Walk the tree to clear caches for all parent items 1247 $clear_id = $parent_id; 1248 while ( $clear_id != $activity_id ) { 1249 $clear_object = new BP_Activity_Activity( $clear_id ); 1250 wp_cache_delete( $clear_id, 'bp_activity' ); 1251 $clear_id = intval( $clear_object->secondary_item_id ); 1252 } 1253 wp_cache_delete( $activity_id, 'bp_activity' ); 1246 1254 1247 1255 do_action( 'bp_activity_comment_posted', $comment_id, $params, $activity );
Note: See TracChangeset
for help on using the changeset viewer.