course-filter
1 year ago
dashboard
8 months ago
ecommerce
7 months ago
email
9 months ago
global
3 years ago
instructor
3 years ago
loop
9 months ago
modal
3 years ago
profile
3 years ago
shortcode
1 year ago
single
8 months ago
template-part
1 year ago
widget
3 years ago
archive-course-init.php
9 months ago
archive-course.php
3 years ago
course-embed.php
1 year ago
course-none.php
3 years ago
dashboard.php
1 year ago
feature_disabled.php
3 years ago
login-form.php
1 year ago
login.php
3 years ago
metabox-wrapper.php
3 years ago
permission-denied.php
3 years ago
public-profile.php
8 months ago
single-assignment.php
3 years ago
single-content-loader.php
2 years ago
single-course.php
9 months 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
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 |