Make WordPress Core


Ignore:
Timestamp:
12/26/2010 10:06:15 PM (15 years ago)
Author:
ryan
Message:

Always output pagination controls. Hide them when they are not needed. Show them upon AJAX result that requires pagination. Props nacin. fixes #15983

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-list-table.php

    r17153 r17156  
    473473        extract( $this->_pagination_args );
    474474
    475         if ( $total_pages < 2 )
    476             return;
    477 
    478475        $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
    479476
     
    523520        $output .= "\n" . join( "\n", $page_links );
    524521
    525         $this->_pagination = "<div class='tablenav-pages'>$output</div>";
     522        $page_class = $total_pages < 2 ? ' one-page' : '';
     523
     524        $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
    526525
    527526        echo $this->_pagination;
Note: See TracChangeset for help on using the changeset viewer.