- Author: Scott Reilly
- Version: 1.6
- First released: 2010-08-26
- Last update: 2021-11-03
- Compatibility: WP 4.6 – 5.8.4
- Download: [ zip ]
- Description:
Highlights the comments and plugins icons in the collapsed admin sidebar menu when notifications are pending.
-
Extended Description
In the WordPress admin, when the left sidebar menu is expanded WordPress presents you with a highlighted number within the menu itself indicating the number of pending comments (i.e. comments in moderation) and a separate number for the number of plugins with updates.
However, if you collapse the sidebar menu, then there are no visual indications that either types of updates are available. You can view the count of updated plugins by hovering on the plugins icon (or, for comments, by hovering on the comments icon), but you must manually do that to learn of updates.
This plugin enhances the sidebar menu to display a visual indication that comments are in moderation and/or there are plugin updates available. It does so by using a different-colored background for the icon (see the screenshot). The visual indication is also updated when AJAX-based requests are made (so doing an in-line approval of the last pending comment will cause the comments icon background color to return to its non-highlighted color).
By default, the plugin utilizes WordPress’s pending/update count background highlight color, which varies depending on the admin color scheme in use by the user.
NOTE: As the plugin’s name suggests, this plugin only takes effect if the admin sidebar menu is collapsed. Also, the admin user must have JavaScript enabled.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Find out more at the plugin’s WordPress Plugin Repository page.
-
Screenshots
Click to see full-size image.
-
Installation
- Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically
/wp-content/plugins/
). - Activate the plugin through the ‘Plugins’ admin menu in WordPress
- Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically
-
Release Log
1.6 (2021-10-22)
- New: Add support for other menu items that borrow the plugin count indicator markup for their own count indicator
- Fix: Change
__wakeup()
method visibility fromprivate
topublic
to avoid warnings under PHP8 - Fix: Throw an error when attempting to unserialize an instance of the class to actually prevent it from happening
- Change: Prevent potential JavaScript errors
- Change: Amend FAQ to also suggest and explain use of Add Admin CSS plugin to customize highlight color as an alternative to setting color via filter
- Change: Tweak installation instruction
- Change: Note compatibility through WP 5.8+
- Change: Reduce the number of plugin tags in readme.txt
- Change: Restructure unit test file structure
- Change: Restructure unit test directories
- Change: Move
phpunit/
intotests/phpunit/
- Change: Move
phpunit/bin/
intotests/
- Change: Move
- Change: Remove ‘test-‘ prefix from unit test file
- Change: In bootstrap, store path to plugin file constant
- Change: In bootstrap, add backcompat for PHPUnit pre-v6.0
- Change: Restructure unit test directories
- New: Add a few more possible TODO items
1.5.1 (2021-04-12)
- Change: Note compatibility through WP 5.7+
- Change: Update copyright date (2021)
1.5 (2020-09-01)
- Change: Rewrite JavaScript into vanilla JS and away from using jQuery
- Change: Add
$admin_color
as second arg toc2c_collapsed_admin_menu_icon_highlight_color
filter - Change: Remove check for theme support of HTML5 since that isn’t relevant to admin
- Change: Restructure unit test file structure
- New: Create new subdirectory
phpunit/
to house all files related to unit testing - Change: Move
bin/
tophpunit/bin/
- Change: Move
tests/bootstrap.php
tophpunit/
- Change: Move
tests/
tophpunit/tests/
- Change: Rename
phpunit.xml
tophpunit.xml.dist
per best practices
- New: Create new subdirectory
- Change: Note compatibility through WP 5.5+
- New: Add FAQ indicating presence of unit tests
- Unit tests:
- New: Add tests for filter
c2c_collapsed_admin_menu_icon_highlight_color
- New: Add test for default value for
get_bg_color()
- Change: Test that JS script is both enqueued and registered
- New: Add tests for filter
-
Copyright & Disclaimer
Copyright © 2010-2022 by Scott Reilly (aka coffee2code)This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -
Discussion / Support
Have any questions, comments, or suggestions? Please provide them via the plugin’s WordPress.org support forum. I’ll do my best to reply in a timely fashion and help as best I can.
Unfortunately, I cannot provide guaranteed support, nor do I provide support via any other means.
Was this plugin useful useful to you? Consider giving it a rating. If you’re inclined to give it a poor rating, please first post to the support forum to give me a chance to address or explain the situation.
One reply on “Notifications for Collapsed Admin Menu”
[…] Scott Reilly has once again created a simple plugin that solves a simple problem. It’s called Notifications For Collapsed Admin Menu. This plugin shows a visual notification by providing a background color on the comment and plugin […]