onetone_option

The Onetone onetone option function.

Description

onetone_option( (string) $name, (string) $default = '' ); 

Parameters (2)

0. $name (string)
The name.
1. $default — Optional. (string) => ''
The default.

Usage

  1. if ( !function_exists( 'onetone_option' ) ) { 
  2. require_once '/includes/theme-setup.php'; 
  3.  
  4. // The name. 
  5. $name = ''; 
  6.  
  7. // The default. 
  8. $default = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = onetone_option($name, $default); 
  12.  

Defined (1)

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

/includes/theme-setup.php  
  1. function onetone_option($name, $default='') { 
  2.  
  3. global $onetone_default_options, $onetone_options; 
  4.  
  5. if(is_customize_preview()) 
  6. $onetone_options = onetone_of_get_options(); 
  7.  
  8. if( isset($onetone_options[$name]) ) 
  9. return $onetone_options[$name];  
  10. elseif( isset($onetone_default_options[$name]) ) 
  11. return $onetone_default_options[$name]; 
  12.  
  13. else 
  14. return $default;