mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Move the CPT archive flag outside of the rewrite argument, into its own has_archive. has_archive controls more than just URL rewriting, it also handles whether ?post_type= is treated as a CPT archive. feeds remain in rewrite as ?feed= would work regardless. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1334,7 +1334,7 @@ class WP_Query extends WP_Object_Query {
|
||||
|
||||
if ( !empty( $qv['post_type'] ) && ! is_array( $qv['post_type'] ) ) {
|
||||
$post_type_obj = get_post_type_object( $qv['post_type'] );
|
||||
if ( is_array( $post_type_obj->rewrite ) && $post_type_obj->rewrite['archive'] )
|
||||
if ( $post_type_obj->has_archive )
|
||||
$this->is_post_type_archive = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user