PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.7
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 / single-course / section / item-meta.php

item-meta.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.7, at templates/single-course/section/item-meta.php

40 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for displaying item section meta in single course.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/single-course/section/item-meta.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 4.0.0
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 if ( ! isset( $item ) ) {
15 return;
16 }
17
18 $course = learn_press_get_course();
19 if ( ! $course ) {
20 return;
21 }
22
23 $user = learn_press_get_current_user();
24 ?>
25
26 <div class="course-item-meta">
27
28 <?php do_action( 'learn-press/course-section-item/before-' . $item->get_item_type() . '-meta', $item ); ?>
29
30 <?php if ( $item->is_preview() && $user && ! $user->has_completed_item( $item->get_id(), $course->get_id() ) ) : ?>
31 <span class="item-meta course-item-preview"
32 data-preview="<?php esc_attr_e( 'Preview', 'learnpress' ); ?>"></span>
33
34 <?php else : ?>
35 <span class="item-meta course-item-status" title="<?php echo esc_attr( $item->get_status_title() ); ?>"></span>
36 <?php endif; ?>
37
38 <?php do_action( 'learn-press/course-section-item/after-' . $item->get_item_type() . '-meta', $item ); ?>
39 </div>
40