Return the allcaps array from the get_role_caps() function
|Reported by:||nofearinc||Owned by:||wonderboymusic|
The WP_User class has a function called get_role_caps() that is compiling a list with all user capabilities (coming from roles or individual).
It's a great function, but it's just setting the allcaps object field which has to be taken additionally. For me it makes sense to get that list returned to the user for further use if needed and I was expecting to get the data as a function result (the function starts with 'get' anyway).
Applying a patch for returning the field data from the function.
Change History (8)
comment:6 @wonderboymusic — 2 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed