announcements.php
7 years ago
completing-progress.php
7 years ago
lead-info.php
7 years ago
nav.php
7 years ago
question_and_answer.php
7 years ago
nav.php
35 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 | |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) |
| 13 | exit; |
| 14 | |
| 15 | $course_nav_item = tutor_utils()->course_sub_pages(); |
| 16 | ?> |
| 17 | |
| 18 | <?php do_action('tutor_course/single/enrolled/nav/before'); ?> |
| 19 | |
| 20 | <div id="course-enrolled-nav-wrap-<?php echo get_the_ID(); ?>" class="course-enrolled-nav-wrap course-enrolled-nav-wrap-<?php the_ID(); ?>"> |
| 21 | <nav id="course-enrolled-nav-<?php echo get_the_ID(); ?>" class="course-enrolled-nav course-enrolled-nav-<?php the_ID(); ?>"> |
| 22 | <ul> |
| 23 | <li class="<?php echo get_query_var('course_subpage') === '' ? 'active' : ''; ?>"><a href="<?php echo get_permalink(); ?>"><?php _e('Course Page', 'tutor'); ?></a> </li> |
| 24 | <?php |
| 25 | foreach ($course_nav_item as $nav_key => $nav_item){ |
| 26 | $active_class = get_query_var('course_subpage') === $nav_key? 'active' : ''; |
| 27 | $url = trailingslashit(get_permalink()).$nav_key; |
| 28 | echo "<li class='{$active_class}'><a href='{$url}'>{$nav_item}</a> </li>"; |
| 29 | } |
| 30 | ?> |
| 31 | </ul> |
| 32 | </nav> |
| 33 | </div> |
| 34 | |
| 35 | <?php do_action('tutor_course/single/enrolled/nav/after'); ?> |