Core Function
View Source on Trac ↗ current_user_can_for_site()
current_user_can_for_site( mixed $site_id, mixed $capability, mixed $args ) Returns whether the current user has the specified capability for a given site.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $site_id int | Site ID. Required |
| $capability string | Capability name. Required |
| mixed | ...$args Optional further parameters, typically starting with an object ID. Required |
Return Value
(bool)
Whether the user has the given capability.
Function Information
Since Version
6.7.0
Source File
wp-includes/capabilities.php
Advertisement