announcements.php
4 years ago
completing-progress.php
4 years ago
lead-info.php
4 years ago
nav.php
4 years ago
question_and_answer.php
4 years ago
nav.php
43 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying enrolled course view nav menu |
| 4 | * |
| 5 | * @since v.1.0.0 |
| 6 | * |
| 7 | * @author Themeum |
| 8 | * @url https://themeum.com |
| 9 | * |
| 10 | * @package TutorLMS/Templates |
| 11 | * @version 1.4.3 |
| 12 | */ |
| 13 | |
| 14 | |
| 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | exit; |
| 17 | } |
| 18 | |
| 19 | $course_nav_item = tutor_utils()->course_sub_pages(); |
| 20 | ?> |
| 21 | |
| 22 | <?php do_action( 'tutor_course/single/enrolled/nav/before' ); ?> |
| 23 | |
| 24 | <div id="course-enrolled-nav-wrap-<?php echo get_the_ID(); ?>" class="course-enrolled-nav-wrap course-enrolled-nav-wrap-<?php the_ID(); ?>"> |
| 25 | <nav id="course-enrolled-nav-<?php echo get_the_ID(); ?>" class="course-enrolled-nav course-enrolled-nav-<?php the_ID(); ?>"> |
| 26 | <ul> |
| 27 | <li class="<?php echo get_query_var( 'course_subpage' ) === '' ? 'active' : ''; ?>"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php _e( 'Course Page', 'tutor' ); ?></a> </li> |
| 28 | <?php |
| 29 | foreach ( $course_nav_item as $nav_key => $nav_item ) { |
| 30 | $active_class = get_query_var( 'course_subpage' ) === $nav_key ? 'active' : ''; |
| 31 | $url = trailingslashit( get_permalink() ) . $nav_key; |
| 32 | |
| 33 | echo '<li class="' . esc_attr( $active_class ) . '"> |
| 34 | <a href="' . esc_url( $url ) . '">' . esc_attr( $nav_item ) . '</a> |
| 35 | </li>'; |
| 36 | } |
| 37 | ?> |
| 38 | </ul> |
| 39 | </nav> |
| 40 | </div> |
| 41 | |
| 42 | <?php do_action( 'tutor_course/single/enrolled/nav/after' ); ?> |
| 43 |