The Quest For a Centralized WordPress Notifications Center

Based on the number of comments we received on WordPress admin notices being abused, it’s clear that a number of you feel the same way I do. Thanks to the healthy discussion that took place, I learned several new things about admin notices I’d like to share with you.

Themes Do it Too

While the crux of the article focuses on plugins being the largest offender, the issue also applies to themes hosted in and outside of the WordPress theme directory. In one of the more extreme examples I discovered, earlier this year, Redux Framework added an admin notice that informed users of a new commercial extension.

When users questioned how to remove the notices, Redux Framework developers responded by creating a commercial extension.

Redux Framework Admin Notice
Redux Framework Admin Notice

For $59 a year, the extension removes admin notices, ads from the options panel, and the dashboard news widget. Even though the notices and ads are only displayed when the framework’s dev mode is enabled, it seems like a ridiculous way to generate revenue.

While researching for this article, I discovered that Dovy Paukstys, Co-Founder and lead developer of Redux Framework, is in the process of removing advertising from current and future admin notices. Paukstys provided the Tavern with the following statement:

As a fellow developer, I can see how frustrating an admin notice can be when used as an ad. To support the requests of the community, we will no longer use admin notices to advertise premium features. We will use admin notices for their intended purpose, to inform and educate our users.

We hope that other frameworks, plugins, and products will follow suit.

WP Notification Center

Inspired by our article, WPBeginner looks into whether or not WordPress needs a notification center. As it turns out, there are a couple of different plugins and projects in the works aiming to solve this problem.

The WP Notification Center plugin, developed by Barry Kooij and Never5, adds a notification center to WordPress. This plugin moves admin notices to a central location freeing up valuable screen real-estate.

WP Notification Center
WP Notification Center

When activated, a notifications area is added to the admin bar. This tells you the number of notices available and provides quick viewing access. The messages are also color coded to easily tell the difference between update and error messages.

Links within the notice take you to the corresponding admin page to view more details. Unfortunately, you can’t dismiss notices from the admin toolbar without navigating to the links within them. According to Kooij, dismissing notices is a difficult problem to fix.

The admin notices are added in code so I can’t stop them from being added. That means I would need to store what notices are dismissed and check all added notices on every admin page load to filter out the ones that are dismissed.

It’s the other way around from an ideal situation, where a notice would be added to the database and I can simply remove it when it’s dismissed.

As for the possibility of getting WP Notification Center into core, “I would love to write a patch for core that would set this up the right way,” Kooij said. “That would eventually involve deprecating and stop displaying notifications that are being added the old way.”

If you’re interested in tackling this problem or would like to contribute to other facets of the project, you can find it on GitHub where issues and pull requests are welcomed.

WordPress Notifications API

During the WordPress Core developer chat back in January, John Blackbourn proposed a Notifications API that would replace wp_mail() with an extensible API. The API could be hooked into by developers to send notifications via webhooks that would enable Slack and IM notifications. There would also be UI added so users and admins can choose which individual notifications and types to opt-in/out of.

The API is not directly relevant to admin notices but it’s possible they could be connected in the future. Blackbourn plans to publish a detailed blog post outlining the idea in-depth within the next week or two.

Jetpack Notifications

Jetpack handles notifications via a module that adds an icon to the toolbar. Notifications include, Likes, Comments, Follows, and the ability to moderate and reply to comments.

Jetpack Notifications
Jetpack Notifications

I use this notifications area all the time to moderate and respond to comments. It’s convenient and usually loads items quickly. However, I’m not sure how well the interface would work if admin notices from themes and plugins were added.

Subscribers Can Possibly See Admin Notices

One of the most surprising things I’ve learned is that users who are subscribers can possibly see admin notices. On the surface, this doesn’t make sense as subscribers don’t have the capabilities necessary to act on notices. I tested this theory on the WP Tavern test site by activating both Yoast SEO and the All in One SEO plugin.

This is what I see while logged in as an admin.

Admin Notices While Logged in as Admin
Admin Notices While Logged in as Admin

This is the same dashboard while logged in as a subscriber.

Admin Notices While Logged in as A Subscriber
Admin Notices While Logged in as A Subscriber

As you can see, the notices disappear when logged in as a subscriber. While I initially thought this was an issue in core, it appears to be more of a developer issue. JS Morisset, who commented on the original article has a possible explanation:

The word ‘admin’ (for notices) could be interpreted in two ways — either they’re admin / back-end notices, or they’re administrator notices.

I’ve always understood that they are the former (notices displayed on the admin back-end), and can be seen by any / all back-end users, so I use ‘current_user_can()’ in my own code to display different kinds of messages. Maybe this is more of a developer awareness issue than a core WP issue.

While I have not analyzed the code in the plugins I tested, the current_user_can() capability check would explain why admins see notices while subscribers do not.

What I’d Like to See in a Centralized WordPress Notifications Center

Admin notices are a great way for developers to inform users of important information. But with all the notices bombarding site administrators these days, there’s a need for an organizational user interface to manage them all. When considering the types of notifications to allow and display, a notification center in WordPress can easily turn into a deep rabbit hole.

