- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-users-list-table.php
r45407 r45926 195 195 196 196 $role_links = array(); 197 $role_links['all'] = "<a href='$url'$current_link_attributes>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>'; 197 $role_links['all'] = sprintf( 198 '<a href="%s"%s>%s</a>', 199 $url, 200 $current_link_attributes, 201 sprintf( 202 /* translators: %s: number of users */ 203 _nx( 204 'All <span class="count">(%s)</span>', 205 'All <span class="count">(%s)</span>', 206 $total_users, 207 'users' 208 ), 209 number_format_i18n( $total_users ) 210 ) 211 ); 212 198 213 foreach ( $wp_roles->get_names() as $this_role => $name ) { 199 214 if ( ! isset( $avail_roles[ $this_role ] ) ) { … … 464 479 465 480 // Set up the checkbox ( because the user is editable, otherwise it's empty ) 466 $checkbox = '<label class="screen-reader-text" for="user_' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>' 467 . "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='{$role_classes}' value='{$user_object->ID}' />"; 481 $checkbox = sprintf( 482 '<label class="screen-reader-text" for="user_%1$s">%2$s</label>' . 483 '<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />', 484 $user_object->ID, 485 /* translators: %s: user login */ 486 sprintf( __( 'Select %s' ), $user_object->user_login ), 487 $role_classes 488 ); 468 489 469 490 } else { 470 491 $edit = "<strong>{$user_object->user_login}{$super_admin}</strong>"; 471 492 } 493 472 494 $avatar = get_avatar( $user_object->ID, 32 ); 473 495 … … 512 534 $r .= $user_object->last_name; 513 535 } else { 514 $r .= '<span aria-hidden="true">—</span><span class="screen-reader-text">' . _x( 'Unknown', 'name' ) . '</span>'; 536 $r .= sprintf( 537 '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>', 538 _x( 'Unknown', 'name' ) 539 ); 515 540 } 516 541 break; … … 523 548 case 'posts': 524 549 if ( $numposts > 0 ) { 525 $r .= "<a href='edit.php?author=$user_object->ID' class='edit'>"; 526 $r .= '<span aria-hidden="true">' . $numposts . '</span>'; 527 $r .= '<span class="screen-reader-text">' . sprintf( _n( '%s post by this author', '%s posts by this author', $numposts ), number_format_i18n( $numposts ) ) . '</span>'; 528 $r .= '</a>'; 550 $r .= sprintf( 551 '<a href="%s" class="edit"><span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 552 "edit.php?author={$user_object->ID}", 553 $numposts, 554 sprintf( 555 /* translators: %s: number of posts */ 556 _n( '%s post by this author', '%s posts by this author', $numposts ), 557 number_format_i18n( $numposts ) 558 ) 559 ); 529 560 } else { 530 561 $r .= 0;
Note: See TracChangeset
for help on using the changeset viewer.