WP_Error::remove( string|int $code )
Removes the specified error.
Description
This function removes all error messages associated with the specified error code, along with any error data for that code.
Parameters
- $code
-
(string|int) (Required) Error code.
Source
File: wp-includes/class-wp-error.php
public function remove( $code ) { unset( $this->errors[ $code ] ); unset( $this->error_data[ $code ] ); unset( $this->additional_data[ $code ] ); }
Changelog
Version | Description |
---|---|
4.1.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_error/remove