Make WordPress Core

Opened 7 years ago

Last modified 4 years ago

#39635 new feature request

Make insertion of generic dismissible notices in frontend code possible

Reported by: ccprog's profile 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 (1)

#1 @valentinbora
4 years ago

Thank you @ccprog for your ticket and sorry for the long delay in our response.

Exciting things are on the radar now regarding notifications. If you have time, please take a look at #43484 and share your thoughts and feedback.

Note: See TracTickets for help on using tickets.