PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.2.0
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.2.0
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 / buttons / retry.php

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

50 lines 1.3 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 Retake button in single course.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/single-course/buttons/retake.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 4.0.1
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 if ( ! isset( $can_retake_times ) ) {
15 return;
16 }
17
18 $course = learn_press_get_course();
19 if ( ! $course ) {
20 return;
21 }
22
23 $message_data_confirm = sprintf(
24 '%s "%s"',
25 esc_html__( 'Do you want to retake the course', 'learnpress' ),
26 $course->get_title()
27 );
28 ?>
29
30 <?php do_action( 'lp/tmpl/course/button-retry/form/before' ); ?>
31
32 <form name="lp-form-retake-course" class="lp-form-retake-course" method="post" enctype="multipart/form-data"
33 data-confirm="<?php echo esc_attr( $message_data_confirm ); ?>">
34
35 <?php do_action( 'lp/tmpl/course/button-retry/before' ); ?>
36
37 <input type="hidden" name="retake-course" value="<?php echo esc_attr( $course->get_id() ); ?>"/>
38
39 <button class="lp-button button button-retake-course">
40 <?php echo sprintf( '%s (%d)', esc_html__( 'Retake course', 'learnpress' ), $can_retake_times ); ?>
41 </button>
42
43 <div class="lp-ajax-message"></div>
44
45 <?php do_action( 'lp/tmpl/course/button-retry/after' ); ?>
46
47 </form>
48
49 <?php do_action( 'lp/tmpl/course/button-retry/form/after' ); ?>
50