| @@ -3554,12 +3554,21 @@ | ||
| 3554 | 3554 | * @since v.1.0.0 |
| 3555 | 3555 | */ |
| 3556 | 3556 | public function user_profile_permalinks(){ |
| 3557 | 3557 | $permalinks = array( |
| 3558 | - 'enrolled_course' => __('Enrolled Course', 'tutor'), | |
| 3559 | 3558 | 'courses_taken' => __('Courses Taken', 'tutor'), |
| 3560 | - 'reviews_wrote' => __('Reviews Written', 'tutor'), | |
| 3561 | 3559 | ); |
| 3560 | + | |
| 3561 | + $show_enrolled_course = tutor_utils()->get_option('show_courses_completed_by_student'); | |
| 3562 | + $enable_show_reviews_wrote = tutor_utils()->get_option('students_own_review_show_at_profile'); | |
| 3563 | + | |
| 3564 | + if ($show_enrolled_course){ | |
| 3565 | + $permalinks['enrolled_course'] = __('Enrolled Course', 'tutor'); | |
| 3566 | + } | |
| 3567 | + if ($enable_show_reviews_wrote){ | |
| 3568 | + $permalinks['reviews_wrote'] = __('Reviews Written', 'tutor'); | |
| 3569 | + } | |
| 3570 | + | |
| 3562 | 3571 | |
| 3563 | 3572 | return apply_filters('tutor_public_profile/permalinks', $permalinks); |
| 3564 | 3573 | } |
| 3565 | 3574 | |