bbp_is_forum_group_forum

Return true if a forum is a group forum.

Description

bbp_is_forum_group_forum( (int) $forum_id = 0 ); 

Parameters (1)

0. $forum_id — Optional. (int)
The forum id.

Usage

  1. if ( !function_exists( 'bbp_is_forum_group_forum' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/extend/buddypress/functions.php'; 
  3.  
  4. // The forum id. 
  5. $forum_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_is_forum_group_forum($forum_id); 
  9.  

Defined (1)

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

/includes/extend/buddypress/functions.php  
  1. function bbp_is_forum_group_forum( $forum_id = 0 ) { 
  2.  
  3. // Validate 
  4. $forum_id = bbp_get_forum_id( $forum_id ); 
  5.  
  6. // Check for group ID's 
  7. $group_ids = bbp_get_forum_group_ids( $forum_id ); 
  8.  
  9. // Check if the forum has groups 
  10. $retval = (bool) !empty( $group_ids ); 
  11.  
  12. return (bool) apply_filters( 'bbp_is_forum_group_forum', $retval, $forum_id, $group_ids );