Example #1
0
 public static function getConfig($more = true)
 {
     if (!self::$config) {
         self::$config = (object) get_option(JVLibrary::getKey() . '_theme_settings');
         if (!isset(self::$config->logo)) {
             self::$config = self::defaultConfig();
         }
         if ($more) {
             self::$config->sitename = esc_attr(get_bloginfo('name', 'display'));
             self::$config->siteurl = esc_url(home_url("/"));
             self::$config->logourl = esc_url(get_site_url());
             self::$config->template = get_template();
         }
     }
     return self::$config;
 }
Example #2
0
 public static function setOptions()
 {
     // THIS IS THE EXPORTED THEME OPTIONS
     global $wp_filesystem;
     $import_file = JVLibrary::path('theme') . "library/import/data/themeoptions.txt";
     $import_code = $wp_filesystem->get_contents($import_file);
     $import_code = JVLibrary::decodeOpiton($import_code);
     update_option(JVLibrary::getKey() . '_theme_settings', $import_code);
 }