bpbbpst_get_forum_support_setting

Gets the forum setting for support feature.

Description

(integer) bpbbpst_get_forum_support_setting( (int) $forum_id = 0 ); 

Returns (integer)

the forum support setting

Parameters (1)

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

Usage

  1. if ( !function_exists( 'bpbbpst_get_forum_support_setting' ) ) { 
  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_setting($forum_id); 
  9.  

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_get_forum_support_setting( $forum_id = 0 ) { 
  2. if ( empty( $forum_id ) ) { 
  3. return false; 
  4.  
  5. $forum_support_setting = get_post_meta( $forum_id, '_bpbbpst_forum_settings', true ); 
  6.  
  7. if ( empty( $forum_support_setting ) ) { 
  8. $forum_support_setting = 1; 
  9.  
  10. return apply_filters( 'bpbbpst_get_forum_support_setting', intval( $forum_support_setting ) );