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. global $onetone_options, $onetone_default_options; 
  3. if(isset($onetone_options[$name])) { 
  4. return $onetone_options[$name]; 
  5. else{ 
  6. if( $default != '' ) { 
  7. return $default; 
  8. else{ 
  9. if( isset($onetone_default_options[$name]) ) 
  10. return $onetone_default_options[$name]; 
  11. else 
  12. return '';