Example #1
0
	function dttheme_activation_function($oldname, $oldtheme=false) {
		update_option(IAMD_THEME_SETTINGS, dttheme_default_option());
	}
Example #2
0
function dttheme_backup_and_restore_action()
{
    $save_type = $_POST['type'];
    if ($save_type == 'backup_options') {
        $data = array("general" => dttheme_option('general'), "appearance" => dttheme_option('appearance'), "integration" => dttheme_option('integration'), "mobile" => dttheme_option('mobile'), "social" => dttheme_option('social'), "seo" => dttheme_option('seo'), 'widgetarea' => dttheme_option("widgetarea"), "specialty" => dttheme_option('specialty'), "dt_course" => dttheme_option('dt_course'), "pagebuilder" => dttheme_option('pagebuilder'), "woo" => dttheme_option('woo'), 'backup' => date('r'));
        update_option("mytheme_backup", $data);
        die('1');
    } elseif ($save_type == 'restore_options') {
        $data = get_option("mytheme_backup");
        update_option(IAMD_THEME_SETTINGS, $data);
        die('1');
    } elseif ($save_type == "import_options") {
        $data = $_POST['data'];
        $data = unserialize(base64_decode($data));
        //100% safe - ignore theme check nag
        update_option(IAMD_THEME_SETTINGS, $data);
        die('1');
    } elseif ($save_type == "reset_options") {
        delete_option(IAMD_THEME_SETTINGS);
        update_option(IAMD_THEME_SETTINGS, dttheme_default_option());
        # To set Default options
        die('1');
    }
}
Example #3
0
 function dttheme_activation_function($oldname, $oldtheme = false)
 {
     if (!in_array($oldname, array('LMS', 'LMS Child'))) {
         update_option(IAMD_THEME_SETTINGS, dttheme_default_option());
     }
 }