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.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 1 year ago dashboard 8 months ago ecommerce 7 months ago email 9 months ago global 3 years ago instructor 3 years ago loop 9 months ago modal 3 years ago profile 3 years ago shortcode 1 year ago single 8 months ago template-part 1 year ago widget 3 years ago archive-course-init.php 9 months ago archive-course.php 3 years ago course-embed.php 1 year ago course-none.php 3 years ago dashboard.php 1 year ago feature_disabled.php 3 years ago login-form.php 1 year ago login.php 3 years ago metabox-wrapper.php 3 years ago permission-denied.php 3 years ago public-profile.php 8 months ago single-assignment.php 3 years ago single-content-loader.php 2 years ago single-course.php 9 months 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
single-course.php
111 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 $course_id = get_the_ID();
12 $course_rating = tutor_utils()->get_course_rating( $course_id );
13 $is_enrolled = tutor_utils()->is_enrolled( $course_id, get_current_user_id() );
14
15 // Prepare the nav items.
16 $course_nav_item = apply_filters( 'tutor_course/single/nav_items', tutor_utils()->course_nav_items(), $course_id );
17 $is_public = \TUTOR\Course_List::is_public( $course_id );
18 $is_mobile = wp_is_mobile();
19
20 $enrollment_box_position = tutor_utils()->get_option( 'enrollment_box_position_in_mobile', 'bottom' );
21 if ( '-1' === $enrollment_box_position ) {
22 $enrollment_box_position = 'bottom';
23 }
24 $student_must_login_to_view_course = tutor_utils()->get_option( 'student_must_login_to_view_course' );
25
26 tutor_utils()->tutor_custom_header();
27
28 if ( ! is_user_logged_in() && ! $is_public && $student_must_login_to_view_course ) {
29 tutor_load_template( 'login' );
30 tutor_utils()->tutor_custom_footer();
31 return;
32 }
33 $has_video = apply_filters( 'tutor_course_has_video', tutor_utils()->has_video_in_single(), $course_id );
34
35 $is_enabled_wishlist = tutor_utils()->get_option( 'enable_wishlist', true );
36
37 ?>
38
39 <?php do_action( 'tutor_course/single/before/wrap' ); ?>
40 <div <?php tutor_post_class( 'tutor-full-width-course-top tutor-course-top-info tutor-page-wrap tutor-wrap-parent' ); ?>>
41 <div class="tutor-course-details-page tutor-container">
42 <?php ( isset( $is_enrolled ) && $is_enrolled ) ? tutor_course_enrolled_lead_info() : tutor_course_lead_info(); ?>
43 <div class="tutor-row tutor-gx-xl-5">
44 <main class="tutor-col-xl-8">
45 <?php $has_video ? tutor_course_video() : get_tutor_course_thumbnail(); ?>
46 <?php do_action( 'tutor_course/single/before/inner-wrap' ); ?>
47
48 <?php if ( $is_mobile && 'top' === $enrollment_box_position ) : ?>
49 <div class="tutor-mt-32">
50 <?php tutor_load_template( 'single.course.course-entry-box' ); ?>
51 </div>
52 <?php endif; ?>
53
54 <div class="tutor-course-details-tab tutor-mt-32">
55 <?php if ( is_array( $course_nav_item ) && count( $course_nav_item ) > 1 ) : ?>
56 <div class="tutor-is-sticky">
57 <?php tutor_load_template( 'single.course.enrolled.nav', array( 'course_nav_item' => $course_nav_item ) ); ?>
58 </div>
59 <?php endif; ?>
60 <div class="tutor-tab tutor-pt-24">
61 <?php foreach ( $course_nav_item as $key => $subpage ) : ?>
62 <div id="tutor-course-details-tab-<?php echo esc_attr( $key ); ?>" class="tutor-tab-item<?php echo 'info' == $key ? ' is-active' : ''; ?>">
63 <?php
64 do_action( 'tutor_course/single/tab/' . $key . '/before' );
65
66 $method = $subpage['method'];
67 if ( is_string( $method ) ) {
68 $method();
69 } else {
70 $_object = $method[0];
71 $_method = $method[1];
72 $_object->$_method( get_the_ID() );
73 }
74
75 do_action( 'tutor_course/single/tab/' . $key . '/after' );
76 ?>
77 </div>
78 <?php endforeach; ?>
79 </div>
80 </div>
81 <?php do_action( 'tutor_course/single/after/inner-wrap' ); ?>
82 </main>
83
84 <aside class="tutor-col-xl-4">
85 <?php $sidebar_attr = apply_filters( 'tutor_course_details_sidebar_attr', '' ); ?>
86 <div class="tutor-single-course-sidebar tutor-mt-40 tutor-mt-xl-0" <?php echo esc_attr( $sidebar_attr ); ?> >
87 <?php do_action( 'tutor_course/single/before/sidebar' ); ?>
88
89 <?php if ( ( $is_mobile && 'bottom' === $enrollment_box_position ) || ! $is_mobile ) : ?>
90 <?php tutor_load_template( 'single.course.course-entry-box' ); ?>
91 <?php endif ?>
92
93 <div class="tutor-single-course-sidebar-more tutor-mt-24">
94 <?php tutor_course_instructors_html(); ?>
95 <?php tutor_course_requirements_html(); ?>
96 <?php tutor_course_tags_html(); ?>
97 <?php tutor_course_target_audience_html(); ?>
98 </div>
99
100 <?php do_action( 'tutor_course/single/after/sidebar' ); ?>
101 </div>
102 </aside>
103 </div>
104 </div>
105 </div>
106
107 <?php do_action( 'tutor_course/single/after/wrap' ); ?>
108
109 <?php
110 tutor_utils()->tutor_custom_footer();
111