Пример #1
0
 /**
  * Functions to be called in install and upgrade scripts.
  *
  *
  * @since 3.1.0
  */
 function cp_upgrade_all()
 {
     global $app_abbr, $app_version, $app_current_db_version, $app_db_version, $wp_rewrite;
     $app_current_db_version = get_option($app_abbr . '_db_version');
     // We're up-to-date. Nothing to do.
     if ($app_db_version == $app_current_db_version) {
         return;
     }
     // If the version is not set in the db, try to guess the version.
     if (empty($app_current_db_version)) {
         $app_current_db_version = 0;
     }
     if ($app_current_db_version < 1200) {
         cp_upgrade_310();
     }
     if ($app_current_db_version < 1280) {
         cp_update_advanced_search_db();
     }
     if ($app_current_db_version < 1290) {
         cp_upgrade_317();
     }
     if ($app_current_db_version < 1300) {
         cp_upgrade_319();
     }
     // Now that we're all done, set the version number
     update_option($app_abbr . '_version', $app_version);
 }
Пример #2
0
 function cp_upgrade_all()
 {
     global $app_abbr, $app_version, $app_db_version;
     $current_db_version = get_option($app_abbr . '_db_version');
     if ($current_db_version < 1280) {
         cp_update_advanced_search_db();
     }
     if ($current_db_version < 1290) {
         cp_upgrade_317();
     }
     if ($current_db_version < 1320) {
         cp_upgrade_320();
     }
     update_option($app_abbr . '_db_version', $app_db_version);
     //update_option($app_abbr.'_version', $app_version);
 }
Пример #3
0
 function cp_upgrade_all()
 {
     $current_db_version = get_option('cp_db_version');
     if ($current_db_version < 1280) {
         cp_update_advanced_search_db();
     }
     if ($current_db_version < 1290) {
         cp_upgrade_317();
     }
     if ($current_db_version < 1320) {
         cp_upgrade_320();
     }
     if ($current_db_version < 1960) {
         cp_upgrade_330();
     }
     if ($current_db_version < 2103) {
         cp_upgrade_332();
     }
     update_option('cp_db_version', CP_DB_VERSION);
 }