RTL pagination fixes. Props yoavf. fixes #15974

git-svn-id: https://develop.svn.wordpress.org/trunk@17153 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-12-26 21:54:52 +00:00
parent d46893048c
commit 2b54d5a3b6
1 changed files with 4 additions and 7 deletions

View File

@ -487,14 +487,14 @@ class WP_List_Table {
'first-page', 'first-page',
esc_attr__( 'Go to the first page' ), esc_attr__( 'Go to the first page' ),
esc_url( remove_query_arg( 'paged', $current_url ) ), esc_url( remove_query_arg( 'paged', $current_url ) ),
is_rtl() ? '»' : '«' '«'
); );
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
'prev-page', 'prev-page',
esc_attr__( 'Go to the previous page' ), esc_attr__( 'Go to the previous page' ),
esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ), esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
is_rtl() ? '&rsaquo;' : '&lsaquo;' '&lsaquo;'
); );
$html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='%s' value='%s' size='%d' />", $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='%s' value='%s' size='%d' />",
@ -510,19 +510,16 @@ class WP_List_Table {
'next-page', 'next-page',
esc_attr__( 'Go to the next page' ), esc_attr__( 'Go to the next page' ),
esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ), esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
is_rtl() ? '&lsaquo;' : '&rsaquo;' '&rsaquo;'
); );
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
'last-page', 'last-page',
esc_attr__( 'Go to the last page' ), esc_attr__( 'Go to the last page' ),
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ), esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
is_rtl() ? '&laquo;' : '&raquo;' '&raquo;'
); );
if ( is_rtl() )
$page_links = array_reverse( $page_links );
$output .= "\n" . join( "\n", $page_links ); $output .= "\n" . join( "\n", $page_links );
$this->_pagination = "<div class='tablenav-pages'>$output</div>"; $this->_pagination = "<div class='tablenav-pages'>$output</div>";