From bb75e13b17a1b8b43b5423bd6c409ab49c233715 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 23 Jun 2011 16:35:34 +0000 Subject: [PATCH] Don't attempt old slug redirect for multi-post_type queries. Props aaroncampbell. see #16949 git-svn-id: https://develop.svn.wordpress.org/trunk@18330 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index b7f433ca62..d70348cd83 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -3493,6 +3493,12 @@ function wp_old_slug_redirect() { else $post_type = 'post'; + if ( is_array( $post_type ) ) { + if ( count( $post_type ) > 1 ) + return; + $post_type = array_shift( $post_type ); + } + // Do not attempt redirect for hierarchical post types if ( is_post_type_hierarchical( $post_type ) ) return;