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 |
---|---|
197 | * Fires when an error is added to a WP_Error object. |
198 | * |
199 | * @since 5.6.0 |
200 | * |
201 | * @param string|int $code Error code. |
202 | * @param string $message Error message. |
203 | * @param mixed $data Error data. Might be empty. |
204 | * @param WP_Error $wp_error The WP_Error object. |
205 | */ |
206 | do_action( 'wp_error_added', $code, $message, $data, $this ); |
207 | } |
208 |
|
209 | /** |
210 | * Adds data to an error with the given code. |
211 | * |
212 | * @since 2.1.0 |
213 | * @since 5.6.0 Errors can now contain more than one item of error data. {@see WP_Error::$additional_data}. |
214 | * |
215 | * @param mixed $data Error data. |