bbp_update_topic_topic_id

Update the topic's topic id.

Description

(int) bbp_update_topic_topic_id( (int) $topic_id = 0 ); 

Returns (int)

Topic id

Parameters (1)

0. $topic_id — Optional. (int)
Topic id to update

Usage

  1. if ( !function_exists( 'bbp_update_topic_topic_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/topics/functions.php'; 
  3.  
  4. // Optional. Topic id to update 
  5. $topic_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_update_topic_topic_id($topic_id); 
  9.  

Defined (1)

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

/includes/topics/functions.php  
  1. function bbp_update_topic_topic_id( $topic_id = 0 ) { 
  2. $topic_id = bbp_get_topic_id( $topic_id ); 
  3.  
  4. update_post_meta( $topic_id, '_bbp_topic_id', (int) $topic_id ); 
  5.  
  6. return apply_filters( 'bbp_update_topic_topic_id', (int) $topic_id );