Ticket #21015: 21015.6.diff
File 21015.6.diff, 732 bytes (added by , 10 years ago) |
---|
-
src/wp-admin/includes/class-wp-list-table.php
521 521 return; 522 522 } 523 523 524 $extra_checks = "AND post_status != 'auto-draft'"; 525 526 if ( ! isset( $_GET['post_status'] ) || 'trash' != $_GET['post_status'] ) 527 $extra_checks .= " AND post_status != 'trash'"; 528 524 529 $months = $wpdb->get_results( $wpdb->prepare( " 525 530 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 526 531 FROM $wpdb->posts 527 532 WHERE post_type = %s 533 " . $extra_checks . " 528 534 ORDER BY post_date DESC 529 535 ", $post_type ) ); 530 536