| @@ -10,9 +10,8 @@ | ||
| 10 | 10 | |
| 11 | 11 | namespace TUTOR; |
| 12 | 12 | |
| 13 | 13 | use Tutor\Helpers\QueryHelper; |
| 14 | -use Tutor\Helpers\UrlHelper; | |
| 15 | 14 | |
| 16 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | 16 | exit; |
| 18 | 17 | } |
| @@ -37,13 +36,8 @@ | ||
| 37 | 36 | add_action( 'wp_ajax_tutor_delete_review', array( $this, 'delete_review' ) ); |
| 38 | 37 | add_action( 'wp_ajax_tutor_single_course_reviews_load_more', array( $this, 'tutor_single_course_reviews_load_more' ) ); |
| 39 | 38 | add_action( 'wp_ajax_nopriv_tutor_single_course_reviews_load_more', array( $this, 'tutor_single_course_reviews_load_more' ) ); |
| 40 | 39 | add_action( 'wp_ajax_tutor_change_review_status', array( $this, 'tutor_change_review_status' ) ); |
| 41 | - | |
| 42 | - $is_course_review_enabled = tutor_utils()->get_option( 'enable_course_review' ); | |
| 43 | - if ( $is_course_review_enabled ) { | |
| 44 | - add_filter( 'tutor_learning_area_sub_page_nav_item', array( $this, 'add_subpage_nav_item' ), 10, 2 ); | |
| 45 | - } | |
| 46 | 40 | } |
| 47 | 41 | |
| 48 | 42 | /** |
| 49 | 43 | * Handle ajax request for deleting review |
| @@ -168,27 +162,6 @@ | ||
| 168 | 162 | ); |
| 169 | 163 | }, |
| 170 | 164 | $result |
| 171 | 165 | ); |
| 172 | - } | |
| 173 | - | |
| 174 | - /** | |
| 175 | - * Add Review nav Item to tutor subpage. | |
| 176 | - * | |
| 177 | - * @since 4.0.0 | |
| 178 | - * | |
| 179 | - * @param array $nav_items the array of nav items. | |
| 180 | - * @param string $base_url the base url. | |
| 181 | - * | |
| 182 | - * @return array | |
| 183 | - */ | |
| 184 | - public function add_subpage_nav_item( $nav_items, $base_url ): array { | |
| 185 | - $nav_items['reviews'] = array( | |
| 186 | - 'title' => __( 'Reviews', 'tutor' ), | |
| 187 | - 'icon' => Icon::STAR_LINE, | |
| 188 | - 'url' => UrlHelper::add_query_params( $base_url, array( 'subpage' => 'reviews' ) ), | |
| 189 | - 'template' => tutor()->path . 'templates/learning-area/subpages/reviews.php', | |
| 190 | - ); | |
| 191 | - | |
| 192 | - return $nav_items; | |
| 193 | 166 | } |
| 194 | 167 | } |