WordPress.org

Make WordPress Core

Opened 17 months ago

#39635 new feature request

Make insertion of generic dismissible notices in frontend code possible

Reported by: ccprog Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.1
Component: Administration Keywords:
Focuses: ui, javascript Cc:

Description

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 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.

Change History (0)

Note: See TracTickets for help on using tickets.