Inpsyde\MultilingualPress\Database\TableInstaller::install PHP Method

install() public method

Installs the given table.
Since: 3.0.0
public install ( Inpsyde\MultilingualPress\Database\Table $table = null ) : boolean
$table Inpsyde\MultilingualPress\Database\Table Optional. Table object. Defaults to null.
return boolean Whether or not the table was installed successfully.
    public function install(Table $table = null);

Usage Example

コード例 #1
0
 /**
  * Updates any installed plugin data to the current version.
  *
  * @since 3.0.0
  *
  * @param VersionNumber  $installed_version       Installed MultilingualPress version.
  *
  * @return void
  */
 public function update(VersionNumber $installed_version)
 {
     if (VersionNumber::FALLBACK_VERSION === $installed_version) {
         // TODO: Move either to separate class or method on an existing class in the Language API namespace.
         $this->import_active_languages();
     }
     if (version_compare($installed_version, '2.0.4', '<')) {
         $this->table_installer->install($this->site_relations_table);
         $this->import_site_relations();
         if (version_compare($installed_version, '2.3.2', '<')) {
             $this->update_type_column();
         }
     }
     // Remove obsolete plugin data.
     delete_option('inpsyde_companyname');
 }
All Usage Examples Of Inpsyde\MultilingualPress\Database\TableInstaller::install
TableInstaller