WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

Yoast\WP\SEO\Initializers

Migration_Runner::run_migrations() public Yoast 1.0

Initializes the migrations.

Это метод класса: Migration_Runner{}

Хуков нет.

Возвращает

true/false. True on success, false on failure.

Использование

$Migration_Runner = new Migration_Runner();
$Migration_Runner->run_migrations( $name );
$name(строка) (обязательный)
The name of the migration.

Код Migration_Runner::run_migrations() Yoast 15.1.1

<?php
public function run_migrations( $name ) {
	if ( ! $this->migration_status->should_run_migration( $name ) ) {
		return true;
	}

	if ( ! $this->migration_status->lock_migration( $name ) ) {
		return false;
	}

	$migrations = $this->loader->get_migrations( $name );

	if ( $migrations === false ) {
		$this->migration_status->set_error( $name, "Could not perform $name migrations. No migrations found." );
		return false;
	}

	try {
		$this->adapter->create_schema_version_table();
		$all_versions      = \array_keys( $migrations );
		$migrated_versions = $this->adapter->get_migrated_versions();
		$to_do_versions    = \array_diff( $all_versions, $migrated_versions );

		\sort( $to_do_versions, \SORT_STRING );

		foreach ( $to_do_versions as $version ) {
			$class = $migrations[ $version ];
			$this->run_migration( $version, $class );
		}
	} catch ( Exception $exception ) {
		// Something went wrong...
		$this->migration_status->set_error( $name, $exception->getMessage() );

		if ( \defined( 'YOAST_ENVIRONMENT' ) && \YOAST_ENVIRONMENT !== 'production' ) {
			throw $exception;
		}

		return false;
	}

	$this->migration_status->set_success( $name );

	return true;
}