public function user_is( $role ) {

		if ( ! is_user_logged_in() ) {
			return false;
		}

		$user = wp_get_current_user();
		return in_array( $role, $user->roles );
	}
public function user_is( $role ) {

		if ( ! is_user_logged_in() ) {
			return false;
		}

		$user = wp_get_current_user();
		return in_array( $role, $user->roles );
	}
public function user_is ( $ role ) { if ( ! is_user_logged_in ( ) ) { return false ; } $ user = wp_get_current_user ( ) ; return in_array ( $ role , $ user -> roles ) ; }
Tests whether the current user has the specified role.

@param string $role The role to test.

@return bool
Tests whether the current user has the specified role .