Ticket #17685: 17685.diff
File 17685.diff, 1.7 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/class-wp-list-table.php
441 441 * @return int 442 442 */ 443 443 function get_pagenum() { 444 $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0; 444 if ( isset( $_REQUEST['search-paged'] ) && isset( $_REQUEST['paged'] ) && isset( $_REQUEST['s'] ) ) 445 $pagenum = 1; 446 else 447 $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0; 445 448 446 449 if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) 447 450 $pagenum = $this->_pagination_args['total_pages']; … … 507 510 '‹' 508 511 ); 509 512 510 if ( 'bottom' == $which ) 513 if ( 'bottom' == $which ) { 511 514 $html_current_page = $current; 512 else 515 } else { 516 if ( isset( $_GET['s'] ) ) 517 $field_name = esc_attr( 'search-paged' ); 518 else 519 $field_name = esc_attr( 'paged' ); 513 520 $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='%s' value='%s' size='%d' />", 514 521 esc_attr__( 'Current page' ), 515 esc_attr( 'paged' ),522 $field_name, 516 523 $current, 517 524 strlen( $total_pages ) 518 525 ); 526 } 519 527 520 528 $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) ); 521 529 $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>'; 530 531 $current_url = remove_query_arg( 'search-paged', $current_url ); 522 532 523 533 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", 524 534 'next-page' . $disable_last,