mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
get_queried_object should not return an array of terms, and wp_title should check is_tax. Hat tip: andy
git-svn-id: https://develop.svn.wordpress.org/trunk@7941 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1610,8 +1610,9 @@ class WP_Query {
|
||||
$tax = $this->get('taxonomy');
|
||||
$slug = $this->get('term');
|
||||
$term = &get_terms($tax, array('slug'=>$slug));
|
||||
if ( is_wp_error($term) )
|
||||
if ( is_wp_error($term) || empty($term) )
|
||||
return $term;
|
||||
$term = $term[0];
|
||||
$this->queried_object = $term;
|
||||
$this->queried_object_id = $term->term_id;
|
||||
} else if ($this->is_posts_page) {
|
||||
|
||||
Reference in New Issue
Block a user