function gcb_check_update($current_version = 0) { //make sure we have a value here if ($current_version == 0) { $current_version = get_option("gcb_db_version"); } if (version_compare($current_version, GCB_VERSION) < 0) { //prompt the user gcb_migrate_to_options(); gcb_remove_table(); update_option("gcb_db_version", GCB_VERSION); } }
function gcb_check_update($current_version = 0) { //make sure we have a value here if ($current_version == 0) { $current_version = get_option("gcb_db_version"); } if (version_compare($current_version, GCB_VERSION) < 0) { //prompt the user // $prompted = get_option('gcb_update_prompt_v2'); //we switched to using the Wordpress Options, we need to migrate from the old table to the options //if($prompted !== false) { gcb_migrate_to_options(); // } gcb_remove_table(); //update the option // if($prompted !== false) { update_option("gcb_db_version", GCB_VERSION); // } } }