[wp-trac] [WordPress Trac] #62087: Add `inline` support to the new `wp_get_admin_notice()` function

WordPress Trac noreply at wordpress.org
Fri Sep 20 08:17:20 UTC 2024


#62087: Add `inline` support to the new `wp_get_admin_notice()` function
-------------------------+-----------------------------
 Reporter:  Clorith      |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  6.4
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The introduction of `wp_get_admin_notice()` is a good move to unify how
 admin notices are generated, and makes it easier down the road to change
 these as needed.

 One element that is currently missing, although it ''can'' be added using
 the `additional_classes` argument, is the `inline` reference.

 Admin notices will by default always be moved, by JavaScript, to
 immediately follow the `h1` tag of a page, but adding the `inline` class
 will leave it in the position it is generated. This exists as there are
 various cases where the admin notice markup is used by plugins, themes,
 and core to bring emphasis to a notice or warning that is context aware.

 Since the function is intended to generate the markup and return it, this
 should ideally be an explicit boolean value introduced to the function as
 well for ease of use, and to bring awareness.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62087>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list