of_get_default_values

Format Configuration Array.

Description

(array) of_get_default_values(); 

Get an array of all default values as set in options.php. The id,,'std' and type keys need to be defined in the configuration array. In the event that these keys are not present the option will not be included in this function's output.

Returns (array)

Rey-keyed options configuration array.


Usage

  1. if ( !function_exists( 'of_get_default_values' ) ) { 
  2. require_once '/inc/options-framework.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = of_get_default_values(); 
  7.  

Defined (1)

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

/inc/options-framework.php  
  1. function of_get_default_values() { 
  2. $output = array(); 
  3. $config =& _optionsframework_options(); 
  4. foreach ( (array) $config as $option ) { 
  5. if ( ! isset( $option['id'] ) ) { 
  6. continue; 
  7. if ( ! isset( $option['std'] ) ) { 
  8. continue; 
  9. if ( ! isset( $option['type'] ) ) { 
  10. continue; 
  11. if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { 
  12. $output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option ); 
  13. return $output;