What are the parameters of the current_user_can () function?

What are the parameters of the function current_user_can()

?

This function is used in wordpress script, I know a parameter named publish_posts

, I want to know other parameters.

There is a sample code:

if( current_user_can( 'publish_posts' ) ) {
    require_once dirname( __FILE__ ) . '/post-form.php';
}

      

0


a source to share


2 answers


This should be a complete list:



Roles and Capabilities - Capabilities

+6


a source


You can find them on the WordPress Roles and Features page .



You can use any role or capability as an argument to the current_user_can () function. Look at the content on the right side of this page - all roles and capabilities (which are all usable) are listed.

+1


a source







All Articles