PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.9
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 4.2.1 All 138 releases
learnpress / templates / single-course-layout.php

single-course-layout.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.9, at templates/single-course-layout.php

48 lines 844 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for displaying content of single course offline.
4 *
5 * @author ThimPress
6 * @package LearnPress/Templates
7 * @version 4.2.7.6
8 * @version 1.0.1
9 */
10
11 use LearnPress\Models\CourseModel;
12
13 defined( 'ABSPATH' ) || exit;
14
15 /**
16 * Header for page
17 */
18 if ( ! wp_is_block_theme() ) {
19 get_header( 'course' );
20 }
21
22 $course_id = get_the_ID();
23 if ( $course_id ) {
24 /**
25 * If course has set password
26 */
27 if ( post_password_required() ) {
28 echo '<div class="lp-content-area">';
29 echo get_the_password_form();
30 echo '</div>';
31 return;
32 }
33
34 $courseModel = CourseModel::find( $course_id, true );
35 if ( ! $courseModel ) {
36 return;
37 }
38
39 do_action( 'learn-press/single-course/layout', $courseModel );
40 }
41
42 /**
43 * Footer for page
44 */
45 if ( ! wp_is_block_theme() ) {
46 get_footer( 'course' );
47 }
48