Used By
Used By | Description |
---|---|
wp-login.php: login_header() | Output the login page header. |
Add an error or append additional message to an existing error.
(string|int) (Required) Error code.
(string) (Required) Error message.
(mixed) (Optional) Error data.
Default value: ''
File: wp-includes/class-wp-error.php
public function add( $code, $message, $data = '' ) { $this->errors[ $code ][] = $message; if ( ! empty( $data ) ) { $this->error_data[ $code ] = $data; } }
Version | Description |
---|---|
2.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_error/add