dozent_instructor_status( int $instructor_id )
Return Dozent Instructors status
Parameters
- $instructor_id
-
(int) (Required) instructor ID will be current user ID if leave it blank
Return
(bool|mixed)
Source
File: includes/core-functions.php
function dozent_instructor_status( $instructor_id = 0 ) { $instructor_id = dozent_get_user_id( $instructor_id ); $data = [ 'status' => null, 'status_name' => null, ]; if ( $instructor_id ) { $instructor_status = apply_filters( 'dozent_instructor_statuses', [ 'pending' => __( 'Pending', 'dozent' ), 'approved' => __( 'Approved', 'dozent' ), 'blocked' => __( 'Blocked', 'dozent' ), ] ); $status = get_user_meta( $instructor_id, '_dozent_instructor', true ); if ( isset( $instructor_status[ $status ] ) ) { $data = [ 'status' => $status, 'status_name' => $instructor_status[ $status ], ]; } } $statusObj = (object) $data; return apply_filters( 'dozent_instructor_status', $statusObj, $instructor_id ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |