[wp-trac] [WordPress Trac] #43421: The $capabilities argument in the `add_role()` function is incompatible with `user_can`

WordPress Trac noreply at wordpress.org
Sun Mar 18 17:41:57 UTC 2018


#43421: The $capabilities argument in the `add_role()` function is incompatible
with `user_can`
-----------------------------+-----------------------
 Reporter:  eclev91          |       Owner:
     Type:  enhancement      |      Status:  reopened
 Priority:  normal           |   Milestone:
Component:  Role/Capability  |     Version:  4.9.4
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+-----------------------

Comment (by eclev91):

 By "this sugary syntax", you mean passing an array of caps without
 associated booleans? Yeah, I think from a UX perspective it makes sense.
 Even though the nuts and bolts of how it's accomplished are different,
 when I `add_cap`, there's a mechanism that assumes I mean true (the
 default second arg). A consistent UX would allow for the same assumption
 to be made when assigning caps at role creation.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43421#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list