bpbbpst_get_forum_support_topic_intro

Get the New Topic form intro for support only forums.

Description

(string) bpbbpst_get_forum_support_topic_intro( (int) $forum_id = 0 ); 

Returns (string)

the support forum intro

Parameters (1)

0. $forum_id — Optional. (int)
The forum id.

Usage

  1. if ( !function_exists( 'bpbbpst_get_forum_support_topic_intro' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddy-bbpress-support-topic/includes/functions.php'; 
  3.  
  4. // The forum id. 
  5. $forum_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bpbbpst_get_forum_support_topic_intro($forum_id); 
  9.  

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_get_forum_support_topic_intro( $forum_id = 0 ) { 
  2. if ( empty( $forum_id ) ) { 
  3. $forum_id = bbp_get_forum_id(); 
  4.  
  5. if ( ! $forum_id ) { 
  6. return ''; 
  7.  
  8. $support_intro = get_post_meta( $forum_id, '_bpbbpst_support_topic_intro', true ); 
  9.  
  10. if ( ! empty( $support_intro ) ) { 
  11. $support_intro = wp_kses( $support_intro, wp_kses_allowed_html( 'forum' ) ); 
  12.  
  13. return apply_filters( 'bpbbpst_get_forum_support_topic_intro', $support_intro );