Ticket #19198: 19198.2.diff
| File 19198.2.diff, 708 bytes (added by , 14 years ago) |
|---|
-
wp-includes/query.php
2387 2387 2388 2388 if ( 'any' == $post_type ) { 2389 2389 $in_search_post_types = get_post_types( array('exclude_from_search' => false) ); 2390 if ( ! empty( $in_search_post_types ) ) 2390 if ( empty( $in_search_post_types ) ) 2391 $where .= ' AND 1=0'; 2392 else 2391 2393 $where .= $wpdb->prepare(" AND $wpdb->posts.post_type IN ('" . join("', '", $in_search_post_types ) . "')"); 2392 2394 } elseif ( !empty( $post_type ) && is_array( $post_type ) ) { 2393 2395 $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')";