WP_Error::remove()
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
. Ничего.
Использование
$WP_Error = new WP_Error(); $WP_Error->remove( $code );
- $code(строка|int) (обязательный)
- Error code.
Список изменений
С версии 4.1.0 | Введена. |
Код WP_Error::remove() WP Error::remove WP 6.1.1
public function remove( $code ) { unset( $this->errors[ $code ] ); unset( $this->error_data[ $code ] ); unset( $this->additional_data[ $code ] ); }