示例#1
0
  public static function upgrade() {
    
    global $wpdb;
    
    // run an upgrade, based on the version number

    if (get_option("masterpress_version") != MasterPress::$version || !self::table_exists("post_types") || isset($_GET["mp_install"])) {
      // Always add the latest table definitions here (when required) with dbDelta calls
      update_option("masterpress_version", MasterPress::$version);
      MasterPress::install();
    }
    
  }