Yes, there is. You can use admin_menu hook to loop through menu items and add span with notification. There are two classes that WP uses for these notifications update-plugins and awaiting-mod. The second one looks more appropriate in this case, I guess…
Here’s some code:
function add_user_menu_notification() {
global $menu;
$user_count = count_users(); // get whatever count you need
$user_count = $user_count['avail_roles']['administrator'];
if ( $user_count ) {
foreach ( $menu as $key => $value ) {
if ( $menu[$key][2] == 'users.php' ) {
$menu[$key][0] .= ' <span class="awaiting-mod">' . $user_count . '</span>';
return;
}
}
}
}
add_action( 'admin_menu', 'add_user_menu_notification' );
Related Posts:
- How to check if a user is in a specific role?
- How to restrict dashboard access to Admins only?
- Admin Page Redirect
- Check if user is admin by user ID
- How to display the user that published a pending post?
- Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
- Add a button to users.php
- create users to site with specific language
- Display sortable User meta column in admin panel user’s page
- How to display multiple custom columns in the wp-admin users.php?
- Hooking into register_admin_color_schemes
- Removing user fields [duplicate]
- wp-admin edit user url wont show up correct url [closed]
- Users Unable to Access Dashboard/Posts/Pages
- Stop loading “collaborators” users on add new post or page?
- Distinguish profile user and admin user IDs / get ID of user being edited
- Uncheck the box “Send User Notification” by default on new-user.php
- Detecting all admins that are logged in
- Subscribers become Authors after Upgrade? / Mass Update of Users?
- Stopping user deletion from running on error
- Filter dropdown in users.php “delete user” bulk edit screen
- Users disappeared from wp-admin
- Logout USER form backoffice after 30 minutes of inactivity [closed]
- WP admin user search doesn’t return all users
- Hide username discovery
- How to get Role Subscribe Users on Admin Menu only in Pages in WordPress
- I accidentally deleted an admin user and all their content is now gone from the site. [closed]
- Restrict submitters from wp-admin [duplicate]
- Nickname field isn’t appearing in Admin
- How to allow WordPress updates to only one specific administrator?
- Is there a filter to edit html of user-edit.php
- Create new user from phpMyAdmin
- How do I make it so that the all users page is not a white screen?
- define two login page url
- Newly created user role not displaying on users screen
- How to check if a user is in a specific role?
- On Users (user.php) in wp-admin disable/hide “Bulk Actions” and “Change Role To”
- Login issue with subdomain installs
- Hook into form handle from admin users table
- restrict admin panel sections to users
- CSRF attack to create USER
- How to keep the plugin submenu open on viewing a custom version of users.php?
- Cannot login in WordPress even after changing hash password in phpmyadmin
- WordPress User profile page fields missing
- Anyone Can Register
- Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
- Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the “users search” input box
- Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box
- WordPress Users page missing user count next to different types of users
- Searching for a custom meta from user.php in the admin
- Can a user submit requests to wp-admin/admin.php without logging in?
- How do I Enqueue styles/scripts on Certain /wp-admin Pages?
- adding custom stylesheet to wp-admin
- Disable dragging of meta boxes?
- Toggle admin metabox based upon chosen page template
- Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?
- How to remove the core embed blocks in WordPress 5.6?
- How to order by post meta name in wp admin?
- How set defaults on wpLink()
- Remove dashboard, use Pages tab as default
- My wordpress site gets redirected automatically to the old site any known solution for this?
- Use a different domain for SSL
- How to list ALL Pages in the dashboard?
- Is there un-wp_autop function?
- Adding a menu item in the admin bar
- how to force caching of wordpress admin
- “leftover” notifications left on ever admin screen?
- Excerpt textarea missing on post editing page in admin panel
- How to disable 3.3 Tooltips?
- wp login redirects to homepage
- Dashboard links not working
- Resize Admin Featured Image Thumbnail in CPT Edit Screen
- Displaying which Role the current user is assigned to
- Retrieve Path of admin.php
- Registering jQuery kills admin functions
- Adding HTML/Text to Top of Subscriber’s Profile Backend Page
- submit for review issue
- wp-admin does not redirect to dashboard
- Change WP-Login or WP-Admin
- Custom roles showing HTML entities in title form field
- WordPress address URL keeps dropping the www
- How to show postmeta in custom columns for the posts screen?
- wp_nonce_url to users.php for deleting user not working
- How can I remove the user avatar from admin toolbar?
- List User order by ID in Descending order (Backend)
- How to stop – Database Update Required – from happening again?
- Moving wp-admin to a different to a subdomain
- using wp_sprintf at wordpress option page,
- Can’t login to Dashboard when changing site URL to HTTPS
- Not Found (404) error on admin page, CSS gone on blog
- MySQL CPU Usage Surge up When Multiple Post Editor Pages are open
- Remove All in One Pack from the admin bar
- The uploaded file exceeds!
- Admin table list API?
- How to change user admin_color with WP CLI?
- Having troubles connecting to WordPress login page using Mamp
- WP Admin/ WP Login Redirect to themselves
- Unable to log in to localhost wp-admin page on XAMPP server
- Remove or move admin submenus under a new menu
- Missing ‘Move to Trash’ option from bulk select box