bbp_categorize_forum

Make the forum a category.

Description

bbp_categorize_forum( (int) $forum_id = 0 ); 

Parameters (1)

0. $forum_id — Optional. (int)
Forum id

Usage

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

Defined (1)

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

/includes/forums/functions.php  
  1. function bbp_categorize_forum( $forum_id = 0 ) { 
  2.  
  3. $forum_id = bbp_get_forum_id( $forum_id ); 
  4.  
  5. do_action( 'bbp_categorize_forum', $forum_id ); 
  6.  
  7. update_post_meta( $forum_id, '_bbp_forum_type', 'category' ); 
  8.  
  9. do_action( 'bbp_categorized_forum', $forum_id ); 
  10.  
  11. return $forum_id;