Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




current_user_can [ WordPress Function ]

current_user_can ( $capability )
Parameters:
  • (string) $capability Capability or role name.
Returns:
  • (bool)
Defined at:



Whether current user has capability or role.

Source


<?php
function current_user_can$capability ) {
    
$current_user wp_get_current_user();

    if ( empty( 
$current_user ) )
        return 
false;

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

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

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics