[wp-trac] [WordPress Trac] #43421: The $capabilities argument in the `add_role()` function is incompatible with `user_can`
WordPress Trac
noreply at wordpress.org
Sat Mar 17 01:43:14 UTC 2018
#43421: The $capabilities argument in the `add_role()` function is incompatible
with `user_can`
-----------------------------+----------------------
Reporter: eclev91 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Role/Capability | Version: 4.9.4
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-----------------------------+----------------------
Comment (by eclev91):
I'm actually inclined to agree, but think it might be worth reviewing as
an enhancement. If `$capabilities` is passed a numerically-keyed array (or
"not associative", however one ultimately decides to interpret that), that
it be assumed each cap should be assigned as "true".
Thoughts?
Semi-related, what's the use case for explicitly saying someone doesn't a
capability (`"my_cap" => false`)?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43421#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list