mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 00:52:55 +01:00
Update get_queried_object() to use get_userdata() when retrieving authors. fixes #2044
git-svn-id: https://develop.svn.wordpress.org/trunk@3290 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bbf06ccf54
commit
e225cc0e92
@ -734,11 +734,10 @@ class WP_Query {
|
||||
$this->queried_object = $this->post;
|
||||
$this->queried_object_id = $this->post->ID;
|
||||
} else if ($this->is_author) {
|
||||
global $cache_userdata;
|
||||
if (isset($cache_userdata[$this->get('author')])) {
|
||||
$this->queried_object = $cache_userdata[$this->get('author')];
|
||||
$this->queried_object_id = $this->get('author');
|
||||
}
|
||||
$author_id = $this->get('author');
|
||||
$author = get_userdata($author_id);
|
||||
$this->queried_object = $author;
|
||||
$this->queried_object_id = $author_id;
|
||||
}
|
||||
|
||||
return $this->queried_object;
|
||||
|
Loading…
x
Reference in New Issue
Block a user