Yoast\WP\SEO\Config

Migration_Status::set_error()publicYoast 1.0

Sets an error for the migration.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$Migration_Status = new Migration_Status();
$Migration_Status->set_error( $name, $message, $version );
$name(строка) (обязательный)
The name of the migration.
$message(строка) (обязательный)
Message explaining the reason for the error.
$version(строка)
The current version.
По умолчанию: \WPSEO_VERSION

Код Migration_Status::set_error() Yoast 22.4

public function set_error( $name, $message, $version = \WPSEO_VERSION ) {
	$migration_status = $this->get_migration_status( $name );

	$migration_status['error'] = [
		'time'    => \strtotime( 'now' ),
		'version' => $version,
		'message' => $message,
	];

	$this->set_migration_status( $name, $migration_status );
}