nav-bar.php
3 years ago
profile.php
1 year ago
reset-password.php
1 year ago
social-profile.php
1 year ago
withdraw-settings.php
1 year ago
nav-bar.php
58 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying Assignments |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Dashboard\Settings |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 1.6.2 |
| 10 | */ |
| 11 | |
| 12 | $settings_url = tutor_utils()->get_tutor_dashboard_page_permalink( 'settings' ); |
| 13 | $withdraw = tutor_utils()->get_tutor_dashboard_page_permalink( 'settings/withdraw-settings' ); |
| 14 | $reset_password = tutor_utils()->get_tutor_dashboard_page_permalink( 'settings/reset-password' ); |
| 15 | $social = tutor_utils()->get_tutor_dashboard_page_permalink( 'settings/social-profile' ); |
| 16 | |
| 17 | $setting_menus = array( |
| 18 | 'profile' => array( |
| 19 | 'url' => esc_url( $settings_url ), |
| 20 | 'title' => __( 'Profile', 'tutor' ), |
| 21 | 'role' => false, |
| 22 | ), |
| 23 | 'reset_password' => array( |
| 24 | 'url' => esc_url( $reset_password ), |
| 25 | 'title' => __( 'Password', 'tutor' ), |
| 26 | 'role' => false, |
| 27 | ), |
| 28 | 'withdrawal' => array( |
| 29 | 'url' => esc_url( $withdraw ), |
| 30 | 'title' => __( 'Withdraw', 'tutor' ), |
| 31 | 'role' => 'instructor', |
| 32 | ), |
| 33 | 'social-profile' => array( |
| 34 | 'url' => esc_url( $social ), |
| 35 | 'title' => __( 'Social Profile', 'tutor' ), |
| 36 | 'role' => false, |
| 37 | ), |
| 38 | ); |
| 39 | |
| 40 | $setting_menus = apply_filters( 'tutor_dashboard/nav_items/settings/nav_items', $setting_menus ); |
| 41 | $GLOBALS['tutor_setting_nav'] = $setting_menus; |
| 42 | ?> |
| 43 | |
| 44 | <ul class="tutor-nav" tutor-priority-nav> |
| 45 | <?php foreach ( $setting_menus as $menu_key => $menu ) : ?> |
| 46 | <?php $valid = 'profile' == $menu_key || ! $menu['role'] || ( 'instructor' == $menu['role'] && current_user_can( tutor()->instructor_role ) ); ?> |
| 47 | <?php if ( $valid ) : ?> |
| 48 | <li class="tutor-nav-item"> |
| 49 | <a class="tutor-nav-link<?php echo $active_setting_nav == $menu_key ? ' is-active' : ''; ?>" href="<?php echo esc_url( $menu['url'] ); ?>"><?php echo esc_html( $menu['title'] ); ?></a> |
| 50 | </li> |
| 51 | <?php endif; ?> |
| 52 | <?php endforeach; ?> |
| 53 | <li class="tutor-nav-item tutor-nav-more tutor-d-none"> |
| 54 | <a class="tutor-nav-link tutor-nav-more-item" href="#"><span class="tutor-mr-4"><?php esc_html_e( 'More', 'tutor' ); ?></span> <span class="tutor-nav-more-icon tutor-icon-times"></span></a> |
| 55 | <ul class="tutor-nav-more-list tutor-dropdown"></ul> |
| 56 | </li> |
| 57 | </ul> |
| 58 |