bbp_get_form_topic_content

Return the value of topic content field.

Description

(string) bbp_get_form_topic_content(); 

Returns (string)

Value of topic content field


Usage

  1. if ( !function_exists( 'bbp_get_form_topic_content' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/topics/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_get_form_topic_content(); 
  7.  

Defined (1)

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

/includes/topics/template.php  
  1. function bbp_get_form_topic_content() { 
  2.  
  3. // Get _POST data 
  4. if ( bbp_is_post_request() && isset( $_POST['bbp_topic_content'] ) ) { 
  5. $topic_content = stripslashes( $_POST['bbp_topic_content'] ); 
  6.  
  7. // Get edit data 
  8. } elseif ( bbp_is_topic_edit() ) { 
  9. $topic_content = bbp_get_global_post_field( 'post_content', 'raw' ); 
  10.  
  11. // No data 
  12. } else { 
  13. $topic_content = ''; 
  14.  
  15. return apply_filters( 'bbp_get_form_topic_content', $topic_content );