WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
198 | * Fires when an error is added to a WP_Error object. |
199 | * |
200 | * @since 5.6.0 |
201 | * |
202 | * @param string|int $code Error code. |
203 | * @param string $message Error message. |
204 | * @param mixed $data Error data. Might be empty. |
205 | * @param WP_Error $wp_error The WP_Error object. |
206 | */ |
207 | do_action( 'wp_error_added', $code, $message, $data, $this ); |
208 | } |
209 |
|
210 | /** |
211 | * Adds data to an error with the given code. |
212 | * |
213 | * @since 2.1.0 |
214 | * @since 5.6.0 Errors can now contain more than one item of error data. {@see WP_Error::$additional_data}. |
215 | * |
216 | * @param mixed $data Error data. |