post_type;
$aelms_allowed_post_type = [
acadlix()->cpt()->course()->get_post_type(),
];
if (acadlix()->helper()->is_course_bundle_addon_active()) {
$aelms_allowed_post_type[] = acadlix()->cpt()->course_bundle()->get_post_type();
}
$type = 'course';
if (in_array($post_type, $aelms_allowed_post_type)) {
if ($post_type == acadlix()->cpt()->course()->get_post_type()) {
$aelms_item = acadlix()->model()->course()->ofCourse()->find($post->ID);
$type = 'course';
} else if ($post_type == acadlix()->cpt()->course_bundle()->get_post_type()) {
$aelms_item = acadlix()->model()->courseBundle()->ofCourseBundle()->find($post->ID);
$type = 'course-bundle';
}
if ($aelms_item) {
if ($aelms_display_title) {
echo sprintf(
'<%1$s class="aelms-course-instructors-title">
' . esc_html($aelms_title) . '
%1$s>',
esc_attr($aelms_title_tag)
);
}
}
if (count($aelms_item->users) > 0) {
foreach ($aelms_item->users as $aelms_user) {
aelms_course_instructors($aelms_display_profile_picture, $aelms_display_name, $aelms_display_bio, $aelms_target, $aelms_user->ID);
}
} else {
aelms_course_instructors($aelms_display_profile_picture, $aelms_display_name, $aelms_display_bio, $aelms_target, $post->post_author);
}
?>