Opened 6 years ago
Closed 6 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | rest-api |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 47299: