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
This commit is contained in:
ryan 2011-06-23 16:35:34 +00:00
parent 29771308c3
commit af6f9de61b
1 changed files with 6 additions and 0 deletions

View File

@ -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;