Opened 5 years ago
Closed 5 years ago
#49450 closed defect (bug) (fixed)
WP_REST_Users_Controller includes the entire admin for one utility function
Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Users | Keywords: | good-first-bug has-patch |
Focuses: | rest-api | Cc: |
Description
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 ::delete_item() method does.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 47299: