diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
index 5a63de3481..08bb08a617 100644
|
a
|
b
|
function redirect_guess_404_permalink() { |
| 897 | 897 | |
| 898 | 898 | // If any of post_type, year, monthnum, or day are set, use them to refine the query. |
| 899 | 899 | if ( get_query_var( 'post_type' ) ) { |
| 900 | | $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); |
| | 900 | if ( is_array( get_query_var( 'post_type' ) ) ) { |
| | 901 | $where .= $wpdb->prepare( ' AND post_type IN (%s)', implode( ',', esc_sql( get_query_var( 'post_type' ) ) ) ); |
| | 902 | } else { |
| | 903 | $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); |
| | 904 | } |
| 901 | 905 | } else { |
| 902 | 906 | $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')"; |
| 903 | 907 | } |