diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php
index 36ff320..ca164f1 100644
a
|
b
|
function redirect_guess_404_permalink() { |
665 | 665 | |
666 | 666 | // if any of post_type, year, monthnum, or day are set, use them to refine the query |
667 | 667 | if ( get_query_var( 'post_type' ) ) { |
668 | | $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); |
| 668 | if ( is_array( get_query_var( 'post_type' ) ) ) { |
| 669 | $post_types = array(); |
| 670 | foreach ( get_query_var( 'post_type' ) as $post_type ) { |
| 671 | $post_types[] = $wpdb->prepare( '%s', $post_type ); |
| 672 | } |
| 673 | $where .= " AND post_type IN (" . implode( ", ", $post_types ) . ")"; |
| 674 | } else { |
| 675 | $where .= $wpdb->prepare( " AND post_type = %s", get_query_var( 'post_type' ) ); |
| 676 | } |
669 | 677 | } else { |
670 | 678 | $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')"; |
671 | 679 | } |