[wp-trac] [WordPress Trac] #49450: WP_REST_Users_Controller includes the entire admin for one utility function
WordPress Trac
noreply at wordpress.org
Mon Feb 17 04:01:07 UTC 2020
#49450: WP_REST_Users_Controller includes the entire admin for one utility function
----------------------------+----------------------------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.4
Component: Users | Version:
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: rest-api |
----------------------------+----------------------------------------
Background: #43757.
`WP_REST_Users_Controller::check_role_update()` includes the entire admin
API (`wp-admin/includes/admin.php`) just to get access to
`get_editable_roles()`.
It could just require `wp-admin/includes/user.php` instead, like the
[source:tags/5.3.2/src/wp-includes/rest-api/endpoints/class-wp-rest-users-
controller.php?marks=802,803#L797 ::delete_item() method does].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49450>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list