bp_blogs_get_blogmeta

Get metadata for a given blog.

Description

bp_blogs_get_blogmeta( (int) $blog_id, (string) $meta_key = '', (bool) $single = true ); 

Parameters (3)

0. $blog_id (int)
ID of the blog whose metadata is being requested.
1. $meta_key — Optional. (string) => ''
If present, only the metadata matching that meta key will be returned. Otherwise, all metadata for the blog will be fetched.
2. $single — Optional. (bool) => true
If true, return only the first value of the specified meta_key. This parameter has no effect if meta_key is not specified. Default: true.

Usage

  1. if ( !function_exists( 'bp_blogs_get_blogmeta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-functions.php'; 
  3.  
  4. // ID of the blog whose metadata is being requested. 
  5. $blog_id = -1; 
  6. $meta_key = ''; 
  7. $single = true; 
  8.  
  9. // NOTICE! Understand what this does before running. 
  10. $result = bp_blogs_get_blogmeta($blog_id, $meta_key, $single); 
  11.  

Defined (1)

The function is defined in the following location(s).

/bp-blogs/bp-blogs-functions.php  
  1. function bp_blogs_get_blogmeta( $blog_id, $meta_key = '', $single = true ) { 
  2. $retval = get_metadata( 'blog', $blog_id, $meta_key, $single ); 
  3.  
  4. return $retval;