[wp-trac] [WordPress Trac] #10329: sort_by and count_limit options for wp_list_authors
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 3 20:39:17 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: needs-patch
-----------------------------+----------------------------------------------
Comment(by takaitra):
Denis, I see that microgroove's code was checked in. I'm going to code the
following pseudocode and submit a new patch. Let me know if you see any
logic problems. Thanks.
First, query a list of authors and post counts. This would be a join but
either leave out the GROUP BY or include ORDER BY NULL to avoid the sort
overhead. It would be a LEFT JOIN or INNER JOIN conditional on whether
authors with zero posts need to be displayed. It would also include an
appropriate HAVING and LIMIT clause based on the min_count and number
options.
Next, acquire the associated User objects based on miqrogroove's new code.
This would only be done if show_fullname is true. A loop through the
authors will be needed to associate them with their post counts.
Sort the list of authors based on post count or name, depending on the
orderby option.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10329#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list