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.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / templates / single-course.php
tutor / templates Last commit date
course-filter 3 months ago dashboard 1 week ago ecommerce 2 weeks ago email 1 month ago global 1 month ago instructor 3 years ago learning-area 1 week ago loop 1 month ago modal 3 months ago profile 3 years ago shared 2 weeks ago shortcode 3 months ago single 2 weeks ago template-part 1 month ago widget 3 years ago account-header.php 1 month ago account.php 1 month ago archive-course-init.php 10 months ago archive-course.php 3 years ago course-embed.php 3 months ago course-none.php 3 years ago dashboard-isolated.php 1 month ago dashboard.php 1 month ago feature_disabled.php 3 years ago login-form-legacy.php 1 month ago login-form.php 1 month ago login.php 1 month ago permission-denied.php 1 month ago public-profile.php 1 month ago single-assignment.php 3 years ago single-content-loader.php 3 months ago single-course.php 1 month ago single-lesson.php 3 years ago single-preview-lesson.php 3 years ago single-quiz.php 1 year ago template.php 3 years ago user-profile.php 1 month ago
single-course.php
115 lines
1 <?php
2 /**
3 * Template for displaying single course
4 *
5 * @package Tutor\Templates
6 * @author Themeum <support@themeum.com>
7 * @link https://themeum.com
8 * @since 1.0.0
9 */
10
11 defined( 'ABSPATH' ) || exit;
12
13 use Tutor\Models\EnrollmentModel;
14
15 $course_id = get_the_ID();
16 $course_rating = tutor_utils()->get_course_rating( $course_id );
17 $is_enrolled = EnrollmentModel::is_enrolled( $course_id, get_current_user_id() );
18
19 // Prepare the nav items.
20 $course_nav_item = apply_filters( 'tutor_course/single/nav_items', tutor_utils()->course_nav_items(), $course_id );
21 $is_public = \TUTOR\Course_List::is_public( $course_id );
22 $is_mobile = wp_is_mobile();
23
24 $enrollment_box_position = tutor_utils()->get_option( 'enrollment_box_position_in_mobile', 'bottom' );
25 if ( '-1' === $enrollment_box_position ) {
26 $enrollment_box_position = 'bottom';
27 }
28 $student_must_login_to_view_course = tutor_utils()->get_option( 'student_must_login_to_view_course' );
29
30 tutor_utils()->tutor_custom_header();
31
32 if ( ! is_user_logged_in() && ! $is_public && $student_must_login_to_view_course ) {
33 tutor_load_template( 'login' );
34 tutor_utils()->tutor_custom_footer();
35 return;
36 }
37 $has_video = apply_filters( 'tutor_course_has_video', tutor_utils()->has_video_in_single(), $course_id );
38
39 $is_enabled_wishlist = tutor_utils()->get_option( 'enable_wishlist', true );
40
41 ?>
42
43 <?php do_action( 'tutor_course/single/before/wrap' ); ?>
44 <div <?php tutor_post_class( 'tutor-full-width-course-top tutor-course-top-info tutor-page-wrap tutor-wrap-parent' ); ?>>
45 <div class="tutor-course-details-page tutor-container">
46 <?php ( isset( $is_enrolled ) && $is_enrolled ) ? tutor_course_enrolled_lead_info() : tutor_course_lead_info(); ?>
47 <div class="tutor-row tutor-gx-xl-5">
48 <main class="tutor-col-xl-8">
49 <?php $has_video ? tutor_course_video() : get_tutor_course_thumbnail(); ?>
50 <?php do_action( 'tutor_course/single/before/inner-wrap' ); ?>
51
52 <?php if ( $is_mobile && 'top' === $enrollment_box_position ) : ?>
53 <div class="tutor-mt-32">
54 <?php tutor_load_template( 'single.course.course-entry-box' ); ?>
55 </div>
56 <?php endif; ?>
57
58 <div class="tutor-course-details-tab tutor-mt-32">
59 <?php if ( is_array( $course_nav_item ) && count( $course_nav_item ) > 1 ) : ?>
60 <div class="tutor-is-sticky">
61 <?php tutor_load_template( 'single.course.enrolled.nav', array( 'course_nav_item' => $course_nav_item ) ); ?>
62 </div>
63 <?php endif; ?>
64 <div class="tutor-tab tutor-pt-24">
65 <?php foreach ( $course_nav_item as $key => $subpage ) : ?>
66 <div id="tutor-course-details-tab-<?php echo esc_attr( $key ); ?>" class="tutor-tab-item<?php echo 'info' == $key ? ' is-active' : ''; ?>">
67 <?php
68 do_action( 'tutor_course/single/tab/' . $key . '/before' );
69
70 $method = $subpage['method'];
71 if ( is_string( $method ) ) {
72 $method();
73 } else {
74 $_object = $method[0];
75 $_method = $method[1];
76 $_object->$_method( get_the_ID() );
77 }
78
79 do_action( 'tutor_course/single/tab/' . $key . '/after' );
80 ?>
81 </div>
82 <?php endforeach; ?>
83 </div>
84 </div>
85 <?php do_action( 'tutor_course/single/after/inner-wrap' ); ?>
86 </main>
87
88 <aside class="tutor-col-xl-4">
89 <?php $sidebar_attr = apply_filters( 'tutor_course_details_sidebar_attr', '' ); ?>
90 <div class="tutor-single-course-sidebar tutor-mt-40 tutor-mt-xl-0" <?php echo esc_attr( $sidebar_attr ); ?> >
91 <?php do_action( 'tutor_course/single/before/sidebar' ); ?>
92
93 <?php if ( ( $is_mobile && 'bottom' === $enrollment_box_position ) || ! $is_mobile ) : ?>
94 <?php tutor_load_template( 'single.course.course-entry-box' ); ?>
95 <?php endif ?>
96
97 <div class="tutor-single-course-sidebar-more tutor-mt-24">
98 <?php tutor_course_instructors_html(); ?>
99 <?php tutor_course_requirements_html(); ?>
100 <?php tutor_course_tags_html(); ?>
101 <?php tutor_course_target_audience_html(); ?>
102 </div>
103
104 <?php do_action( 'tutor_course/single/after/sidebar' ); ?>
105 </div>
106 </aside>
107 </div>
108 </div>
109 </div>
110
111 <?php do_action( 'tutor_course/single/after/wrap' ); ?>
112
113 <?php
114 tutor_utils()->tutor_custom_footer();
115