is_dozent_instructor( int $user_id )
Returns whether a particular user has the instructor capability.
Description
This function accepts an user ID of an user to check against if the instructor capability.
Example usage:
is_dozent_instructor($user->ID);
Parameters
- $user_id
-
(int) (Required)
Return
(bool)
Source
File: includes/conditional-functions.php
function is_dozent_instructor( $user_id = 0 ) { if ( $user_id ) { $is_instructor = user_can( $user_id, DOZENT_INSTRUCTOR_ROLE ); } else { $is_instructor = current_user_can( DOZENT_INSTRUCTOR_ROLE ); } return $is_instructor; }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |