Reputation: 11941
What are current_user_can()
function parameters ?
This function is used in wordpress script, I know a parameter called publish_posts
, I want to know the other parameters .
There is a sample code :
if( current_user_can( 'publish_posts' ) ) {
require_once dirname( __FILE__ ) . '/post-form.php';
}
Upvotes: 0
Views: 5333
Reputation: 564441
You can find these on the WordPress Roles and Capabilities page.
You can use any role or capability as an argument to the current_user_can() function. Look in the contents on the right side of that page - the roles and capabilities (which are all usable) are all listed.
Upvotes: 1
Reputation: 74558
This should be a complete list:
Roles and Capabilities - Capabilities
Upvotes: 6