Returns whether the current user has the specified capability for a given site.
$blog_idintrequired
$capabilitystringrequired
$argsmixedoptional
function current_user_can_for_blog( $blog_id, $capability, ...$args ) {
return current_user_can_for_site( $blog_id, $capability, ...$args );
}
| Version | Description |
|---|---|
| 6.7.0 | Use current_user_can_for_site() instead. |
| 5.8.0 | Wraps current_user_can() after switching to blog. |
| 5.3.0 | Formalized the existing and already documented ...$args parameter by adding it to the function signature. |
| 3.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/current_user_can_for_blog