bp_blogs_update_meta_cache( int|string|array|bool $blog_ids = false )

Slurp up blogmeta for a specified set of blogs.


Description Description

It grabs all blogmeta associated with all of the blogs passed in $blog_ids and adds it to the WP cache. This improves efficiency when using querying blogmeta inline.


Top ↑

Parameters Parameters

$blog_ids

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

Default value: false


Source Source

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

function bp_blogs_update_meta_cache( $blog_ids = false ) {
	$cache_args = array(
		'object_ids'    => $blog_ids,
		'object_type'   => buddypress()->blogs->id,
		'object_column' => 'blog_id',
		'cache_group'   => 'bp_blog_meta',
		'meta_table'    => buddypress()->blogs->table_name_blogmeta,
	);

	bp_update_meta_cache( $cache_args );
}


Top ↑

User Contributed Notes User Contributed Notes

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