WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#11017 closed enhancement (duplicate)

add "orderby" parameter to "wp_list_authors()" function

Reported by: ramiy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.4
Component: Themes Keywords: has-patch early
Focuses: Cc:

Description

the wp_list_categories() function has a very useful "orderby" parameter that receives the following:

  • ID
  • name - Default
  • slug
  • count
  • term_group

i want to add "orderby" parameter to wp_list_authors() function that will receive the following:

  • ID
  • name - Default
  • count

Attachments (3)

11017.patch (1.1 KB) - added by ramiy 5 years ago.
patch based on some other function…
11017.2.patch (1.1 KB) - added by ramiy 5 years ago.
parameter names changed to $orderby and $order
11017.2.2.patch (1.6 KB) - added by ramiy 5 years ago.
with parameter validation

Download all attachments as: .zip

Change History (11)

@ramiy5 years ago

patch based on some other function...

comment:1 follow-up: @ramiy5 years ago

  • Keywords has-patch added; needs-patch removed

i added 2 parameters:

sort_column :

  • ID
  • user_login
  • user_nicename
  • display_name - default

sort_order :

  • ASC - default
  • DESC

This is not the best solution but it's easy to use.

comment:2 @ramiy5 years ago

  • Severity changed from major to normal
  • Version changed from 2.9 to 2.8.4

@ramiy5 years ago

parameter names changed to $orderby and $order

comment:3 in reply to: ↑ 1 @ramiy5 years ago

orderby :

  • ID
  • user_login
  • user_nicename
  • display_name - default

order :

  • ASC - default
  • DESC

comment:4 @ryan5 years ago

$orderby and $order need to be validated. See how get_terms() does it.

@ramiy5 years ago

with parameter validation

comment:5 @ryan5 years ago

  • Keywords early added
  • Milestone changed from 2.9 to 3.0

Looks good, but all enhanements are being postponed from 2.9. Let's commit this early in the 3.0 cycle.

comment:6 @nacin5 years ago

#10329 should be closed as a duplicate or vice versa.

comment:7 @voyagerfan57615 years ago

  • Cc WordPress@… added

comment:8 @nacin5 years ago

  • Milestone 3.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.