function builder_load_theme_settings($set_global = false) { $storage = new ITStorage2('builder-theme-settings', builder_get_data_version('theme-settings')); $settings = $storage->load(); if (true === $set_global) { $GLOBALS['wp_theme_options'] = $settings; } return $settings; }
function run_import($info, $data, $post_data, $attachments, $return_data, $view_settings) { $storage = new ITStorage2('builder-theme-settings', $this->get_version()); $settings = $storage->load(); $storage->save($data); if ($return_data) { return $data; } return true; }
public static function log($code, $message, $type = 'warning') { it_classes_load('it-storage.php'); if (!preg_match('/^(warning|error|fatal)$/', $type)) { $type = 'warning'; } $store = new ITStorage2('it-error', array('version' => '1.0.0', 'autoload' => 'no')); $data = $store->load(); $log = ITError::get_debug_data($code); $log['message'] = $message; $data[] = $log; $store->save($data); }