I’ve mixed feelings about the WordPress admin bar, but that has to do with how third-party solutions add their options to it (plus, it can be disabled if you’re not a big fan of it).
Recently, I published a small plugin – meant primarily for developers – that allows users to toggle admin notices whenever they are working with WordPress (ideally in their local environment, though it can be installed anywhere WordPress is installed).

The plugin is simple:
- It introduces an item into the WP admin bar,
- When you click on an item, it will toggle any notices or messages that are displayed,
- When you click on it again, it will toggle their visibility.
But there’s a small nuance that I think is worth covering and that has to do with manipulating the WP admin bar styles using client-side code.
All of this is covered in the initial post, but one aspect of the code that I think is worth sharing for those working with the admin bar and those working with JavaScript.




