WordPress.org

Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #40568, comment 21


Ignore:
Timestamp:
11/11/2020 07:47:17 PM (13 months ago)
Author:
johnjamesjacoby
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40568, comment 21

    v3 v4  
    1616If we think there will ever be a future need to have this always fire, now is the time to get that right.
    1717
    18 I also feel like `wp_error_checked` is not an obvious hook name for what this function is historically used for. I use it all over the place to make sure something is not a `WP_Error` and to take appropriate action if so. That means I may check the same object multiple times looking for multiple failures, because a single `WP_Error` object may contain multiple errors. See: [https://bbpress.trac.wordpress.org/browser/trunk/src/includes/core/functions.php#L276 bbPress].
     18I also feel like `wp_error_checked` is not an obvious hook name for what this function is historically used for. I use it all over the place to make sure something is not a `WP_Error` and to take appropriate action if so. I have never used this function with the intent of denoting a single instance of having checked for an error. That means I may check the same object multiple times looking for multiple failures, because a single `WP_Error` object may contain multiple errors. See: [https://bbpress.trac.wordpress.org/browser/trunk/src/includes/core/functions.php#L276 bbPress].