Function Reference/author can
Description
Whether author of supplied post has capability or role.
Usage
<?php author_can( $post, $capability ); ?>
Example
Parameters
- $post
- (mixed) (required) Post ID or post object
- Default: None
- $capability
- (string) (required) Capability or role name.
- Default: None
Returns
- (boolean)
- whether author can or not.
Changelog
Since: Wordpress 2.9.0
Source Code
author_can() is located in wp-includes/capabilities.php.
Related
Roles and Capabilities