mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Always output pagination controls. Hide them when they are not needed. Show them upon AJAX result that requires pagination. Props nacin. fixes #15983
git-svn-id: https://develop.svn.wordpress.org/trunk@17156 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -472,9 +472,6 @@ class WP_List_Table {
|
||||
|
||||
extract( $this->_pagination_args );
|
||||
|
||||
if ( $total_pages < 2 )
|
||||
return;
|
||||
|
||||
$output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
|
||||
|
||||
$current = $this->get_pagenum();
|
||||
@@ -522,7 +519,9 @@ class WP_List_Table {
|
||||
|
||||
$output .= "\n" . join( "\n", $page_links );
|
||||
|
||||
$this->_pagination = "<div class='tablenav-pages'>$output</div>";
|
||||
$page_class = $total_pages < 2 ? ' one-page' : '';
|
||||
|
||||
$this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
|
||||
|
||||
echo $this->_pagination;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user