bbp_forum_query_topic_ids

Returns the forum's topic ids.

Description

bbp_forum_query_topic_ids( (int) $forum_id ); 

Only topics with published and closed statuses are returned

Parameters (1)

0. $forum_id (int)
The forum id.

Usage

  1. if ( !function_exists( 'bbp_forum_query_topic_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_topic_ids($forum_id); 
  9.  

Defined (1)

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

/includes/forums/functions.php  
  1. function bbp_forum_query_topic_ids( $forum_id ) { 
  2. $topic_ids = bbp_get_public_child_ids( $forum_id, bbp_get_topic_post_type() ); 
  3.  
  4. return apply_filters( 'bbp_forum_query_topic_ids', $topic_ids, $forum_id );