diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
index ad219c2711..ac53cfc617 100644
|
a
|
b
|
function redirect_guess_404_permalink() { |
| 663 | 663 | |
| 664 | 664 | // if any of post_type, year, monthnum, or day are set, use them to refine the query |
| 665 | 665 | if ( get_query_var( 'post_type' ) ) { |
| 666 | | $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); |
| | 666 | if ( is_array( get_query_var( 'post_type' ) ) ) { |
| | 667 | $where .= $wpdb->prepare( ' AND post_type IN (%s)', implode( ',', get_query_var( 'post_type' ) ) ); |
| | 668 | } else { |
| | 669 | $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); |
| | 670 | } |
| 667 | 671 | } else { |
| 668 | 672 | $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')"; |
| 669 | 673 | } |