bb_update_post

The BuddyPress bb update post function.

Description

bb_update_post( $post_text, $post_id, $topic_id ); 

Parameters (3)

0. $post_text
The post text.
1. $post_id
The post id.
2. $topic_id
The topic id.

Usage

  1. if ( !function_exists( 'bb_update_post' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-posts.php'; 
  3.  
  4. // The post text. 
  5. $post_text = null; 
  6.  
  7. // The post id. 
  8. $post_id = null; 
  9.  
  10. // The topic id. 
  11. $topic_id = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bb_update_post($post_text, $post_id, $topic_id); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-posts.php  
  1. function bb_update_post( $post_text, $post_id, $topic_id ) { 
  2. $post_text = stripslashes( $post_text ); 
  3. return bb_insert_post( compact( 'post_text', 'post_id', 'topic_id' ) );