Ticket #11017 (closed enhancement: duplicate)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: ramiy Owned by:
Priority: normal Milestone:
Component: Themes Version: 2.8.4
Severity: normal Keywords: has-patch early
Cc: r_a_m_i@…, WordPress@…

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

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

Change History

ramiy3 years ago

patch based on some other function...

comment:1 follow-up: ↓ 3   ramiy3 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.

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

ramiy3 years ago

parameter names changed to $orderby and $order

comment:3 in reply to: ↑ 1   ramiy3 years ago

orderby :

  • ID
  • user_login
  • user_nicename
  • display_name - default

order :

  • ASC - default
  • DESC

comment:4   ryan3 years ago

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

ramiy3 years ago

with parameter validation

comment:5   ryan3 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.

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

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