diff --git a/wp-includes/class-wp-error.php b/wp-includes/class-wp-error.php index 2e384d0fe2..c73e22b794 100644 --- a/wp-includes/class-wp-error.php +++ b/wp-includes/class-wp-error.php @@ -63,6 +63,15 @@ class WP_Error { if ( ! empty($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 ); } /**