tags:

views:

417

answers:

2

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';
}

Thanks

+2  A: 

This should be a complete list:

Roles and Capabilities - Capabilities

Chad Birch
+1  A: 

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.

Reed Copsey