Yoast\WP\SEO\Config
Migration_Status::is_version()
Checks whether or not the given migration is at least the given version, defaults to checking for the latest version.
Метод класса: Migration_Status{}
Хуков нет.
Возвращает
true|false
. Whether or not the requested migration is at least the requested version.
Использование
$Migration_Status = new Migration_Status(); $Migration_Status->is_version( $name, $version );
- $name(строка) (обязательный)
- The name of the migration.
- $version(строка)
- The version to check.
По умолчанию: latest version
Код Migration_Status::is_version() Migration Status::is version Yoast 24.4
public function is_version( $name, $version = \WPSEO_VERSION ) { $migration_status = $this->get_migration_status( $name ); return \version_compare( $version, $migration_status['version'], '<=' ); }