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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 1 year ago email 2 years ago global 3 years ago instructor 3 years ago loop 2 years ago modal 3 years ago profile 3 years ago shortcode 2 years ago single 2 years ago template-part 3 years ago widget 3 years ago archive-course-init.php 1 year ago archive-course.php 3 years ago course-embed.php 3 years ago course-none.php 3 years ago dashboard.php 3 years ago feature_disabled.php 3 years ago login-form.php 3 years ago login.php 3 years ago metabox-wrapper.php 3 years ago permission-denied.php 3 years ago public-profile.php 2 years ago single-assignment.php 3 years ago single-content-loader.php 2 years ago single-course.php 2 years ago single-lesson.php 3 years ago single-preview-lesson.php 3 years ago single-quiz.php 3 years ago template.php 3 years ago
single-course.php
107 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 ?>
34
35 <?php do_action( 'tutor_course/single/before/wrap' ); ?>
36 <div <?php tutor_post_class( 'tutor-full-width-course-top tutor-course-top-info tutor-page-wrap tutor-wrap-parent' ); ?>>
37 <div class="tutor-course-details-page tutor-container">
38 <?php ( isset( $is_enrolled ) && $is_enrolled ) ? tutor_course_enrolled_lead_info() : tutor_course_lead_info(); ?>
39 <div class="tutor-row tutor-gx-xl-5">
40 <main class="tutor-col-xl-8">
41 <?php tutor_utils()->has_video_in_single() ? tutor_course_video() : get_tutor_course_thumbnail(); ?>
42 <?php do_action( 'tutor_course/single/before/inner-wrap' ); ?>
43
44 <?php if ( $is_mobile && 'top' === $enrollment_box_position ) : ?>
45 <div class="tutor-mt-32">
46 <?php tutor_load_template( 'single.course.course-entry-box' ); ?>
47 </div>
48 <?php endif; ?>
49
50 <div class="tutor-course-details-tab tutor-mt-32">
51 <?php if ( is_array( $course_nav_item ) && count( $course_nav_item ) > 1 ) : ?>
52 <div class="tutor-is-sticky">
53 <?php tutor_load_template( 'single.course.enrolled.nav', array( 'course_nav_item' => $course_nav_item ) ); ?>
54 </div>
55 <?php endif; ?>
56 <div class="tutor-tab tutor-pt-24">
57 <?php foreach ( $course_nav_item as $key => $subpage ) : ?>
58 <div id="tutor-course-details-tab-<?php echo esc_attr( $key ); ?>" class="tutor-tab-item<?php echo 'info' == $key ? ' is-active' : ''; ?>">
59 <?php
60 do_action( 'tutor_course/single/tab/' . $key . '/before' );
61
62 $method = $subpage['method'];
63 if ( is_string( $method ) ) {
64 $method();
65 } else {
66 $_object = $method[0];
67 $_method = $method[1];
68 $_object->$_method( get_the_ID() );
69 }
70
71 do_action( 'tutor_course/single/tab/' . $key . '/after' );
72 ?>
73 </div>
74 <?php endforeach; ?>
75 </div>
76 </div>
77 <?php do_action( 'tutor_course/single/after/inner-wrap' ); ?>
78 </main>
79
80 <aside class="tutor-col-xl-4">
81 <?php $sidebar_attr = apply_filters( 'tutor_course_details_sidebar_attr', '' ); ?>
82 <div class="tutor-single-course-sidebar tutor-mt-40 tutor-mt-xl-0" <?php echo esc_attr( $sidebar_attr ); ?> >
83 <?php do_action( 'tutor_course/single/before/sidebar' ); ?>
84
85 <?php if ( ( $is_mobile && 'bottom' === $enrollment_box_position ) || ! $is_mobile ) : ?>
86 <?php tutor_load_template( 'single.course.course-entry-box' ); ?>
87 <?php endif ?>
88
89 <div class="tutor-single-course-sidebar-more tutor-mt-24">
90 <?php tutor_course_instructors_html(); ?>
91 <?php tutor_course_requirements_html(); ?>
92 <?php tutor_course_tags_html(); ?>
93 <?php tutor_course_target_audience_html(); ?>
94 </div>
95
96 <?php do_action( 'tutor_course/single/after/sidebar' ); ?>
97 </div>
98 </aside>
99 </div>
100 </div>
101 </div>
102
103 <?php do_action( 'tutor_course/single/after/wrap' ); ?>
104
105 <?php
106 tutor_utils()->tutor_custom_footer();
107