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
This commit is contained in:
parent
35ebb06f22
commit
bb75e13b17
|
@ -3493,6 +3493,12 @@ function wp_old_slug_redirect() {
|
||||||
else
|
else
|
||||||
$post_type = 'post';
|
$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
|
// Do not attempt redirect for hierarchical post types
|
||||||
if ( is_post_type_hierarchical( $post_type ) )
|
if ( is_post_type_hierarchical( $post_type ) )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue