Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #57791, comment 8


Ignore:
Timestamp:
02/24/2023 08:22:21 AM (2 years ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57791, comment 8

    v3 v4  
    5252''Escaping is handled in `wp_admin_notice()`.''
    5353
     54However, this means that separate admin notices are output, so we might want to consider either a `(bool) $output = true` parameter for `wp_admin_notice()`, or put the main logic in a separate `wp_get_admin_notice()` function.
     55
    5456We could then take the conditions for `'updated' === $details['type']` and the `in_array()` check into `wp_admin_notice()` for consistency throughout Core.
    5557
     58
    5659If that works for you, I can:
     60- Add a third parameter, or a `wp_get_admin_notice()` function (whichever you prefer).
    5761- Add the two conditions to `wp_admin_notice()`.
    5862- (local-only) Implement the above in `settings_errors()` to check if there's any BC breaks/test failures.