[wp-trac] [WordPress Trac] #10329: sort_by and count_limit options for wp_list_authors
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 5 22:25:42 UTC 2010
#10329: sort_by and count_limit options for wp_list_authors
-----------------------------+----------------------------------------------
Reporter: takaitra | Owner: westi
Type: feature request | Status: reviewing
Priority: normal | Milestone: 3.1
Component: Template | Version:
Severity: normal | Keywords: has-patch
-----------------------------+----------------------------------------------
Comment(by t31os_):
Yes apologies i think the parameter issue was my mistake.
I'm not sure about the group by problem, perhaps you could remove the
group by and use a distinct select instead, would that help at all?
I want to go back to this authors with zero posts thing though, don't you
actually mean any user? As like i said further up, there's nothing in the
queries to distinguish between a user that can create posts and one that
cannot, so when you say authors with zero posts, i believe you're actually
referring to all users, or is there something i'm overlooking?
The get_userdata call isn't just called once per iteration it appears(been
looking at these functions over the last few hours) it's also called by
get_author_posts_url, and then you have get_author_feed_link, which in
turn calls get_author_posts_url, and again in turn that's another
get_userdata lookup. In total you end up with 3 calls to get_userdata, to
grab data you don't even need, because as far as i can see, all the data
you're extracting from get_userdata is already available from the SQL
query further up (ID, nicename, first_name, last_name, etc).
Taking a look at the two above mentioned functions, i can't see that it
would be a huge problem to do something similar directly in the
wp_list_authors function(i've been doing that to cut down the queries).
In regards to caching, i can't really comment as i know very little about
the WordPress caching, but i thought caching was pretty much off by
default(not sure where i got that impression from), but like i said, i
know little about it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10329#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list