RTL pagination fixes. Props yoavf. fixes #15974

git-svn-id: http://svn.automattic.com/wordpress/trunk@17153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-26 21:54:52 +00:00
parent 313d646287
commit 9433827b1c
1 changed files with 4 additions and 7 deletions

View File

@ -487,14 +487,14 @@ class WP_List_Table {
'first-page',
esc_attr__( 'Go to the first page' ),
esc_url( remove_query_arg( 'paged', $current_url ) ),
is_rtl() ? '»' : '«'
'«'
);
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
'prev-page',
esc_attr__( 'Go to the previous page' ),
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' />",
@ -510,19 +510,16 @@ class WP_List_Table {
'next-page',
esc_attr__( 'Go to the next page' ),
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>",
'last-page',
esc_attr__( 'Go to the last page' ),
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 );
$this->_pagination = "<div class='tablenav-pages'>$output</div>";