course-filter
2 months ago
dashboard
1 day ago
ecommerce
1 day ago
email
1 day ago
global
1 week ago
instructor
3 years ago
learning-area
1 day ago
loop
1 day ago
modal
2 months ago
profile
3 years ago
shared
1 day ago
shortcode
2 months ago
single
1 day ago
template-part
1 day ago
widget
3 years ago
account-header.php
1 day ago
account.php
1 day ago
archive-course-init.php
9 months ago
archive-course.php
3 years ago
course-embed.php
2 months ago
course-none.php
3 years ago
dashboard-isolated.php
1 day ago
dashboard.php
1 day ago
feature_disabled.php
3 years ago
login-form-legacy.php
1 day ago
login-form.php
1 day ago
login.php
1 day ago
permission-denied.php
1 day ago
public-profile.php
1 day ago
single-assignment.php
3 years ago
single-content-loader.php
2 months ago
single-course.php
1 day ago
single-lesson.php
3 years ago
single-preview-lesson.php
3 years ago
single-quiz.php
1 year ago
template.php
3 years ago
user-profile.php
1 day ago
archive-course.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying courses |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage CourseArchive |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 1.5.8 |
| 10 | */ |
| 11 | |
| 12 | use TUTOR\Input; |
| 13 | |
| 14 | tutor_utils()->tutor_custom_header(); |
| 15 | |
| 16 | $get = isset( $_GET['course_filter'] ) ? Input::sanitize_array( $_GET ) : array();//phpcs:ignore |
| 17 | if ( isset( $get['course_filter'] ) ) { |
| 18 | $filter = ( new \Tutor\Course_Filter( false ) )->load_listing( $get, true ); |
| 19 | query_posts( $filter ); |
| 20 | } |
| 21 | |
| 22 | // Load the template. |
| 23 | tutor_load_template( |
| 24 | 'archive-course-init', |
| 25 | array_merge( |
| 26 | $get, |
| 27 | array( |
| 28 | 'course_filter' => (bool) tutor_utils()->get_option( 'course_archive_filter', false ), |
| 29 | 'supported_filters' => tutor_utils()->get_option( 'supported_course_filters', array() ), |
| 30 | 'loop_content_only' => false, |
| 31 | ) |
| 32 | ) |
| 33 | ); |
| 34 | |
| 35 | tutor_utils()->tutor_custom_footer(); |
| 36 |