bbp_get_form_forum_type

Return value of forum type.

Description

(string) bbp_get_form_forum_type(); 

Returns (string)

Value of topic content field


Usage

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

Defined (1)

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

/includes/forums/template.php  
  1. function bbp_get_form_forum_type() { 
  2.  
  3. // Get _POST data 
  4. if ( bbp_is_post_request() && isset( $_POST['bbp_forum_type'] ) ) { 
  5. $forum_type = $_POST['bbp_forum_type']; 
  6.  
  7. // Get edit data 
  8. } elseif ( bbp_is_forum_edit() ) { 
  9. $forum_type = bbp_get_forum_type(); 
  10.  
  11. // No data 
  12. } else { 
  13. $forum_type = 'forum'; 
  14.  
  15. return apply_filters( 'bbp_get_form_forum_type', esc_attr( $forum_type ) );