bbp_forum_query_subforum_ids

Returns the forum's subforum ids.

Description

bbp_forum_query_subforum_ids( (int) $forum_id ); 

Only forums with published status are returned

Parameters (1)

0. $forum_id (int)
The forum id.

Usage

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

Defined (1)

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

/includes/forums/functions.php  
  1. function bbp_forum_query_subforum_ids( $forum_id ) { 
  2. $subforum_ids = bbp_get_all_child_ids( $forum_id, bbp_get_forum_post_type() ); 
  3. //usort( $subforum_ids, '_bbp_forum_query_usort_subforum_ids' ); 
  4.  
  5. return apply_filters( 'bbp_get_forum_subforum_ids', $subforum_ids, $forum_id );