Add back compat fields to queried category objects. Props scribu, duck_. fixes #16857 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b5528f516d
commit
852860648d
|
@ -2897,6 +2897,9 @@ class WP_Query {
|
||||||
if ( $term && ! is_wp_error($term) ) {
|
if ( $term && ! is_wp_error($term) ) {
|
||||||
$this->queried_object = $term;
|
$this->queried_object = $term;
|
||||||
$this->queried_object_id = (int) $term->term_id;
|
$this->queried_object_id = (int) $term->term_id;
|
||||||
|
|
||||||
|
if ( $this->is_category )
|
||||||
|
_make_cat_compat( $this->queried_object );
|
||||||
}
|
}
|
||||||
} elseif ( $this->is_post_type_archive ) {
|
} elseif ( $this->is_post_type_archive ) {
|
||||||
$this->queried_object = get_post_type_object( $this->get('post_type') );
|
$this->queried_object = get_post_type_object( $this->get('post_type') );
|
||||||
|
|
Loading…
Reference in New Issue