bbp_maybe_admin_setting_disabled

Disable a settings field if the value is forcibly set in bbPress's global options array.

Description

bbp_maybe_admin_setting_disabled( (string) $option_key = '' ); 

Parameters (1)

0. $option_key — Optional. (string) => ''
The option key.

Usage

  1. if ( !function_exists( 'bbp_maybe_admin_setting_disabled' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/admin/settings.php'; 
  3.  
  4. // The option key. 
  5. $option_key = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_maybe_admin_setting_disabled($option_key); 
  9.  

Defined (1)

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

/includes/admin/settings.php  
  1. function bbp_maybe_admin_setting_disabled( $option_key = '' ) { 
  2. disabled( isset(bbpress)->options[$option_key] ) );