[wp-trac] [WordPress Trac] #61243: Deprecated notices who=authors and invalid documentation
WordPress Trac
noreply at wordpress.org
Sat May 18 13:22:46 UTC 2024
#61243: Deprecated notices who=authors and invalid documentation
--------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 5.9
Severity: major | Keywords:
Focuses: |
--------------------------+-----------------------------
when editing a post/page e.g. /wp-
json/wp/v2/users?context=view&who=authors&per_page=50&_fields=id%2Cname&_locale=user
WP_User_Query was called with an argument that is deprecated since version
5.9.0! "who" is deprecated. Use "capability" instead.
Caused by wp-includes/rest-api/endpoints/class-wp-rest-users-
controller.php
---
Additionally, this is there (and incorrectly documented?) in function
wp_dropdown_users:
>@type string $who Which type of users to query.
Accepts only an empty string or 'authors'. Default empty.
And even in the function that deprecates it itself: public function
prepare_query
The docs for $who still says 'authors', which is deprecated though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61243>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list