wpsf_get_setting

Get a setting from an option group.

Description

wpsf_get_setting( (string) $option_group, (string) $section_id, (string) $field_id ); 

Parameters (3)

0. $option_group (string)
The option group.
1. $section_id (string)
The section id.
2. $field_id (string)
The field id.

Usage

  1. if ( !function_exists( 'wpsf_get_setting' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress-like-button/wp-settings-framework.php'; 
  3.  
  4. // The option group. 
  5. $option_group = ''; 
  6.  
  7. // The section id. 
  8. $section_id = ''; 
  9.  
  10. // The field id. 
  11. $field_id = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpsf_get_setting($option_group, $section_id, $field_id); 
  15.  

Defined (2)

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

/wp-settings-framework.php  
  1. function wpsf_get_setting( $option_group, $section_id, $field_id ) { 
  2. $options = get_option( $option_group .'_settings' ); 
  3. if(isset($options[$option_group .'_'. $section_id .'_'. $field_id])) return $options[$option_group .'_'. $section_id .'_'. $field_id]; 
  4. return false; 
  1. function wpsf_get_setting( $option_group, $section_id, $field_id ) { 
  2. $options = get_option( $option_group .'_settings' ); 
  3. if(isset($options[$option_group .'_'. $section_id .'_'. $field_id])) return $options[$option_group .'_'. $section_id .'_'. $field_id]; 
  4. return false;