/**
  * Upgrade routine
  */
 private function load_upgrader()
 {
     // Only run if db option is at older version than code constant
     $db_version = get_option('mc4wp_lite_version', 0);
     if (version_compare(MC4WP_LITE_VERSION, $db_version, '<=')) {
         return false;
     }
     $upgrader = new MC4WP_DB_Upgrader(MC4WP_LITE_VERSION, $db_version);
     $upgrader->run();
 }
Exemple #2
0
 /**
  * The upgrade routine
  * Only runs after updating plugin files (if version was bumped)
  *
  * @return boolean Boolean indication whether the upgrade routine ran
  */
 public function load_upgrader()
 {
     $db_version = get_option('mc4wp_version', 0);
     if (version_compare(MC4WP_VERSION, $db_version, '<=')) {
         return false;
     }
     // create instance of the upgrader and run it
     $upgrader = new MC4WP_DB_Upgrader(MC4WP_VERSION, $db_version);
     $upgrader->run();
     return true;
 }