[wp-trac] [WordPress Trac] #62139: Broaden use of `addAdminNotice()`

WordPress Trac noreply at wordpress.org
Mon Sep 30 16:59:48 UTC 2024


#62139: Broaden use of `addAdminNotice()`
-------------------------+-------------------------
 Reporter:  joedolson    |      Owner:  (none)
     Type:  enhancement  |     Status:  assigned
 Priority:  normal       |  Milestone:  6.8
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-------------------------
 #58479 added `addAdminNotice()` to `common.js` in order to display an on-
 demand notice with bulk editing. This function is largely duplicating
 `wp.updates.addAdminNotice()`, and `updates.js` has `common.js` as a
 dependency.

 We should abstract the new function and update
 `wp.updates.addAdminNotice()` to pass arguments into the new function.
 We'll then be able to use `addAdminNotice()` as a general mechanism in
 core to insert JS driven notices.

 See comments at https://core.trac.wordpress.org/ticket/58479#comment:42,
 see #57791 for PHP equivalent.

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


More information about the wp-trac mailing list