| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template for displaying content of Course Info widget. |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/learnpress/widgets/course-info/default.php. |
| 6 |
* |
| 7 |
* @author ThimPress |
| 8 |
* @category Widgets |
| 9 |
* @package Learnpress/Templates |
| 10 |
* @version 4.1.3 |
| 11 |
*/ |
| 12 |
|
| 13 |
defined( 'ABSPATH' ) || exit(); |
| 14 |
|
| 15 |
if ( ! isset( $course ) || ! $course || ! isset( $instance ) ) { |
| 16 |
return; |
| 17 |
} |
| 18 |
?> |
| 19 |
|
| 20 |
<div class="lp_widget_course_info <?php echo esc_attr( $instance['css_class'] ); ?>"> |
| 21 |
<h3><?php echo wp_kses_post( $course->get_title() ); ?></h3> |
| 22 |
|
| 23 |
<ul class="lp-course-info-fields"> |
| 24 |
<li class="lp-course-info lessons"> |
| 25 |
<label><?php esc_html_e( 'Lessons', 'learnpress' ); ?></label> |
| 26 |
<?php learn_press_label_html( $course->count_items( LP_LESSON_CPT ) ); ?> |
| 27 |
</li> |
| 28 |
|
| 29 |
<li class="lp-course-info quizzes"> |
| 30 |
<label><?php esc_html_e( 'Quizzes', 'learnpress' ); ?></label> |
| 31 |
<?php learn_press_label_html( $course->count_items( LP_QUIZ_CPT ) ); ?> |
| 32 |
</li> |
| 33 |
|
| 34 |
<li class="lp-course-info all-items"> |
| 35 |
<label><?php esc_html_e( 'All', 'learnpress' ); ?></label> |
| 36 |
<?php learn_press_label_html( $course->count_items() ); ?> |
| 37 |
</li> |
| 38 |
</ul> |
| 39 |
</div> |
| 40 |
|
| 41 |
|