Opened 2 years ago
Last modified 23 months ago
#57083 new defect (bug)
wp_list_authors and WP Search Users
Reported by: | pabloeduardo | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | Query | Keywords: | needs-testing reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
Apparently wp_list_authors
is loading a deprecated WordPress class called WP Search Users, this class has now been replaced with WP Query Users but wp_list_authors
keeps using WP Search Users.
However the case wp list authors is only accepting some parameters, neither through array or through post accepted more parameter, meaning that something like this worked:
wp_list_authors('orderby=name&order=DESC');
but something like this did not:
wp_list_authors('orderby=name&order=ASC');
or even
wp_list_authors('orderby=name&order=DESC&optioncount=1');
My original code wasn’t working because it was stated as follows:
$authors = str_replace( ', ', '<br>', wp_list_authors([ 'style' => 'none', 'optioncount' => 1, 'echo' => 0 ]) ); echo $authors;
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hi, welcome to WordPress Trac, and thanks for the ticket !
Looking at
wp_list_authors
in the latest version of WordPress (6.1), I couldn't see the call toWP_User_Search
you mentioned. The function usesget_users
to retrieve the list of users, which uses theWP_User_Query
internally.Could you give more details where you saw the call to
WP_User_Search
?In my testing, all the examples you gave did work as expected.
Can you give more information on what didn't work or on the errors you encountered ?