What I’d like to see is a notification center that notifies me of core, plugin, and theme updates in addition to whatever notices those items generate. I also want it to tell me about errors on the site. These notifications should be in an easy-to-use interface that’s quick to access. Notifications should be dismissable or have a status where they can be marked as read.

As seen above, there are plenty of people and projects working on solutions to this problem. What would be your ideal WordPress notifications center?

18

18 responses to “The Quest For a Centralized WordPress Notifications Center”

  1. Great post, Jeff. Very thorough and detailed. Love reading your posts. Very informative.

    I don’t have any specific notification center ideas outside of the ones you propose.

    My problem is, I’m building a WordPress Multisite network with WPMUDEV plugins and I need to make sure that all blog owners do not see WordPress updates in their individual site admins. Something I’m looking at and asking the WPMUDEV folks if they have a solution for it. It’s not actually a problem just yet. Just anticipating it might be as I do more product dev on this project.

  2. I think a centralized notification area is a great idea. Like you stated, it would free up the user from having to click in different areas to turn them off.

    I think a great area to put this in would be by the help button, possibly right next to it. If there are any notifications, then the button would change color, prompting the user to click on it, opening the area, listing any notifications.

  3. Thanks for the follow-up. It seems that YOAST made some adjustments in recent versions regarding their notices and I now get fewer and they don’t display at subscribers’ screens anymore.

    I thus deleted the code in functions.php that was hiding all of them. Surprisingly, the warning about hypothetical conflict with other plugins, such as Google XML Sitemaps, also disappeared for my own dashboard.

  4. Hello Jeff Chandler,

    A centralized WordPress notification center sounds like an acceptable idea to me, thank you for starting a discussion about this, and thank you for featuring me in one of your screenshots; I guess that I can now say that I was Featured On WP Tavern :D , my 15 minutes of fame, hehehe. ;)

    -John Jr

  5. I am totally NOT okay with what Redux framework is doing. I would argue to disallow the framework for Themes hosted in the official directory, if the framework is hiding ad removal behind a commercial paywall.

    At the very least, if anyone wants it, I’ll release a free Plugin that removes the ads from Redux framework.

    • Use a plugin to hide crap is like put shit under the carpet. People who are not satisfied with plugin/theme should not use it and support that. Change for something that fit a needs more.

      There are many helpful plugins/themes without junk.
      There is no one reason why to stick with Yoast, W3Cache, monster, hipster and things like that.

      Why anybody thing that if the developer put crap in front of your face, that he use something different inside of that code/service/communication.

  6. I was kinda thrown off when the second paragraph is titled “Themes Do It Too” then jumped straight in to the Redux Framework which is not a theme!

    At the TRT we take axception to notices generated by a theme in that they are limited to a specific location and are dismisable. The problem I’ve noticed with some themes is that the dang thing keeps popping up every now and then no matter how many times you dismiss it.

    If I was to make the decision on the matter I would push for no “Notices” period! Have pointers/information for your product? Put a single link to your site where the user can get the information they need.

    Putting/shifting these notices to a designated “Center” will soon become a “mess”.

  7. I (think I) prefer how admin notices currently work because they give direct (important) feedback to users.

    It sounds to me that the most important reason one would prefer a notification center is because some developers misuse/abuse this important feature and are in need of some kind of notification spam box?

    I wonder if such notification center would increase the number of support tickets because users missed the notifications?

    I would rather like to see that plugin authors stop (or are made to stop) with this unwanted practice.

    Maybe it should be possible for a user to mark a notification as spam and block any notifications from the offending plugin from that moment on? In that case there must be a way for the user to find out which plugin is spamming them. Maybe in that case the spammy notification should become visible in some kind of spam box and of course there should be a way to unblock a plugin (maybe always after an update)?

    Just some ideas … I am clearly not 100% sure what would be the best solution …

  8. Great idea! Admin notices are very over-used and really take over the WordPress admin. Theme and plugin authors think their theme or plugin is the most important thing in your life, but they’re not in a position to judge. Even a seemingly important notice, for example one that appears when you activate the theme or plugin, can end up being irrelevant – e.g. it may have been intended for people to see when they first activate the theme or plugin, but end up annoying people who are just temporarily disabling things for testing purposes. A central notifications center would even out the playing field and stop plugin authors from competing to have the most prominent notice. It would bring the admin back to what it should be – a place to edit and maintain your WordPress website, not somewhere to be distracted with unimportant clutter.

  9. Jeff,

    This was an amazing post. I listened in about this on the podcast that you and Marcus released. I just installed the wp notifications center plugin and immediately it grabbed those nagging updates and notifications and put them exactly where they need to be.

    However, I do wish that there was a way to limit or exclude those notifications from even appearing. Certainly something that both plugin and theme developers should include in their plugins and themes to be able to turn off.

    Thanks for bringing this to the forefront. I will be installing this plugin on all of my client’s sites.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Discover more from WP Tavern

Subscribe now to keep reading and get access to the full archive.

Continue reading