Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get_user_meta

global $current_user; 
 
get_currentuserinfo();
 
if ( $current_user ) {
    $permission = get_user_meta( $current_user->ID, 'some_meta' , true );
     
    if ( ! empty( $permission ) ) {
        // do stuff
    }
}
// works for both array and single values
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+9 =