[wp-trac] [WordPress Trac] #43877: Do not run unnecessary `user_has_cap` filter if the caps to check for include `do_not_allow` already
WordPress Trac
noreply at wordpress.org
Fri Apr 27 12:29:51 UTC 2018
#43877: Do not run unnecessary `user_has_cap` filter if the caps to check for
include `do_not_allow` already
----------------------------------------+------------------------------
Reporter: flixos90 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests has-patch | Focuses:
----------------------------------------+------------------------------
Changes (by flixos90):
* keywords: needs-patch needs-unit-tests => needs-unit-tests has-patch
Comment:
[attachment:43877.diff] fixes this problem. A unit test to verify that the
following code does not run should be added as well (we could check to
ensure the `user_has_cap` filter is not executed).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43877#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list