示例#1
0
文件: loader.php 项目: pcuervo/odc
 function axiom_loader_theme_setup()
 {
     // Before init theme
     do_action('axiom_action_before_init_theme');
     // Load current values for main theme options
     axiom_load_main_options();
     // Theme core init - only for admin side. In frontend it called from header.php
     if (is_admin()) {
         axiom_core_init_theme();
     }
 }
示例#2
0
 function import_theme_options()
 {
     if (empty($this->options['file_with_options'])) {
         return;
     }
     echo '<script>' . 'document.getElementById("import_progress_status").innerHTML = "' . __('Import Theme Options ...', 'axiom') . '";' . '</script>';
     echo '<br><b>' . __('Import Theme Options ...', 'axiom') . '</b><br>';
     flush();
     $theme_options_txt = axiom_fgc(axiom_get_file_dir($this->options['file_with_options']));
     $data = unserialize(base64_decode($theme_options_txt));
     // Replace upload url in options
     if (count($data) > 0) {
         foreach ($data as $k => $v) {
             if (is_array($v) && count($v) > 0) {
                 foreach ($v as $k1 => $v1) {
                     $v[$k1] = $this->replace_uploads($v1);
                 }
             } else {
                 $v = $this->replace_uploads($v);
             }
             update_option($k, $v);
         }
         axiom_load_main_options();
     }
 }