Skip to:
Content

BuddyPress.org

Changeset 7852


Ignore:
Timestamp:
02/11/2014 07:40:07 PM (6 years ago)
Author:
boonebgorges
Message:

In bp_activity_delete_meta(), clear entire activity item cache when deleting all meta

This fix will become moot after migrating to WP metadata API, but I'm fixing
it just to get the unit tests to pass in the meantime :)

See #4551

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-functions.php

    r7773 r7852  
    583583
    584584    // Delete cache entry
    585     wp_cache_delete( 'bp_activity_meta_' . $activity_id . '_' . $meta_key, 'bp' );
     585    if ( $meta_key ) {
     586        wp_cache_delete( 'bp_activity_meta_' . $activity_id . '_' . $meta_key, 'bp' );
     587    } else {
     588        bp_activity_clear_meta_cache_for_activity( $activity_id );
     589    }
    586590
    587591    // Success
Note: See TracChangeset for help on using the changeset viewer.