bbp_topic_content_append_revisions

Append revisions to the topic content.

Description

(string) bbp_topic_content_append_revisions( (string) $content = '', (int) $topic_id = 0 ); 

Returns (string)

Content with the revisions appended

Parameters (2)

0. $content — Optional. (string) => ''
Content to which we need to append the revisions to
1. $topic_id — Optional. (int)
Topic id

Usage

  1. if ( !function_exists( 'bbp_topic_content_append_revisions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/topics/template.php'; 
  3.  
  4. // Optional. Content to which we need to append the revisions to 
  5. $content = ''; 
  6.  
  7. // Optional. Topic id 
  8. $topic_id = -1; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bbp_topic_content_append_revisions($content, $topic_id); 
  12.  

Defined (1)

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

/includes/topics/template.php  
  1. function bbp_topic_content_append_revisions( $content = '', $topic_id = 0 ) { 
  2.  
  3. // Bail if in admin or feed 
  4. if ( is_admin() || is_feed() ) 
  5. return; 
  6.  
  7. // Validate the ID 
  8. $topic_id = bbp_get_topic_id( $topic_id ); 
  9.  
  10. return apply_filters( 'bbp_topic_append_revisions', $content . bbp_get_topic_revision_log( $topic_id ), $content, $topic_id );