Inpsyde\MultilingualPress\Installation\Updater::update PHP Метод

update() публичный Метод

Updates any installed plugin data to the current version.
С версии: 3.0.0
public update ( Inpsyde\MultilingualPress\Common\Type\VersionNumber $installed_version ) : void
$installed_version Inpsyde\MultilingualPress\Common\Type\VersionNumber Installed MultilingualPress version.
Результат 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');
    }