dozent_get_attached_instructors_ids( null $course = null )
Get the all instructor ID in an array by a specific course
Description
Example usage:
$instructor_ids = dozent_get_attached_instructors_ids( $course );
See also
Parameters
- $course
-
(null) (Optional)
Default value: null
Return
(mixed|void)
Source
File: includes/user-functions.php
function dozent_get_attached_instructors_ids( $course = null ) { $instructors = dozent_get_attached_instructors( $course ); if ( $instructors->count ) { $ids = wp_list_pluck( $instructors->results, 'instructor_id' ); } else { $ids = []; } /** * Filter the dozent_get_attached_instructors_ids(); function outout * * @since DozentLMS 1.0.0 * * @param array $ids * @param int|object $course */ return apply_filters( 'dozent_get_attached_instructors_ids', array_filter( $ids ), $course ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |