[wp-trac] [WordPress Trac] #21711: Twenty Twelve: use get_queried_object instead of the_post/rewind_posts in author archives
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 28 09:16:19 UTC 2012
#21711: Twenty Twelve: use get_queried_object instead of the_post/rewind_posts in
author archives
---------------------------+-----------------------------
Reporter: kovshenin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Keywords:
---------------------------+-----------------------------
Hi there! I think it's easier and more correct to use a proper `WP_User`
object in the author archives with `get_queried_object`, instead of
"hacking" it with `the_post` and `rewind_posts`. The only drawback is that
it's not being passed through `the_author` filter, but I think that's
fine, because technically we're not in a loop anyway, and thus, should not
use `the_author_*` functions either.
It's the same approach I'd use for tag and category archives, but luckily,
`single_term_title` wraps the call to `get_queried_object` and does most
of the work for us.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21711>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list