After [34076], fix the logic for post_status in months dropdown.

See #21015.


git-svn-id: https://develop.svn.wordpress.org/trunk@34077 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-09-12 08:18:18 +00:00
parent 927ad00bab
commit faf87c2ca6

View File

@ -532,11 +532,7 @@ class WP_List_Table {
if ( ! isset( $_GET['post_status'] ) || 'trash' !== $_GET['post_status'] ) {
$extra_checks .= " AND post_status != 'trash'";
} elseif ( isset( $_GET['post_status'] ) ) {
$stati = explode( ',', $_GET['post_status'] );
$extra_checks = '';
foreach ( $stati as $status ) {
$extra_checks .= $wpdb->prepare( ' AND post_status = %s', $status );
}
$extra_checks = $wpdb->prepare( ' AND post_status = %s', $_GET['post_status'] );
}
$months = $wpdb->get_results( $wpdb->prepare( "