Ticket #16949: 16949.diff

File 16949.diff, 498 bytes (added by aaroncampbell, 2 years ago)

Don't attempt old slug redirect for multi-post_type queries

Line 
1Index: wp-includes/query.php
2===================================================================
3--- wp-includes/query.php       (revision 18324)
4+++ wp-includes/query.php       (working copy)
5@@ -3493,6 +3493,12 @@
6                else
7                        $post_type = 'post';
8 
9+               if ( is_array( $post_type ) ) {
10+                       if ( count( $post_type ) > 1 )
11+                               return;
12+                       $post_type = array_shift( $post_type );
13+               }
14+
15                // Do not attempt redirect for hierarchical post types
16                if ( is_post_type_hierarchical( $post_type ) )
17                        return;