get_groupblog_blog_id

The BP Groupblog get groupblog blog id function.

Description

get_groupblog_blog_id( (string) $group_id = '' ); 

Parameters (1)

0. $group_id — Optional. (string) => ''
The group id.

Usage

  1. if ( !function_exists( 'get_groupblog_blog_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/bp-groupblog-templatetags.php'; 
  3.  
  4. // The group id. 
  5. $group_id = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_groupblog_blog_id($group_id); 
  9.  

Defined (1)

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

/bp-groupblog-templatetags.php  
  1. function get_groupblog_blog_id( $group_id = '' ) { 
  2. global $bp; 
  3.  
  4. if ( $group_id == '' ) { 
  5. $group_id = $bp->groups->current_group->id; 
  6.  
  7. return groups_get_groupmeta( $group_id, 'groupblog_blog_id' ); 
  8. }