comment.php
3 years ago
comments-loop.php
3 years ago
complete_form.php
3 years ago
content.php
3 years ago
lesson_sidebar.php
3 years ago
required-enroll.php
3 years ago
sidebar_question_and_answer.php
3 years ago
required-enroll.php
26 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Required enrollment template |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Single\Lesson |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 1.0.0 |
| 10 | */ |
| 11 | |
| 12 | $course_id = tutor_utils()->get_course_id_by( 'lesson', get_the_ID() ); |
| 13 | |
| 14 | $args = array( |
| 15 | 'headline' => __( 'Permission Denied', 'tutor' ), |
| 16 | 'message' => __( 'Please enroll in this course to view course content.', 'tutor' ), |
| 17 | 'description' => sprintf( __( 'Course name : %s', 'tutor' ), get_the_title( $course_id ) ), |
| 18 | 'button' => array( |
| 19 | 'url' => get_permalink( $course_id ), |
| 20 | 'text' => __( 'View Course', 'tutor' ), |
| 21 | ), |
| 22 | ); |
| 23 | |
| 24 | tutor_load_template( 'permission-denied', $args ); |
| 25 | |
| 26 |