Ticket #21015: 21015.3.patch
| File 21015.3.patch, 745 bytes (added by , 13 years ago) |
|---|
-
wp-admin/includes/class-wp-list-table.php
362 362 */ 363 363 function months_dropdown( $post_type ) { 364 364 global $wpdb, $wp_locale; 365 365 $extra_checks = ""; 366 if($_GET['post_status'] != "trash"){ 367 $extra_checks = "AND post_status != 'trash'"; 368 } 366 369 $months = $wpdb->get_results( $wpdb->prepare( " 367 370 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 368 371 FROM $wpdb->posts 369 372 WHERE post_type = %s 373 AND post_status != 'auto-draft' 374 ".$extra_checks." 370 375 ORDER BY post_date DESC 371 376 ", $post_type ) ); 372 377