WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/current user can

Description

Whether current user has capability or role.

Usage

 <?php current_user_can$capability ); ?> 

Parameters

$capability
(string) (required) capability or role name.
Default: None

Returns

(boolean) 
current user has capability or role.

Changelog

Since: 2.0.0

Source Code

current_user_can() is located in wp-includes/capabilities.php.

Related

Roles_and_Capabilities

See also index of Function Reference and index of Template Tags.