Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_error_added

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

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.