Changeset 34076
- Timestamp:
- 09/12/2015 08:12:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r33734 r34076 529 529 } 530 530 531 $extra_checks = "AND post_status != 'auto-draft'"; 532 if ( ! isset( $_GET['post_status'] ) || 'trash' !== $_GET['post_status'] ) { 533 $extra_checks .= " AND post_status != 'trash'"; 534 } elseif ( isset( $_GET['post_status'] ) ) { 535 $stati = explode( ',', $_GET['post_status'] ); 536 $extra_checks = ''; 537 foreach ( $stati as $status ) { 538 $extra_checks .= $wpdb->prepare( ' AND post_status = %s', $status ); 539 } 540 } 541 531 542 $months = $wpdb->get_results( $wpdb->prepare( " 532 543 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 533 544 FROM $wpdb->posts 534 545 WHERE post_type = %s 546 $extra_checks 535 547 ORDER BY post_date DESC 536 548 ", $post_type ) ); … … 1119 1131 if ( 'top' == $which ) 1120 1132 wp_nonce_field( 'bulk-' . $this->_args['plural'] ); 1121 ?> 1133 1134 if ( $this->has_items() ) : ?> 1122 1135 <div class="tablenav <?php echo esc_attr( $which ); ?>"> 1123 1136 … … 1133 1146 </div> 1134 1147 <?php 1148 endif; 1135 1149 } 1136 1150
Note: See TracChangeset
for help on using the changeset viewer.