WP_Error::remove()publicWP 4.1.0

Removes the specified error.

This function removes all error messages associated with the specified error code, along with any error data for that code.

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

Хуков нет.

Возвращает

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

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

$WP_Error = new WP_Error();
$WP_Error->remove( $code );
$code(строка|int) (обязательный)
Error code.

Список изменений

С версии 4.1.0 Введена.

Код WP_Error::remove() WP 6.5.2

public function remove( $code ) {
	unset( $this->errors[ $code ] );
	unset( $this->error_data[ $code ] );
	unset( $this->additional_data[ $code ] );
}