WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/06/2008 09:56:29 PM (13 years ago)
Author:
azaozz
Message:

Implementing new design for Edit Posts, Comments, etc. lists, props mdawaffe, see #8083

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r9545 r9556  
    266266$avail_roles = array();
    267267$users_of_blog = get_users_of_blog();
     268$total_users = count( $users_of_blog );
    268269foreach ( (array) $users_of_blog as $b_user ) {
    269270    $b_roles = unserialize($b_user->meta_value);
     
    278279$current_role = false;
    279280$class = empty($role) ? ' class="current"' : '';
    280 $role_links[] = "<li><a href=\"users.php\"$class>" . __('All Users') . "</a>";
     281$role_links[] = "<li><a href='users.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users ), number_format_i18n( $total_users ) ) . '</a>';
    281282foreach ( $wp_roles->get_names() as $this_role => $name ) {
    282283    if ( !isset($avail_roles[$this_role]) )
     
    291292
    292293    $name = translate_with_context($name);
    293     $name = sprintf(_c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$this_role]);
    294     $role_links[] = "<li><a href=\"users.php?role=$this_role\"$class>" . $name . '</a>';
    295 }
    296 echo implode(' |</li>', $role_links) . '</li>';
     294    $name = sprintf( _c('%1$s <span class="count">(%2$s)</span>|user role with count'), $name, $avail_roles[$this_role] );
     295    $role_links[] = "<li><a href='users.php?role=$this_role'$class>$name</a>";
     296}
     297echo implode( " |</li>\n", $role_links) . '</li>';
    297298unset($role_links);
    298299?>
Note: See TracChangeset for help on using the changeset viewer.