diff --git a/wp-admin/users.php b/wp-admin/users.php
index b112400491..c9be764e30 100644
--- a/wp-admin/users.php
+++ b/wp-admin/users.php
@@ -249,12 +249,28 @@ default:
meta_value);
+ foreach ( (array) $b_roles as $b_role => $val ) {
+ if ( !isset($avail_roles[$b_role]) )
+ $avail_roles[$b_role] = 0;
+ $avail_roles[$b_role]++;
+ }
+}
+
foreach ( $wp_roles->get_names() as $role => $name ) {
+ if ( !isset($avail_roles[$role]) )
+ continue;
+
$class = '';
if ( $role == $_GET['role'] )
$class = ' class="current"';
+ $name = sprintf(_c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$role]);
$role_links[] = "- " . $name . '';
}
$class = empty($_GET['role']) ? ' class="current"' : '';
@@ -304,18 +320,12 @@ unset($role_links);
- first_user && $wp_user_search->total_users_for_query <= 50 )
- printf(__('%3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query);
- else
- printf(__('%1$s – %2$s of %3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); ?>
-