bp_disable_blogforum_comments

Are blog and forum activity stream comments disabled?.

Description

bp_disable_blogforum_comments( (bool) $default = false ); 

Parameters (1)

0. $default — Optional. (bool) => false
Fallback value if not found in the database. Default: false.

Usage

  1. if ( !function_exists( 'bp_disable_blogforum_comments' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4. // Optional. Fallback value if not found in the database. 
  5. // Default: false. 
  6. $default = false; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = bp_disable_blogforum_comments($default); 
  10.  

Defined (1)

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

/bp-core/bp-core-options.php  
  1. function bp_disable_blogforum_comments( $default = false ) { 
  2.  
  3. /** 
  4. * Filters whether or not blog and forum activity stream comments are disabled. 
  5. * @since 1.6.0 
  6. * @param bool $value Whether or not blog and forum activity stream comments are disabled. 
  7. */ 
  8. return (bool) apply_filters( 'bp_disable_blogforum_comments', (bool) bp_get_option( 'bp-disable-blogforum-comments', $default ) );