#37393 closed defect (bug) (invalid)
Is documentation summary for current_user_can() wrong?
Reported by: | zorobabel | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0 |
Component: | Role/Capability | Keywords: | |
Focuses: | docs | Cc: |
Description
In wp-includes/capabilities.php, the function current_user_can() "has" an optional param called $object_id but it does not work appear in function's body.
Change History (3)
#1
@
8 years ago
- Focuses docs added
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
- Version changed from trunk to 2.0
#2
@
8 years ago
@Clorith
Hi there, and welcome to Trac''
Thanks!
You can actually pass an optional argument of $object_id here, you'll notice that there's a call to func_get_args which is used to get arguments, and then passed on to call_user_func_array. So the docs are correct in stating that there is an optional 2nd argument.
I'm sorry, my bad, thanks for the clarification.
Note: See
TracTickets for help on using
tickets.
Hi there, and welcome to Trac!
You can actually pass an optional argument of
$object_id
here, you'll notice that there's a call tofunc_get_args
which is used to get arguments, and then passed on tocall_user_func_array
.So the docs are correct in stating that there is an optional 2nd argument.