{"id":10324,"date":"2010-08-26T17:51:11","date_gmt":"2010-08-26T17:51:11","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/notifications-for-collapsed-admin-menu\/"},"modified":"2025-04-17T19:47:23","modified_gmt":"2025-04-17T19:47:23","slug":"notifications-for-collapsed-admin-menu","status":"publish","type":"plugin","link":"https:\/\/tir.wordpress.org\/plugins\/notifications-for-collapsed-admin-menu\/","author":3606,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.7","stable_tag":"1.7","tested":"6.8.5","requires":"4.6","requires_php":"","requires_plugins":null,"header_name":"Notifications for Collapsed Admin Menu","header_author":"Scott Reilly","header_description":"","assets_banners_color":"f2f2f2","last_updated":"2025-04-17 19:47:23","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=6ARCFJ9TX3522","header_plugin_uri":"https:\/\/coffee2code.com\/wp-plugins\/notifications-for-collapsed-admin-menu\/","header_author_uri":"https:\/\/coffee2code.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":5049,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"coffee2code","date":"2010-08-26 17:51:11"},"1.0.1":{"tag":"1.0.1","author":"coffee2code","date":"2011-02-17 18:42:52"},"1.1":{"tag":"1.1","author":"coffee2code","date":"2011-07-03 21:29:09"},"1.1.1":{"tag":"1.1.1","author":"coffee2code","date":"2011-12-13 21:44:34"},"1.1.2":{"tag":"1.1.2","author":"coffee2code","date":"2012-06-05 18:40:51"},"1.1.3":{"tag":"1.1.3","author":"coffee2code","date":"2012-12-16 07:55:45"},"1.2":{"tag":"1.2","author":"coffee2code","date":"2013-12-18 22:48:24"},"1.2.1":{"tag":"1.2.1","author":"coffee2code","date":"2015-08-30 05:28:04"},"1.2.2":{"tag":"1.2.2","author":"coffee2code","date":"2016-04-14 07:17:08"},"1.3":{"tag":"1.3","author":"coffee2code","date":"2017-03-06 09:20:22"},"1.3.1":{"tag":"1.3.1","author":"coffee2code","date":"2018-06-16 07:27:14"},"1.3.2":{"tag":"1.3.2","author":"coffee2code","date":"2019-03-07 18:42:32"},"1.4":{"tag":"1.4","author":"coffee2code","date":"2019-12-15 07:59:21"},"1.4.1":{"tag":"1.4.1","author":"coffee2code","date":"2020-05-27 06:40:33"},"1.5":{"tag":"1.5","author":"coffee2code","date":"2020-09-03 07:36:16"},"1.5.1":{"tag":"1.5.1","author":"coffee2code","date":"2021-04-13 07:06:13"},"1.6":{"tag":"1.6","author":"coffee2code","date":"2021-11-03 06:46:59"},"1.6.1":{"tag":"1.6.1","author":"coffee2code","date":"2023-08-15 23:03:47"},"1.6.2":{"tag":"1.6.2","author":"coffee2code","date":"2024-08-26 20:04:49"},"1.7":{"tag":"1.7","author":"coffee2code","date":"2025-04-17 19:47:23"}},"upgrade_notice":{"1.7":"<p>Minor update: ensured translated strings don&#039;t contain unintended markup, discontinued explicit loading of textdomain, noted compatibility through WP 6.8+ and PHP 8.3+, and updated copyright date (2025).<\/p>","1.6.2":"<p>Trivial update: noted compatibility through WP 6.6+, removed unit tests from release packaging, and updated copyright date (2024)<\/p>","1.6.1":"<p>Trivial update: noted compatibility through WP 6.3+, updated unit tests to run against latest WordPress, and updated copyright date (2023)<\/p>","1.6":"<p>Minor update: added support for other menu items that may have a count indicator, prevented potential JS errors, noted compatibility through WP 5.8+, and minor reorganization and tweaks to unit tests<\/p>","1.5.1":"<p>Trivial update: noted compatibility through WP 5.7+ and updated copyright date (2021)<\/p>","1.5":"<p>Minor update: Rewrote all JavaScript to use vanilla JS instead of jQuery, restructured the unit test file structure, noted compatibility through WP 5.5+, and a few behind-the-scenes changes.<\/p>","1.4.1":"<p>Trivial update: Added TODO.md file, updated a few URLs to be HTTPS, and noted compatibility through WP 5.4+<\/p>","1.4":"<p>Minor update: added HTML5 compliance when supported by the theme, introduced unit tests, created CHANGELOG.md to store historical changelog outside of readme.txt, noted compatibility through WP 5.3+, and updated copyright date (2020)<\/p>","1.3.2":"<p>Trivial update: aded more inline documentation, noted compatibility through WP 5.1+, updated copyright date (2019)<\/p>","1.3.1":"<p>Trivial update: noted compatibility through WP 4.9+, added README.md for GitHub, and updated copyright date (2018)<\/p>","1.3":"<p>Minor update: noted compatibility through WP 4.7+, dropped compatibility with version of WP older than 4.6, updated copyright date (2017), and other minor back-end tweaks<\/p>","1.2.2":"<p>Trivial update: noted compatibility through WP 4.4+ and updated copyright date (2016)<\/p>","1.2.1":"<p>Trivial update: noted compatibility through WP 4.1+ and updated copyright date (2015)<\/p>","1.2":"<p>Minor update: better background color defaults under WP 3.8; updated banner and screenshot images; noted compatibility through WP 3.8+<\/p>","1.1.3":"<p>Trivial update: noted compatibility through WP 3.5+<\/p>","1.1.2":"<p>Trivial update: noted compatibility through WP 3.4+; explicitly stated license<\/p>","1.1.1":"<p>Trivial update: noted compatibility through WP 3.3+ and minor tweaks (not related to functionality)<\/p>","1.1":"<p>Minor update: added admin color scheme-specific color defaults; noted compatibility through WP 3.2+<\/p>","1.0.1":"<p>Minor update: minor bugfix, noted compatibility with WP 3.1+, and updated copyright date.<\/p>","1.0":"<p>Official initial release!<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1100016,"resolution":"128x128","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":825103,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.1","1.1.1","1.1.2","1.1.3","1.2","1.2.1","1.2.2","1.3","1.3.1","1.3.2","1.4","1.4.1","1.5","1.5.1","1.6","1.6.1","1.6.2","1.7"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":1340410,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"A comparison of a collapsed admin sidebar menu for a stock WordPress installation, with the plugin activated under WP 2.8+\/2.9+, and under WP 3.x+ and WP 4.x+."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,2758,1865,1756,4906],"plugin_category":[43,44],"plugin_contributors":[78189],"plugin_business_model":[],"class_list":["post-10324","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-coffee2code","plugin_tags-menu","plugin_tags-moderation","plugin_tags-notifications","plugin_category-customization","plugin_category-discussion-and-community","plugin_contributors-coffee2code","plugin_committers-coffee2code"],"banners":{"banner":"https:\/\/ps.w.org\/notifications-for-collapsed-admin-menu\/assets\/banner-772x250.png?rev=825103","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/notifications-for-collapsed-admin-menu\/assets\/icon-128x128.png?rev=1100016","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/notifications-for-collapsed-admin-menu\/assets\/screenshot-1.png?rev=1340410","caption":"A comparison of a collapsed admin sidebar menu for a stock WordPress installation, with the plugin activated under WP 2.8+\/2.9+, and under WP 3.x+ and WP 4.x+."}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>However, if you collapse the sidebar menu, then there are <em>no<\/em> 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.<\/p>\n\n<p>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).<\/p>\n\n<p>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.<\/p>\n\n<p><em>NOTE:<\/em> 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.<\/p>\n\n<p>Links: <a href=\"https:\/\/coffee2code.com\/wp-plugins\/notifications-for-collapsed-admin-menu\/\">Plugin Homepage<\/a> | <a href=\"https:\/\/wordpress.org\/plugins\/notifications-for-collapsed-admin-menu\/\">Plugin Directory Page<\/a> | <a href=\"https:\/\/github.com\/coffee2code\/notifications-for-collapsed-admin-menu\/\">GitHub<\/a> | <a href=\"https:\/\/coffee2code.com\">Author Homepage<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically <code>\/wp-content\/plugins\/<\/code>).<\/li>\n<li>Activate the plugin through the 'Plugins' admin menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='why%20doesn%27t%20this%20plugin%20apply%20when%20the%20admin%20sidebar%20menu%20is%20expanded%3F'><h3>Why doesn't this plugin apply when the admin sidebar menu is expanded?<\/h3><\/dt>\n<dd><p>There is no need for this plugin to do anything in this situation because WordPress already presents a visible count of pending comments and plugins with updates.<\/p><\/dd>\n<dt id='can%20i%20change%20the%20background%20color%20used%20to%20highlight%20the%20comments%2Fplugins%20icons%3F'><h3>Can I change the background color used to highlight the comments\/plugins icons?<\/h3><\/dt>\n<dd><p>Yes. You can customize the background color used by applying a filter to 'c2c_collapsed_admin_menu_icon_highlight_color'. For example, in your theme's functions.php file, you can add this line (but replace \"#9932CC\" with the color you want):<\/p>\n\n<pre><code>add_filter( 'c2c_collapsed_admin_menu_icon_highlight_color', function( $color ) { return \"#9932CC\"; } );\n<\/code><\/pre>\n\n<p>Or, you can make use of my <a href=\"https:\/\/wordpress.org\/plugins\/add-admin-css\/\">Add Admin CSS<\/a> plugin to define CSS to override the background color using this snippet of CSS (once again, replace \"#9932CC\" with the color you want):<\/p>\n\n<pre><code>\/* Override the highlight color used by the plugin Notifications for Collapsed Admin Menu. *\/\n:root {\n  --collapsed-admin-icon-highlight-color: #9932CC;\n}\n.folded #adminmenu li.collapsed-with-pending {\n    background-color: var(--collapsed-admin-icon-highlight-color);\n    border-left-color: var(--collapsed-admin-icon-highlight-color);\n    border-right-color: var(--collapsed-admin-icon-highlight-color);\n}\n<\/code><\/pre><\/dd>\n<dt id='does%20this%20plugin%20have%20unit%20tests%3F'><h3>Does this plugin have unit tests?<\/h3><\/dt>\n<dd><p>Yes. The tests are not packaged in the release .zip file or included in plugins.svn.wordpress.org, but can be found in the <a href=\"https:\/\/github.com\/coffee2code\/notifications-for-collapsed-admin-menu\/\">plugin's GitHub repository<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.7 (2025-04-17)<\/h4>\n\n<ul>\n<li>Hardening: Escape filtered and translated data before output<\/li>\n<li>Change: Discontinue unnecessary explicit loading of textdomain<\/li>\n<li>Change: Build string via concatenation rather than using HEREDOC syntax<\/li>\n<li>Change: Note compatibility through WP 6.8+<\/li>\n<li>Change: Note compatibility through PHP 8.3+<\/li>\n<li>Change: Update copyright date (2025)<\/li>\n<li>Unit tests:\n\n<ul>\n<li>Change: Explicitly define return type for overridden method<\/li>\n<li>Change: Use <code>expectException()<\/code> instead of <code>@expectedException<\/code> comment (for PHPUnit 9 support)<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>1.6.2 (2024-08-21)<\/h4>\n\n<ul>\n<li>Fix: Fix formatting of code in <code>readme.txt<\/code><\/li>\n<li>Change: Note compatibility through WP 6.6+<\/li>\n<li>Change: Update copyright date (2024)<\/li>\n<li>Change: Reduce number of 'Tags' from <code>readme.txt<\/code><\/li>\n<li>Change: Remove development and testing-related files from release packaging<\/li>\n<li>Unit tests:\n\n<ul>\n<li>Hardening: Prevent direct web access to <code>bootstrap.php<\/code><\/li>\n<li>Change: In bootstrap, store path to plugin directory in a constant<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>1.6.1 (2023-06-06)<\/h4>\n\n<ul>\n<li>Change: Note compatibility through WP 6.3+<\/li>\n<li>Change: Update copyright date (2023)<\/li>\n<li>New: Add <code>.gitignore<\/code> file<\/li>\n<li>Unit tests:\n\n<ul>\n<li>Allow tests to run against current versions of WordPress<\/li>\n<li>New: Add <code>composer.json<\/code> for PHPUnit Polyfill dependency<\/li>\n<li>Change: Prevent PHP warnings due to missing core-related generated files<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p><em>Full changelog is available in <a href=\"https:\/\/github.com\/coffee2code\/notifications-for-collapsed-admin-menu\/blob\/master\/CHANGELOG.md\">CHANGELOG.md<\/a>.<\/em><\/p>","raw_excerpt":"Highlights the comments and plugins icons in the collapsed admin sidebar menu when notifications are pending.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/10324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"author":[{"embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/users\/3606"}],"replies":[{"embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=10324"}],"wp:attachment":[{"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=10324"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=10324"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=10324"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=10324"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=10324"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tir.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=10324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}