#43410 closed defect (bug) (fixed)
Docs of WP_User::get_role_caps() mix up roles and capabilities
Reported by: | thomaswm | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Users | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
The documentation of the WP_User
member function get_role_caps()
is as follows:
All of the capabilities of the roles the user belongs to are merged with the users individual roles. This also means that the user can be denied specific roles that their role might have, but the specific user isn’t granted permission to.
This documentation seems confusing to me. I think that roles and capabilities are mixed up in two places:
All of the capabilities of the roles the user belongs to are merged with the user's individual
rolescapabilities. This also means that the user can be denied specificrolescapabilities that their role might have, but the specific user isn’t granted permission to.
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Documentation was added in [8904].