WordPress / Documentation-Issue-Tracker

Issue Tracker for the WordPress Documentation team.
https://make.wordpress.org/docs/
Other
76 stars 38 forks source link

Inocrrect orderby param in WP_User_Query #1467

Open helgatheviking opened 4 months ago

helgatheviking commented 4 months ago

Issue Description

The allowed orderby params are incorrect as name is equal to display_name and user_name doesn't exist at all.

‘display_name‘ – Order by user display name. ‘name‘ / ‘user_name‘ – Order by user name.

URL of the Page with the Issue

https://developer.wordpress.org/reference/classes/wp_user_query/#order-orderby-parameters

Section of Page with the issue

order-orderby-parameters

Why is this a problem?

There's no such param for 'name' that is independent of display name.

name and display_name are equivalent in the WP_User_Query source

Suggested Fix

‘display_name‘/'name' – Order by user display name.

github-actions[bot] commented 4 months ago

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.