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:
parent
313d646287
commit
9433827b1c
|
@ -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() ? '›' : '‹'
|
||||
'‹'
|
||||
);
|
||||
|
||||
$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() ? '‹' : '›'
|
||||
'›'
|
||||
);
|
||||
|
||||
$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() ? '«' : '»'
|
||||
'»'
|
||||
);
|
||||
|
||||
if ( is_rtl() )
|
||||
$page_links = array_reverse( $page_links );
|
||||
|
||||
$output .= "\n" . join( "\n", $page_links );
|
||||
|
||||
$this->_pagination = "<div class='tablenav-pages'>$output</div>";
|
||||
|
|
Loading…
Reference in New Issue