[wp-trac] [WordPress Trac] #39635: Make insertion of generic dismissible notices in frontend code possible

WordPress Trac noreply at wordpress.org
Thu Jan 19 02:51:46 UTC 2017


#39635: Make insertion of generic dismissible notices in frontend code possible
-----------------------------+-----------------------------
 Reporter:  ccprog           |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Administration   |    Version:  4.7.1
 Severity:  normal           |   Keywords:
  Focuses:  ui, javascript   |
-----------------------------+-----------------------------
 As a plugin developer I want to employ dismissible notices on an admin
 screen. All is fine as long as I use the hook in server-side code to
 insert them on page load.

 But if I want to use them in frontend code (for example to notify users of
 Ajax events), the only way to access the initialisation code is to hijack
 one of the events in [source:trunk/src/wp-admin/js/common.js#L415
 common.js#L415] - with possibly heavy side effects.

 It would be easy to add a generic event like `wp-notice-added` that is not
 used by specific actions to make the live of developers easier.

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


More information about the wp-trac mailing list