current_user_can_for_blog [ WordPress Function ]
current_user_can_for_blog ( $blog_id, $capability )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: current_user_can, get_users_of_blog, remove_user_from_blog, get_currentuserinfo, current_theme_info
Whether current user has a capability or role for a given blog.
Source
<?php
function current_user_can_for_blog( $blog_id, $capability ) {
$current_user = wp_get_current_user();
if ( empty( $current_user ) )
return false;
// Create new object to avoid stomping the global current_user.
$user = new WP_User( $current_user->ID) ;
// Set the blog id. @todo add blog id arg to WP_User constructor?
$user->for_blog( $blog_id );
$args = array_slice( func_get_args(), 2 );
$args = array_merge( array( $capability ), $args );
return call_user_func_array( array( &$user, 'has_cap' ), $args );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/current user can for blog « WordPress Codex
Function Reference/current user can for blog ... Source File. current_user_can_for_blog() is located in wp-includes/capabilities.php. Retrieved from ...
codex.wordpress.org - #15122 (current_user_can_for_blog() doesn't use map_meta_cap ...
[12796] introduced a new current_user_can_for_blog() function, which was based on how the existing current_user_can() function was implemented.
core.trac.wordpress.org - current_user_can_for_blog
Function and Method Cross Reference. current_user_can_for_blog(). Defined at: /wp-includes/capabilities.php -> line 1209. Referenced 1 times: ...
phpxref.ftwr.co.uk - current_user_can_for_blog (WordPress Function) - WPSeek.com
WordPress lookup for current_user_can_for_blog, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com