function current_user_can( $capability ) {}

Whether current user has capability or role.


  • string $capability: Capability or role name.

Source code

function current_user_can( $capability ) {

	$current_user = wp_get_current_user();

	if ( empty( $current_user ) )

		return false;

	$args = array_slice( func_get_args(), 1 );

	$args = array_merge( array( $capability ), $args );

	return call_user_func_array( array( $current_user, 'has_cap' ), $args );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: