[wp-trac] [WordPress Trac] #17025: wp_list_authors() is not filterable

WordPress Trac noreply at wordpress.org
Thu Sep 12 20:59:18 UTC 2013

#17025: wp_list_authors() is not filterable
 Reporter:  kevinB            |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  3.7
Component:  Query             |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |

Comment (by nacin):

 I would prefer to not add a filter that directly operates on SQL. This is
 not very flexible or fun.

 Can we instead filter A) $authors, and/or B) $author_count?

 Also: Unless I am reading it wrong, this function also appears to be very,
 unnecessarily heavy. By only asking for 'ids' from get_users(), none of
 the users are getting cached, which means each individual call to
 get_usermeta() is triggering a new query.

 It would make more sense to run the raw query first, then fetch only those
 user objects (see also cache_users(); get_users() can also do this),
 unless $hide_empty is false, in which case you still need to fetch all
 objects as we're doing now.

Ticket URL: <http://core.trac.wordpress.org/ticket/17025#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list