Changes from trunk/wp-admin/includes/class-wp-list-table.php at r18254 to branches/3.1/wp-admin/includes/class-wp-list-table.php at r17482
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-admin/includes/class-wp-list-table.php
r18254 r17482 78 78 * @access protected 79 79 */ 80 function __construct( $args = array() ) {80 function WP_List_Table( $args = array() ) { 81 81 $args = wp_parse_args( $args, array( 82 82 'plural' => '', … … 139 139 if ( !$args['total_pages'] && $args['per_page'] > 0 ) 140 140 $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] ); 141 142 // redirect if page number is invalid and headers are not already sent143 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 }147 141 148 142 $this->_pagination_args = $args; … … 289 283 echo "<select name='action$two'>\n"; 290 284 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"; 298 287 echo "</select>\n"; 299 288 … … 540 529 ); 541 530 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' : ''; 548 534 549 535 $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
Note: See TracChangeset
for help on using the changeset viewer.