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

Yoast\WP\SEO\Config

Migration_Status::should_run_migration() public Yoast 1.0

Checks if a given migration should be run.

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

Хуков нет.

Возвращает

true/false. Whether or not the migration should be run.

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

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

Код Migration_Status::should_run_migration() Yoast 15.1.1

<?php
public function should_run_migration( $name ) {
	$migration_status = $this->get_migration_status( $name );

	// Check if we've attempted to run this migration in the past 10 minutes. If so, it may still be running.
	if ( \array_key_exists( 'lock', $migration_status ) ) {
		$timestamp = \strtotime( '-10 minutes' );

		return $timestamp > $migration_status['lock'];
	}

	// Is the migration version less than the current version.
	return \version_compare( $migration_status['version'], \WPSEO_VERSION, '<' );
}