[wp-trac] [WordPress Trac] #43421: The $capabilities argument in the `add_role()` function requires an explicit grant
WordPress Trac
noreply at wordpress.org
Sun Jun 29 21:45:46 UTC 2025
#43421: The $capabilities argument in the `add_role()` function requires an
explicit grant
--------------------------------------+--------------------------
Reporter: eclev91 | Owner: johnbillion
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: Role/Capability | Version: 4.9.4
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------------
Changes (by johnbillion):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"60364" 60364]:
{{{
#!CommitTicketReference repository="" revision="60364"
Role/Capability: Add support for passing a numerically-indexed array of
capability names to the `add_role()` function and the
`WP_Roles::add_role()` method.
Denying a capability at the point of creating the role is a relatively
uncommon requirement, so this simplifies the syntax needed to grant a list
of capabilities to the role.
Props eclev91, johnbillion, flixos90, johnjamesjacoby, soulseekah
Fixes #43421
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43421#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list