PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9
4.4.8 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 All 139 releases
learnpress / templates / content-lesson / content.php

content.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.6.9, at templates/content-lesson/content.php

36 lines 847 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 description of lesson.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/content-lesson/description.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 4.0.0
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 /**
15 * @var LP_Lesson $lesson
16 */
17 if ( ! isset( $lesson ) ) {
18 return;
19 }
20
21 $content = $lesson->get_content();
22
23 if ( ! $content ) {
24 $message = esc_html__( 'Lesson content is empty.', 'learnpress' );
25
26 if ( $lesson->current_user_can_edit() ) {
27 $message .= sprintf( '<a href="%s" class="edit-content">%s</a>', esc_url_raw( $lesson->get_edit_link() ), esc_html__( 'Edit', 'learnpress' ) );
28 }
29
30 learn_press_display_message( $message, 'notice' );
31 return;
32 }
33 ?>
34
35 <div class="content-item-description lesson-description"><?php echo wp_kses_post( $content ); ?></div>
36