inkthemes_option_setup

The Black Rider Lite Responsive Theme inkthemes option setup function.

Description

inkthemes_option_setup(); 

Usage

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

Defined (1)

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

/functions/admin-functions.php  
  1. function inkthemes_option_setup() { 
  2. //Update EMPTY options 
  3. $of_array = array(); 
  4. add_option('of_options', $of_array); 
  5. $template = inkthemes_get_option('of_template'); 
  6. $saved_options = inkthemes_get_option('of_options'); 
  7. $std = ''; 
  8. foreach($template as $option) { 
  9. if($option['type'] != 'heading') { 
  10. if(isset($option['id'])) 
  11. $id = $option['id']; 
  12. if (isset($option['std'])) { 
  13. $std = $option['std']; 
  14. $db_option = inkthemes_get_option($id); 
  15. if(empty($db_option)) { 
  16. if(is_array($option['type'])) { 
  17. foreach($option['type'] as $child) { 
  18. $c_id = $child['id']; 
  19. $c_std = $child['std']; 
  20. inkthemes_update_option($c_id, $c_std); 
  21. $of_array[$c_id] = $c_std;  
  22. } else { 
  23. $of_array[$id] = $std; 
  24. else { //So just store the old values over again. 
  25. $of_array[$id] = $db_option; 
  26. inkthemes_update_option('of_options', $of_array);