course-filter
3 years ago
dashboard
3 years ago
email
4 years ago
global
4 years ago
instructor
4 years ago
loop
4 years ago
modal
4 years ago
profile
4 years ago
shortcode
4 years ago
single
3 years ago
template-part
4 years ago
widget
4 years ago
archive-course-init.php
4 years ago
archive-course.php
4 years ago
course-none.php
4 years ago
dashboard.php
3 years ago
feature_disabled.php
4 years ago
instructor-setting.php
4 years ago
login-form.php
4 years ago
login.php
4 years ago
permission-denied.php
4 years ago
public-profile.php
4 years ago
single-assignment.php
4 years ago
single-content-loader.php
4 years ago
single-course.php
4 years ago
single-lesson.php
4 years ago
single-preview-lesson.php
4 years ago
single-quiz.php
3 years ago
template.php
4 years ago
single-course.php
90 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying single course |
| 4 | * |
| 5 | * @since v.1.0.0 |
| 6 | * |
| 7 | * @author Themeum |
| 8 | * @url https://themeum.com |
| 9 | * |
| 10 | * @package TutorLMS/Templates |
| 11 | * @version 1.4.3 |
| 12 | */ |
| 13 | |
| 14 | // Prepare the nav items |
| 15 | $course_id = get_the_ID(); |
| 16 | $course_nav_item = apply_filters( 'tutor_course/single/nav_items', tutor_utils()->course_nav_items(), $course_id ); |
| 17 | $student_must_login_to_view_course = tutor_utils()->get_option('student_must_login_to_view_course'); |
| 18 | $is_public = \TUTOR\Course_List::is_public($course_id); |
| 19 | |
| 20 | tutor_utils()->tutor_custom_header(); |
| 21 | |
| 22 | if (!is_user_logged_in() && !$is_public && $student_must_login_to_view_course){ |
| 23 | tutor_load_template('login'); |
| 24 | tutor_utils()->tutor_custom_footer(); |
| 25 | return; |
| 26 | } |
| 27 | ?> |
| 28 | |
| 29 | <?php do_action('tutor_course/single/before/wrap'); ?> |
| 30 | <div <?php tutor_post_class('tutor-full-width-course-top tutor-course-top-info tutor-page-wrap tutor-wrap-parent'); ?>> |
| 31 | <div class="tutor-course-details-page tutor-container"> |
| 32 | <?php (isset($is_enrolled) && $is_enrolled) ? tutor_course_enrolled_lead_info() : tutor_course_lead_info(); ?> |
| 33 | <div class="tutor-row tutor-gx-xl-5"> |
| 34 | <main class="tutor-col-xl-8"> |
| 35 | <?php tutor_utils()->has_video_in_single() ? tutor_course_video() : get_tutor_course_thumbnail(); ?> |
| 36 | <?php do_action('tutor_course/single/before/inner-wrap'); ?> |
| 37 | <div class="tutor-course-details-tab tutor-mt-32"> |
| 38 | <?php if ( is_array( $course_nav_item ) && count( $course_nav_item ) > 1 ) : ?> |
| 39 | <div class="tutor-is-sticky"> |
| 40 | <?php tutor_load_template( 'single.course.enrolled.nav', array('course_nav_item' => $course_nav_item ) ); ?> |
| 41 | </div> |
| 42 | <?php endif; ?> |
| 43 | <div class="tutor-tab tutor-pt-24"> |
| 44 | <?php foreach( $course_nav_item as $key => $subpage ) : ?> |
| 45 | <div id="tutor-course-details-tab-<?php echo $key; ?>" class="tutor-tab-item<?php echo $key == 'info' ? ' is-active' : ''; ?>"> |
| 46 | <?php |
| 47 | do_action( 'tutor_course/single/tab/'.$key.'/before' ); |
| 48 | |
| 49 | $method = $subpage['method']; |
| 50 | if ( is_string($method) ) { |
| 51 | $method(); |
| 52 | } else { |
| 53 | $_object = $method[0]; |
| 54 | $_method = $method[1]; |
| 55 | $_object->$_method(get_the_ID()); |
| 56 | } |
| 57 | |
| 58 | do_action( 'tutor_course/single/tab/'.$key.'/after' ); |
| 59 | ?> |
| 60 | </div> |
| 61 | <?php endforeach; ?> |
| 62 | </div> |
| 63 | </div> |
| 64 | <?php do_action('tutor_course/single/after/inner-wrap'); ?> |
| 65 | </main> |
| 66 | |
| 67 | <aside class="tutor-col-xl-4"> |
| 68 | <div class="tutor-single-course-sidebar tutor-mt-40 tutor-mt-xl-0"> |
| 69 | <?php do_action('tutor_course/single/before/sidebar'); ?> |
| 70 | <?php tutor_load_template('single.course.course-entry-box'); ?> |
| 71 | |
| 72 | <div class="tutor-single-course-sidebar-more tutor-mt-24"> |
| 73 | <?php tutor_course_instructors_html(); ?> |
| 74 | <?php tutor_course_requirements_html(); ?> |
| 75 | <?php tutor_course_tags_html(); ?> |
| 76 | <?php tutor_course_target_audience_html(); ?> |
| 77 | </div> |
| 78 | |
| 79 | <?php do_action('tutor_course/single/after/sidebar'); ?> |
| 80 | </div> |
| 81 | </aside> |
| 82 | </div> |
| 83 | </div> |
| 84 | </div> |
| 85 | |
| 86 | <?php do_action('tutor_course/single/after/wrap'); ?> |
| 87 | |
| 88 | <?php |
| 89 | tutor_utils()->tutor_custom_footer(); |
| 90 |