-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The standard WP notice is nice, but not particularly inspiring. Some products want to use their own style of notification — that's branded or just more modern looking. Right now a callback can be used for the notice content without the wrapper to accomplish this, but it's more cumbersome to do. It would be cool to have a formal templating system!
I'm imagining something like the following:
AdminNotices::registerTemplate('pretty-template', PrettyTemplate::class)
AdminNotice->show('pretty-notice', 'Hello world!')
->template('pretty-template')This would keep the syntax nice and simple. It might be cool to also have:
AdminNotices::setDefaultTemplate('pretty-template');
AdminNotice::show('pretty-by-default', 'So pretty!');
AdminNotice::show('default', 'Using the default template')
->defaultTemplate();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels