PluginProbe
Tutor LMS – eLearning and online course solution / 3.9.14
Tutor LMS – eLearning and online course solution v3.9.14
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
← All changes | classes/Reviews.php +0 -27 trunk3.9.14 View file →
@@ -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 }