Changeset 32693 for trunk/src/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 06/05/2015 05:00:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r32662 r32693 702 702 $page_links = array(); 703 703 704 $total_pages_before = '<span class="paging-input">'; 705 $total_pages_after = '</span>'; 706 704 707 $disable_first = $disable_last = ''; 705 708 if ( $current == 1 ) { … … 709 712 $disable_last = ' disabled'; 710 713 } 711 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",714 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>", 712 715 'first-page' . $disable_first, 713 esc_attr__( 'Go to the first page' ),714 716 esc_url( remove_query_arg( 'paged', $current_url ) ), 717 __( 'First page' ), 715 718 '«' 716 719 ); 717 720 718 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",721 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>", 719 722 'prev-page' . $disable_first, 720 esc_attr__( 'Go to the previous page' ),721 723 esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ), 724 __( 'Previous page' ), 722 725 '‹' 723 726 ); 724 727 725 728 if ( 'bottom' == $which ) { 726 $html_current_page = $current; 729 $html_current_page = $current; 730 $total_pages_before = '<span id="table-paging" class="paging-input">'; 727 731 } else { 728 $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' title='%s' type='text' name='paged' value='%s' size='%d' />", 729 '<label for="current-page-selector" class="screen-reader-text">' . __( 'Select Page' ) . '</label>', 730 esc_attr__( 'Current page' ), 732 $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />", 733 '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>', 731 734 $current, 732 735 strlen( $total_pages ) … … 734 737 } 735 738 $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) ); 736 $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';737 738 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",739 $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after; 740 741 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>", 739 742 'next-page' . $disable_last, 740 esc_attr__( 'Go to the next page' ),741 743 esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ), 744 __( 'Next page' ), 742 745 '›' 743 746 ); 744 747 745 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",748 $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>", 746 749 'last-page' . $disable_last, 747 esc_attr__( 'Go to the last page' ),748 750 esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ), 751 __( 'Last page' ), 749 752 '»' 750 753 );
Note: See TracChangeset
for help on using the changeset viewer.