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