Yoast\WP\SEO\Config
Migration_Status::set_error
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() Migration Status::set error Yoast 26.9
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 );
}