Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r18254 r17482  
    7878         * @access protected
    7979         */
    80         function __construct( $args = array() ) {
     80        function WP_List_Table( $args = array() ) {
    8181                $args = wp_parse_args( $args, array(
    8282                        'plural' => '',
     
    139139                if ( !$args['total_pages'] && $args['per_page'] > 0 )
    140140                        $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
    141 
    142                 // redirect if page number is invalid and headers are not already sent
    143                 if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
    144                         wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
    145                         exit;
    146                 }
    147141
    148142                $this->_pagination_args = $args;
     
    289283                echo "<select name='action$two'>\n";
    290284                echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
    291 
    292                 foreach ( $this->_actions as $name => $title ) {
    293                         $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
    294 
    295                         echo "\t<option value='$name'$class>$title</option>\n";
    296                 }
    297 
     285                foreach ( $this->_actions as $name => $title )
     286                        echo "\t<option value='$name'>$title</option>\n";
    298287                echo "</select>\n";
    299288
     
    540529                );
    541530
    542                 $output .= "\n<span class='pagination-links'>" . join( "\n", $page_links ) . '</span>';
    543 
    544                 if ( $total_pages )
    545                         $page_class = $total_pages < 2 ? ' one-page' : '';
    546                 else
    547                         $page_class = ' no-pages';
     531                $output .= "\n" . join( "\n", $page_links );
     532
     533                $page_class = $total_pages < 2 ? ' one-page' : '';
    548534
    549535                $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
Note: See TracChangeset for help on using the changeset viewer.