From af6f9de61b34815940b504a28ea9b4590b77ea7b Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@18330 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index b7f433ca6..d70348cd8 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;