education.php
5 years ago
nav-bar.php
5 years ago
profile.php
5 years ago
reset-password.php
5 years ago
skill.php
5 years ago
withdraw-settings.php
5 years ago
nav-bar.php
53 lines
| 1 | <?php |
| 2 | $settings_url = tutor_utils()->get_tutor_dashboard_page_permalink('settings'); |
| 3 | $education = tutor_utils()->get_tutor_dashboard_page_permalink('settings/education'); |
| 4 | $skill = tutor_utils()->get_tutor_dashboard_page_permalink('settings/skill'); |
| 5 | $withdraw = tutor_utils()->get_tutor_dashboard_page_permalink('settings/withdraw-settings'); |
| 6 | $reset_password = tutor_utils()->get_tutor_dashboard_page_permalink('settings/reset-password'); |
| 7 | |
| 8 | $setting_menus=array( |
| 9 | 'profile' => array( |
| 10 | 'url' => esc_url($settings_url), |
| 11 | 'title' => __('Profile', 'tutor'), |
| 12 | 'role' => false |
| 13 | ), |
| 14 | 'reset_password' => array( |
| 15 | 'url' => esc_url($reset_password), |
| 16 | 'title' => __('Reset Password', 'tutor'), |
| 17 | 'role' => false |
| 18 | ), |
| 19 | /* 'education' => array( |
| 20 | 'url' => esc_url($education), |
| 21 | 'title' => __('Education', 'tutor'), |
| 22 | 'role' => false |
| 23 | ), |
| 24 | 'skill' => array( |
| 25 | 'url' => esc_url($skill), |
| 26 | 'title' => __('Skill', 'tutor'), |
| 27 | 'role' => false |
| 28 | ), */ |
| 29 | 'withdrawal' => array( |
| 30 | 'url' => esc_url($withdraw), |
| 31 | 'title' => __('Withdraw', 'tutor'), |
| 32 | 'role' => 'instructor' |
| 33 | ) |
| 34 | ); |
| 35 | |
| 36 | $setting_menus = apply_filters('tutor_dashboard/nav_items/settings/nav_items', $setting_menus); |
| 37 | $GLOBALS['tutor_setting_nav'] = $setting_menus; |
| 38 | ?> |
| 39 | <ul> |
| 40 | <?php |
| 41 | foreach($setting_menus as $menu_key=>$menu){ |
| 42 | $valid = $menu_key=='profile' || !$menu['role'] || ($menu['role']=='instructor' && current_user_can(tutor()->instructor_role)); |
| 43 | |
| 44 | if($valid){ |
| 45 | ?> |
| 46 | <li class="<?php echo $active_setting_nav==$menu_key ? 'active' : ''; ?>"> |
| 47 | <a href="<?php echo $menu['url']; ?>"> <?php echo $menu['title']; ?></a> |
| 48 | </li> |
| 49 | <?php |
| 50 | } |
| 51 | } |
| 52 | ?> |
| 53 | </ul> |