[wp-trac] [WordPress Trac] #32694: current_user_can function is able to take post_id as argument, but it is not documented in WordPress documentation.
WordPress Trac
noreply at wordpress.org
Thu Jun 18 04:18:33 UTC 2015
#32694: current_user_can function is able to take post_id as argument, but it is
not documented in WordPress documentation.
--------------------------+------------------------------
Reporter: jliman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by dd32):
In other areas we've documented it as such (`WP_User::has_cap()` is what
current_user_can() wraps)
> The second optional parameter can also be used to check for capabilities
against a specific object, such as a post or user.
https://developer.wordpress.org/reference/classes/wp_user/has_cap/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32694#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list