Core Function
View Source on Trac ↗ author_can()
author_can( mixed $post, mixed $capability, mixed $args ) Returns whether the author of the supplied post has the specified capability.
Parameters 3 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Post ID or post object. Required |
| $capability string | Capability name. Required |
| mixed | ...$args Optional further parameters, typically starting with an object ID. Required |
Return Value
(bool)
Whether the post author has the given capability.
Function Information
Since Version
2.9.0
Source File
wp-includes/capabilities.php
Advertisement