[wp-trac] [WordPress Trac] #14408: Get author information in author template file without having to query the first post

WordPress Trac noreply at wordpress.org
Fri Aug 23 14:16:48 UTC 2013


#14408: Get author information in author template file without having to query the
first post
-------------------------+-----------------------
 Reporter:  garyc40      |       Owner:  garyc40
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  3.7
Component:  Themes       |     Version:  3.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------

Comment (by nacin):

 Replying to [comment:6 nacin]:
 > Replying to [comment:5 obenland]:
 > > We still have to call `the_post()` in author archives, it would be
 great if we could stop doing that. Maybe in 3.7?
 >
 > Is that a separate patch/issue, or is that what is being fixed here?

 obenland clarified in IRC this is what is being fixed here.

 Looking at the patch, I think it is in the wrong place. We don't set up
 any kind of globals within the loop — it only occurs in setup_postdata().
 Also, it must only occur for the main query, not for any subsequent
 queries. In this case, calling setup_postdata() in WP_Query (even just for
 the main query) could lead to some side effects, as well.

 I think the proper location for this is in wp::register_globals(), which
 already sets up $posts, $post, etc.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/14408#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list