course-archive-filter-bar.php
35 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package TutorLMS/Templates |
| 4 | * @version 1.4.3 |
| 5 | */ |
| 6 | |
| 7 | if ( ! tutor_utils()->get_option( 'course_archive_filter_sorting', true, true, true ) ) { |
| 8 | return; |
| 9 | } |
| 10 | |
| 11 | $sort_by = \TUTOR\Input::get( 'course_order', '' ); |
| 12 | ?> |
| 13 | |
| 14 | <!-- |
| 15 | Note Do not remove tutor-course-filter attr. It required by _archive.js for filter function. |
| 16 | !--> |
| 17 | <div style="text-align: right;" class="tutor-course-filter" tutor-course-filter> |
| 18 | <form style="display: inline-block;"> |
| 19 | <select class="tutor-form-select" name="course_order"> |
| 20 | <option value="newest_first" <?php selected( 'newest_first', $sort_by ); ?> > |
| 21 | <?php esc_html_e( 'Release Date (newest first)', 'tutor' ); ?> |
| 22 | </option> |
| 23 | <option value="oldest_first" <?php selected( 'oldest_first', $sort_by ); ?>> |
| 24 | <?php esc_html_e( 'Release Date (oldest first)', 'tutor' ); ?> |
| 25 | </option> |
| 26 | <option value="course_title_az" <?php selected( 'course_title_az', $sort_by ); ?>> |
| 27 | <?php esc_html_e( 'Course Title (a-z)', 'tutor' ); ?> |
| 28 | </option> |
| 29 | <option value="course_title_za" <?php selected( 'course_title_za', $sort_by ); ?>> |
| 30 | <?php esc_html_e( 'Course Title (z-a)', 'tutor' ); ?> |
| 31 | </option> |
| 32 | </select> |
| 33 | </form> |
| 34 | </div> |
| 35 | <br/> |