Releases: stellarwp/admin-notices
2.0.0
What's Changed
Greatly improved custom notice designs
In #9 the method for creating custom notices was overhauled. Previously, there were methods for adding and removing "wrappers", however this was confusing and problematic. The main problem was that the way notices were positioned ended up still applying default WP styles, which the notice then had to fight. The wrapper concept was dropped entirely, replaced with two methods:
AdminNotice::custom()
— tells the system this is a custom notice, which omits all standard styles and applies the necessary attributes to the custom markup providedAdminNotice::location()
— positions the notice on the page, using our own JS instead of relying on WP to position it. Note, by default the location is the standard notice location.
Conditionally enqueued scripts and stylesheets
In #10, we introduced a way for a notice to have a single script and stylesheet attached to it, such that those are loaded on the page only if the notice is set to display. This is handy as it takes all the fancy conditions this library introduced into consideration, avoiding unnecessary scripts and stylesheets.
AdminNotice::enqueueScript()
— adds a JS script to be included when the notice displaysAdminNotice::enqueueStylesheet
— adds a CSS stylesheet to be included when the notice displays
More information on all the new methods can be found in the updated README.
Breaking Changes
As mentioned, version 1.x used the idea of "wrappers" and such for trying to make custom notices. If you used the wrapper methods, this will break for you. You will need to update to using the new custom notice methods as part of updating.
Note: Standard notices should continue to work just fine and should be backwards-compatible.
Full Changelog: 1.2.2...2.0.0
1.2.2
1.2.1
1.2.0
What's Changed
- Feature: Adds ability to set a notice as 'inline' by @stratease in #2
- Feature: adds support for alternate WP styles by @JasonTheAdams in #3
New Contributors
- @stratease made their first contribution in #2
Full Changelog: 1.1.0...1.2.0
1.1.0
What's Changed
- Refactor: use namespacing in JS and persistence by @JasonTheAdams in #1
New Contributors
- @JasonTheAdams made their first contribution in #1
Full Changelog: 1.0.2...1.1.0
1.0.2
Full Changelog: 1.0.1...1.0.2
- Fix: JS file versioning is switched to
filemtime
as Strauss removes thecomposer.json
file 4150935
1.0.1
Initial public release! 🎉