WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/current user can for blog

Contents

Description

Whether current user has a capability or role for a given blog.

This function is similar to current_user_can(), but allows you to check if the current user has a capability for another blog on the network. To check if the user has the capability for the current blog, you can just use current_user_can().

Usage

<?php current_user_can_for_blog($blog_id$capability); ?>

Parameters

$blog_id
(integer) (required) Blog ID
Default: None
$capability
(string) (required) Capability or role name.
Default: None

Return Values

(boolean) 

Change Log

Since: 3.0

Source File

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

Related

User Capabilities: user_can(), current_user_can(), current_user_can_for_blog()