bp_get_group_forums_root_id

Return the group forums root parent forum id.

Description

(int) bp_get_group_forums_root_id( (string) $default = '0' ); 

Returns (int)

The ID of the group forums root forum.

Parameters (1)

0. $default — Optional. (string) => '0'
Default: 0..

Usage

  1. if ( !function_exists( 'bp_get_group_forums_root_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4. // Optional. Default: '0'. 
  5. $default = '0'; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_get_group_forums_root_id($default); 
  9.  

Defined (1)

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

/bp-core/bp-core-options.php  
  1. function bp_get_group_forums_root_id( $default = '0' ) { 
  2.  
  3. /** 
  4. * Filters the group forums root parent forum id. 
  5. * @since 1.6.0 
  6. * @param int $value The group forums root parent forum id. 
  7. */ 
  8. return (int) apply_filters( 'bp_get_group_forums_root_id', (int) bp_get_option( '_bp_group_forums_root_id', $default ) );