Make WordPress Core

Changes between Version 5 and Version 6 of Ticket #57791, comment 8


Ignore:
Timestamp:
02/24/2023 08:26:06 AM (12 months ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57791, comment 8

    v5 v6  
    5252''Escaping is handled in `wp_admin_notice()`.''
    5353
    54 However, 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 
    5654We could then take the conditions for `'updated' === $details['type']` and the `in_array()` check into `wp_admin_notice()`/`wp_get_admin_notice()` for consistency throughout Core.
    5755
    5856
    5957If that works for you, I can:
    60 - Add a third parameter, or a `wp_get_admin_notice()` function (whichever you prefer).
    6158- Add the two conditions to `wp_admin_notice()`.
    6259- (local-only) Implement the above in `settings_errors()` to check if there's any BC breaks/test failures.