Add a `create_wp_error` action which is called when a `WP_Error` instance is created. Fixes #28319. Props ebinnion

Built from https://develop.svn.wordpress.org/trunk@29033


git-svn-id: http://core.svn.wordpress.org/trunk@28821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-07-08 18:47:15 +00:00
parent d543096d93
commit 1e681c1421
1 changed files with 9 additions and 0 deletions

View File

@ -63,6 +63,15 @@ class WP_Error {
if ( ! empty($data) ) if ( ! empty($data) )
$this->error_data[$code] = $data; $this->error_data[$code] = $data;
/**
* Fires when a WP_Error object instance is created.
*
* @since 4.0.0
*
* @param WP_Error $this The WP_Error instance.
*/
do_action( 'create_wp_error', $this );
} }
/** /**