[wp-trac] [WordPress Trac] #24490: Pass $this to WP_User::has_cap()'s "user_has_cap" filter
WordPress Trac
noreply at wordpress.org
Tue Jun 4 00:58:11 UTC 2013
#24490: Pass $this to WP_User::has_cap()'s "user_has_cap" filter
-----------------------------+-----------------------------
Reporter: Viper007Bond | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: 3.5.1
Severity: normal | Keywords:
-----------------------------+-----------------------------
When hooking into the `user_has_cap` filter to modify the result of a
user's capability checks (for example `current_user_can()`), the filter is
not provided access to the user's object. This is important for cases like
where `WP_User::for_blog()` has been called but you only want to modify a
user's capabilities for a certain blog.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24490>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list