[wp-trac] [WordPress Trac] #40568: Add an action in WP_Error::add()

WordPress Trac noreply at wordpress.org
Wed Nov 11 19:33:20 UTC 2020


#40568: Add an action in WP_Error::add()
------------------------------------+--------------------------
 Reporter:  Shelob9                 |       Owner:  johnbillion
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  5.6
Component:  General                 |     Version:  2.1
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+--------------------------

Comment (by johnjamesjacoby):

 I'm just seeing this for the first time, and I find it odd that the
 `wp_error_checked` action only fires when `$thing` is an error. This means
 there is no way to know via this action if something was error-checked and
 it was not an error.

 If I call `is_wp_error( $thing )` and it's not an instance of `WP_Error`,
 how will I ever know it was checked?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40568#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list