bp_activity_update_meta_cache( int|string|array|bool $activity_ids = false )
Slurp up activitymeta for a specified set of activity items.
Description
It grabs all activitymeta associated with all of the activity items passed in $activity_ids and adds it to the WP cache. This improves efficiency when using querying activitymeta inline.
Parameters
- $activity_ids
-
(Optional) Accepts a single activity ID, or a comma- separated list or array of activity ids.
Default value: false
Source
File: bp-activity/bp-activity-cache.php
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | function bp_activity_update_meta_cache( $activity_ids = false ) { $bp = buddypress(); $cache_args = array ( 'object_ids' => $activity_ids , 'object_type' => $bp ->activity->id, 'object_column' => 'activity_id' , 'cache_group' => 'activity_meta' , 'meta_table' => $bp ->activity->table_name_meta, 'cache_key_prefix' => 'bp_activity_meta' ); bp_update_meta_cache( $cache_args ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.6.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.