bp_activity_update_meta_cache( int|string|array|bool $activity_ids = false )

Slurp up activitymeta for a specified set of activity items.

Description 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.

Top ↑

Parameters Parameters


(int|string|array|bool) (Optional) Accepts a single activity ID, or a comma- separated list or array of activity ids.

Default value: false

Source Source

File: bp-activity/bp-activity-cache.php

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 );

Top ↑

Changelog Changelog

Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.