WordPress.org

Make WordPress Core

Ticket #28319: 28319.2.diff

File 28319.2.diff, 539 bytes (added by ebinnion, 7 years ago)

Updated patch with hook docs. Previous update was incorrect.

  • wp-includes/class-wp-error.php

    diff --git a/wp-includes/class-wp-error.php b/wp-includes/class-wp-error.php
    index b048584..43f1032 100644
    a b public function __construct($code = '', $message = '', $data = '') { 
    6262
    6363                if ( ! empty($data) )
    6464                        $this->error_data[$code] = $data;
     65
     66                /**
     67                 * Fires at the end of creating a WP_Error object
     68                 *
     69                 * @since 4.0.0
     70                 *
     71                 * @param WP_Error $this The WP_Error instance.
     72                 */
     73                do_action( 'create_wp_error', $this );
    6574        }
    6675
    6776        /**