PluginProbe
Tutor LMS – eLearning and online course solution / 2.0.8
Tutor LMS – eLearning and online course solution v2.0.8
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/Shortcode.php +114 -217 4.0.02.0.8 View file →
@@ -1,36 +1,21 @@
1 1 <?php
2 2 /**
3 - * Manage short codes
3 + * Class Shortcode
4 4 *
5 - * @package Tutor\ShortCode
6 - * @author Themeum <support@themeum.com>
7 - * @link https://themeum.com
8 - * @since 1.0.0
5 + * @package TUTOR
6 + *
7 + * @since v.1.0.0
9 8 */
10 9
11 10 namespace TUTOR;
12 11
13 -use Tutor\Models\CourseModel;
14 -
15 12 if ( ! defined( 'ABSPATH' ) ) {
16 13 exit;
17 14 }
18 15
19 -/**
20 - * Short code class
21 - *
22 - * @since 1.0.0
23 - */
24 16 class Shortcode {
25 17
26 - /**
27 - * Instructor page design layouts
28 - *
29 - * @since 1.0.0
30 - *
31 - * @var array
32 - */
33 18 private $instructor_layout = array(
34 19 'default',
35 20 'cover',
36 21 'minimal',
@@ -37,23 +22,9 @@
37 22 'portrait-horizontal',
38 23 'minimal-horizontal',
39 24 );
40 25
41 - /**
42 - * Register hooks
43 - *
44 - * @since 1.0.0
45 - * @since 3.8.0
46 - *
47 - * @param bool $register_hooks register hooks or not.
48 - *
49 - * @return void
50 - */
51 - public function __construct( $register_hooks = true ) {
52 - if ( ! $register_hooks ) {
53 - return;
54 - }
55 -
26 + public function __construct() {
56 27 add_shortcode( 'tutor_student_registration_form', array( $this, 'student_registration_form' ) );
57 28 add_shortcode( 'tutor_dashboard', array( $this, 'tutor_dashboard' ) );
58 29 add_shortcode( 'tutor_instructor_registration_form', array( $this, 'instructor_registration_form' ) );
59 30 add_shortcode( 'tutor_course', array( $this, 'tutor_course' ) );
@@ -58,14 +29,12 @@
58 29 add_shortcode( 'tutor_instructor_registration_form', array( $this, 'instructor_registration_form' ) );
59 30 add_shortcode( 'tutor_course', array( $this, 'tutor_course' ) );
60 31
61 32 add_shortcode( 'tutor_instructor_list', array( $this, 'tutor_instructor_list' ) );
33 + add_action( 'tutor_options_after_instructors', array( $this, 'tutor_instructor_layout' ) );
62 34 add_action( 'wp_ajax_load_filtered_instructor', array( $this, 'load_filtered_instructor' ) );
63 35 add_action( 'wp_ajax_nopriv_load_filtered_instructor', array( $this, 'load_filtered_instructor' ) );
64 36
65 - add_shortcode( 'tutor_cart', array( $this, 'tutor_cart_page' ) );
66 - add_shortcode( 'tutor_checkout', array( $this, 'tutor_checkout_page' ) );
67 -
68 37 /**
69 38 * Load more categories
70 39 *
71 40 * @since 2.0.0
@@ -74,13 +43,13 @@
74 43 add_action( 'wp_ajax_nopriv_show_more', array( $this, 'show_more' ) );
75 44 }
76 45
77 46 /**
78 - * Instructor Registration Shortcode
47 + * @return mixed
79 48 *
80 - * @since 1.0.0
49 + * Instructor Registration Shortcode
81 50 *
82 - * @return mixed
51 + * @since v.1.0.0
83 52 */
84 53 public function student_registration_form() {
85 54 ob_start();
86 55 if ( is_user_logged_in() ) {
@@ -91,13 +60,13 @@
91 60 return apply_filters( 'tutor/student/register', ob_get_clean() );
92 61 }
93 62
94 63 /**
64 + * @return mixed
65 + *
95 66 * Tutor Dashboard for students
96 67 *
97 - * @since 1.0.0
98 - *
99 - * @return mixed
68 + * @since v.1.0.0
100 69 */
101 70 public function tutor_dashboard() {
102 71 global $wp_query;
103 72
@@ -111,28 +80,20 @@
111 80 if ( ! isset( $wp_query->query_vars['tutor_dashboard_page'] ) ) {
112 81 tutor_load_template( 'dashboard', array( 'is_shortcode' => true ) );
113 82 }
114 83 } else {
115 - /**
116 - * If user not logged in show login form instead of
117 - * popup sign-in button
118 - *
119 - * @since 2.1.3
120 - */
121 - $login_url = tutor_utils()->get_option( 'enable_tutor_native_login', null, true, true ) ? '' : wp_login_url( tutor()->current_url );
122 - $signin_link = '<a data-login_url="' . esc_url( $login_url ) . '" href="#" class="tutor-open-login-modal">' . __( 'Sign-In', 'tutor' ) . '</a>';
123 - /* translators: %s is anchor link for signin */
124 - echo sprintf( __( 'Please %s to view this page', 'tutor' ), $signin_link ); //phpcs:ignore
84 + $login_url = tutor_utils()->get_option('enable_tutor_native_login', null, true, true) ? '' : wp_login_url(tutor()->current_url);
85 + echo sprintf( __('Please %sSign-In%s to view this page', 'tutor'), '<a data-login_url="'.$login_url.'" href="#" class="tutor-open-login-modal">', '</a>');
125 86 }
126 87 return apply_filters( 'tutor_dashboard/index', ob_get_clean() );
127 88 }
128 89
129 90 /**
91 + * @return mixed
92 + *
130 93 * Instructor Registration Shortcode
131 94 *
132 95 * @since v.1.0.0
133 - *
134 - * @return mixed
135 96 */
136 97 public function instructor_registration_form() {
137 98 ob_start();
138 99 if ( is_user_logged_in() ) {
@@ -143,20 +104,20 @@
143 104 return apply_filters( 'tutor_dashboard/student/index', ob_get_clean() );
144 105 }
145 106
146 107 /**
147 - * Short code for getting course
108 + * @param $atts
148 109 *
149 - * @since 1.0.0
110 + * @return string
150 111 *
151 - * @param mixed $atts attributes.
152 - *
153 - * @return string
112 + * Shortcode for getting course
154 113 */
155 114 public function tutor_course( $atts ) {
115 + $course_post_type = tutor()->course_post_type;
116 +
156 117 $a = shortcode_atts(
157 118 array(
158 - 'post_type' => apply_filters( 'tutor_course_archive_post_types', array( tutor()->course_post_type ) ),
119 + 'post_type' => $course_post_type,
159 120 'post_status' => 'publish',
160 121
161 122 'id' => '',
162 123 'exclude_ids' => '',
@@ -163,79 +124,51 @@
163 124 'category' => '',
164 125
165 126 'orderby' => 'ID',
166 127 'order' => 'DESC',
167 - 'count' => tutils()->get_option( 'courses_per_page', 12 ),
128 + 'count' => 6,
168 129 'paged' => get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1,
169 130 ),
170 131 $atts
171 132 );
172 133
173 - $a = apply_filters( 'tutor_get_course_list_filter_args', $a );
174 -
175 - $supported_filters = tutor_utils()->get_option( 'supported_course_filters', array() );
176 - $course_filter_category = array();
177 - $course_filter_exclude_ids = array();
178 - $course_filter_post_ids = array();
179 -
180 134 if ( ! empty( $a['id'] ) ) {
181 135 $ids = (array) explode( ',', $a['id'] );
182 136 $a['post__in'] = $ids;
183 -
184 - if ( is_array( $ids ) && count( $ids ) && ! wp_doing_ajax() ) {
185 - $_GET['tutor-course-filter-post-ids'] = $ids;
186 - $course_filter_post_ids = $ids;
187 - }
188 137 }
189 138
190 139 if ( ! empty( $a['exclude_ids'] ) ) {
191 140 $exclude_ids = (array) explode( ',', $a['exclude_ids'] );
192 141 $a['post__not_in'] = $exclude_ids;
193 - if ( is_array( $exclude_ids ) && count( $exclude_ids ) && ! wp_doing_ajax() ) {
194 - $_GET['tutor-course-filter-exclude-ids'] = $exclude_ids;
195 - $course_filter_exclude_ids = $exclude_ids;
196 - }
197 142 }
198 143 if ( ! empty( $a['category'] ) ) {
199 144 $category = (array) explode( ',', $a['category'] );
200 -
145 +
201 146 $a['tax_query'] = array();
202 147
203 - $category_ids = array_filter(
204 - $category,
205 - function ( $id ) {
206 - return is_numeric( $id );
207 - }
208 - );
148 + $category_ids = array_filter($category, function($id){
149 + return is_numeric($id);
150 + });
209 151
210 - $category_names = array_filter(
211 - $category,
212 - function ( $id ) {
213 - return ! is_numeric( $id );
214 - }
215 - );
152 + $category_names = array_filter($category, function($id){
153 + return !is_numeric($id);
154 + });
216 155
217 - if ( ! empty( $category_ids ) ) {
156 + if(!empty($category_ids)) {
218 157 $a['tax_query'] = array(
219 158 array(
220 - 'taxonomy' => CourseModel::COURSE_CATEGORY,
159 + 'taxonomy' => 'course-category',
221 160 'field' => 'term_id',
222 161 'terms' => $category_ids,
223 162 'operator' => 'IN',
224 163 ),
225 164 );
226 -
227 - if ( is_array( $category_ids ) && count( $category_ids ) && ! wp_doing_ajax() ) {
228 - $_GET['tutor-course-filter-category'] = $category_ids;
229 - $course_filter_category = $category_ids;
230 - unset( $supported_filters['category'] );
231 - }
232 165 }
233 166
234 - if ( ! empty( $category_names ) ) {
167 + if(!empty($category_names)) {
235 168 $a['tax_query'] = array(
236 169 array(
237 - 'taxonomy' => CourseModel::COURSE_CATEGORY,
170 + 'taxonomy' => 'course-category',
238 171 'field' => 'name',
239 172 'terms' => $category_names,
240 173 'operator' => 'IN',
241 174 ),
@@ -240,8 +173,9 @@
240 173 'operator' => 'IN',
241 174 ),
242 175 );
243 176 }
177 +
244 178 }
245 179 $a['posts_per_page'] = (int) $a['count'];
246 180
247 181 wp_reset_query();
@@ -246,87 +180,68 @@
246 180
247 181 wp_reset_query();
248 182 $the_query = new \WP_Query( $a );
249 183
250 - /**
251 - * Pagination & course filter handle from query param on page load (without ajax)
252 - *
253 - * @since 2.4.0
254 - */
255 - $get = Input::has( 'course_filter' ) ? Input::sanitize_array( $_GET ) : array();
256 - if ( Input::has( 'course_filter' ) ) {
257 - $filter = ( new \Tutor\Course_Filter( false ) )->load_listing( $get, true );
258 - $the_query = new \WP_Query( $filter );
259 - }
260 -
261 - // Load the renderer now.
184 +
185 + // Load the renderer now
262 186 ob_start();
263 187
264 188 if ( $the_query->have_posts() ) {
265 - tutor_load_template(
266 - 'archive-course-init',
267 - array(
268 - 'course_filter' => isset( $atts['course_filter'] ) && 'on' === $atts['course_filter'],
269 - 'supported_filters' => $supported_filters,
270 - 'loop_content_only' => false,
271 - 'column_per_row' => isset( $atts['column_per_row'] ) ? $atts['column_per_row'] : null,
272 - 'course_per_page' => $a['posts_per_page'],
273 - 'show_pagination' => isset( $atts['show_pagination'] ) && 'on' === $atts['show_pagination'],
274 - 'the_query' => $the_query,
275 - 'current_page' => isset( $get['current_page'] ) ? (int) $get['current_page'] : 1,
276 - 'course_filter_category' => ! empty( $course_filter_category ) ? json_encode( $course_filter_category ) : null,
277 - 'course_filter_exclude_ids' => ! empty( $course_filter_exclude_ids ) ? json_encode( $course_filter_exclude_ids ) : null,
278 - 'course_filter_post_ids' => ! empty( $course_filter_post_ids ) ? json_encode( $course_filter_post_ids ) : null,
279 - )
280 - );
189 + tutor_load_template('archive-course-init', array(
190 + 'course_filter' => isset( $atts['course_filter'] ) && $atts['course_filter'] == 'on',
191 + 'supported_filters' => tutor_utils()->get_option( 'supported_course_filters', array() ),
192 + 'loop_content_only' => false,
193 + 'column_per_row' => isset( $atts['column_per_row'] ) ? $atts['column_per_row'] : null,
194 + 'course_per_page' => $a['posts_per_page'],
195 + 'show_pagination' => isset( $atts['show_pagination'] ) && $atts['show_pagination']=='on',
196 + 'the_query' => $the_query
197 + ));
281 198 } else {
282 199 tutor_utils()->tutor_empty_state( tutor_utils()->not_found_text() );
283 200 }
284 201
285 202 $output = ob_get_clean();
203 +
286 204 wp_reset_postdata();
205 +
287 206 return $output;
288 207 }
289 208
290 - /**
291 - * Prepare instructor list
292 - *
293 - * @param string $current_page current page.
294 - * @param mixed $atts atts for query.
295 - * @param array $cat_ids category ids.
296 - * @param string $keyword search keyword.
297 - *
298 - * @return array
299 - */
300 209 private function prepare_instructor_list( $current_page, $atts, $cat_ids = array(), $keyword = '' ) {
301 210
302 - $default_pagination = tutor_utils()->get_option( 'pagination_per_page', 9 );
303 - $limit = (int) sanitize_text_field( tutor_utils()->array_get( 'count', $atts, $default_pagination ) );
304 - $page = $current_page - 1;
305 - $rating_filter = Input::post( 'rating_filter', '' );
211 + $default_pagination = tutor_utils()->get_option('pagination_per_page', 9);
212 + $limit = (int) sanitize_text_field( tutor_utils()->array_get( 'count', $atts, $default_pagination ) );
213 + $page = $current_page - 1;
214 + $rating_filter = isset( $_POST['rating_filter'] ) ? $_POST['rating_filter'] : '';
306 215
307 216 /**
308 217 * Sort by Relevant | New | Popular
309 218 *
310 - * @since 2.0.0
219 + * @since v2.0.0
311 220 */
312 - $short_by = Input::post( 'short_by', 'ASC' );
313 -
314 - $instructors = tutor_utils()->get_instructors( $limit * $page, $limit, $keyword, '', '', $short_by, 'approved', $cat_ids, $rating_filter );
221 + $short_by = '';
222 + if ( isset( $_POST['short_by'] ) && $_POST['short_by'] === 'new' ) {
223 + $short_by = 'new';
224 + } elseif ( isset( $_POST['short_by'] ) && $_POST['short_by'] === 'popular' ) {
225 + $short_by = 'popular';
226 + } else {
227 + $short_by = 'ASC';
228 + }
229 + $instructors = tutor_utils()->get_instructors( $limit * $page, $limit, $keyword, '', '', $short_by, 'approved', $cat_ids, $rating_filter );
315 230 $instructors_count = tutor_utils()->get_instructors( $limit * $page, $limit, $keyword, '', '', $short_by, 'approved', $cat_ids, $rating_filter, true );
316 231
317 - $layout = sanitize_text_field( tutor_utils()->array_get( 'layout', $atts, '' ) );
318 - $layout = in_array( $layout, $this->instructor_layout ) ? $layout : tutor_utils()->get_option( 'instructor_list_layout', $this->instructor_layout[0] );
232 + $layout = sanitize_text_field( tutor_utils()->array_get( 'layout', $atts, '' ) );
233 + $layout = in_array( $layout, $this->instructor_layout ) ? $layout : tutor_utils()->get_option( 'instructor_list_layout', $this->instructor_layout[0] );
319 234 $default_col = tutor_utils()->get_option( 'courses_col_per_row', 3 );
320 235
321 236 $payload = array(
322 - 'instructors' => is_array( $instructors ) ? $instructors : array(),
237 + 'instructors' => is_array( $instructors ) ? $instructors : array(),
323 238 'instructors_count' => $instructors_count,
324 - 'column_count' => sanitize_text_field( tutor_utils()->array_get( 'column_per_row', $atts, $default_col ) ),
325 - 'layout' => $layout,
326 - 'limit' => $limit,
327 - 'current_page' => $current_page,
328 - 'filter' => $atts,
239 + 'column_count' => sanitize_text_field( tutor_utils()->array_get( 'column_per_row', $atts, $default_col ) ),
240 + 'layout' => $layout,
241 + 'limit' => $limit,
242 + 'current_page' => $current_page,
243 + 'filter' => $atts
329 244 );
330 245
331 246 return $payload;
332 247 }
@@ -331,27 +246,25 @@
331 246 return $payload;
332 247 }
333 248
334 249 /**
335 - * Short code for getting instructors
250 + * @param $atts
336 251 *
337 - * @param array $atts array of attrs.
252 + * @return string
338 253 *
339 - * @return string
254 + * Shortcode for getting instructors
340 255 */
341 256 public function tutor_instructor_list( $atts ) {
257 + global $wpdb;
342 258 ! is_array( $atts ) ? $atts = array() : 0;
343 259
344 260 $current_page = (int) tutor_utils()->array_get( 'instructor-page', $_GET, 1 );
345 - $current_page = Input::get( 'instructor-page', 1, Input::TYPE_INT );
346 261 $current_page = $current_page >= 1 ? $current_page : 1;
347 262
348 - $show_filter = isset( $atts['filter'] ) ? 'on' === $atts['filter'] : tutor_utils()->get_option( 'instructor_list_show_filter', false );
349 - $category_limit = (int) isset( $atts['category_limit'] ) ? $atts['category_limit'] : 0;
350 - $hide_empty_category = isset( $atts['hide_empty_category'] ) ? '1' == $atts['hide_empty_category'] : false;
263 + $show_filter = isset( $atts['filter'] ) ? $atts['filter'] == 'on' : tutor_utils()->get_option( 'instructor_list_show_filter', false );
351 264 $atts['show_filter'] = $show_filter;
352 265
353 - // Get instructor list to sow.
266 + // Get instructor list to sow
354 267 $payload = $this->prepare_instructor_list( $current_page, $atts );
355 268 $payload['show_filter'] = $show_filter;
356 269
357 270 ob_start();
@@ -358,19 +271,30 @@
358 271 tutor_load_template( 'shortcode.tutor-instructor', $payload );
359 272 $content = ob_get_clean();
360 273
361 274 if ( $show_filter ) {
362 - $course_taxonomy = CourseModel::COURSE_CATEGORY;
363 - $term_args = array(
364 - 'taxonomy' => $course_taxonomy,
365 - 'hide_empty' => $hide_empty_category,
366 - 'orderby' => 'count',
367 - 'order' => 'DESC',
368 - 'number' => $category_limit,
275 + $limit = 8;
276 + $course_taxonomy = 'course-category';
277 + $course_cats = $wpdb->get_results($wpdb->prepare(
278 + "SELECT * FROM {$wpdb->terms} AS term
279 + INNER JOIN {$wpdb->term_taxonomy} AS taxonomy
280 + ON taxonomy.term_id = term.term_id AND taxonomy.taxonomy = %s
281 + ORDER BY term.term_id DESC
282 + LIMIT %d",
283 + $course_taxonomy,
284 + $limit
285 + ));
286 +
287 + $all_cats = $wpdb->get_var(
288 + $wpdb->prepare(
289 + "SELECT COUNT(*) as total FROM {$wpdb->terms} AS term
290 + INNER JOIN {$wpdb->term_taxonomy} AS taxonomy
291 + ON taxonomy.term_id = term.term_id AND taxonomy.taxonomy = %s
292 + ORDER BY term.term_id DESC",
293 + $course_taxonomy
294 + )
369 295 );
370 296
371 - $course_cats = get_terms( $term_args );
372 -
373 297 $attributes = $payload;
374 298 unset( $attributes['instructors'] );
375 299
376 300 $payload = array(
@@ -376,8 +300,9 @@
376 300 $payload = array(
377 301 'show_filter' => $show_filter,
378 302 'content' => $content,
379 303 'categories' => $course_cats,
304 + 'all_cats' => $all_cats,
380 305 'attributes' => array_merge( $atts, $attributes ),
381 306 );
382 307
383 308 ob_start();
@@ -393,29 +318,27 @@
393 318 /**
394 319 * Load more categories
395 320 * handle ajax request
396 321 *
397 - * @since 2.0.0
398 - *
399 - * @return void send wp_json response
322 + * @package Instructor List
323 + * @return string
324 + * @since v2.0.0
400 325 */
401 326 public function show_more() {
402 327 global $wpdb;
403 328 tutor_utils()->checking_nonce();
404 - $term_id = Input::post( 'term_id', 0, Input::TYPE_INT );
329 + $term_id = isset( $_POST['term_id'] ) ? sanitize_text_field( $_POST['term_id'] ) : 0;
405 330 $limit = 8;
406 - $course_taxonomy = CourseModel::COURSE_CATEGORY;
331 + $course_taxonomy = 'course-category';
407 332
408 333 $remaining_categories = $wpdb->get_var(
409 334 $wpdb->prepare(
410 - "SELECT
411 - COUNT(*) AS total
412 - FROM {$wpdb->terms} AS term
335 + " SElECT COUNT(*) AS total FROM {$wpdb->terms} AS term
413 336 INNER JOIN {$wpdb->term_taxonomy} AS taxonomy
414 337 ON taxonomy.term_id = term.term_id AND taxonomy.taxonomy = %s
415 338 WHERE term.term_id < %d
416 339 ORDER BY term.term_id DESC
417 - ",
340 + ",
418 341 $course_taxonomy,
419 342 $term_id
420 343 )
421 344 );
@@ -421,17 +344,15 @@
421 344 );
422 345
423 346 $add_categories = $wpdb->get_results(
424 347 $wpdb->prepare(
425 - "SELECT
426 - *
427 - FROM {$wpdb->terms} term
428 - INNER JOIN {$wpdb->term_taxonomy} as taxonomy
429 - ON taxonomy.term_id = term.term_id AND taxonomy.taxonomy = %s
348 + " SElECT * FROM {$wpdb->terms} term
349 + INNER JOIN {$wpdb->term_taxonomy} as taxonomy
350 + ON taxonomy.term_id = term.term_id AND taxonomy.taxonomy = %s
430 351 WHERE term.term_id < %d
431 352 ORDER BY term.term_id DESC
432 353 LIMIT %d
433 - ",
354 + ",
434 355 $course_taxonomy,
435 356 $term_id,
436 357 $limit
437 358 )
@@ -450,18 +371,13 @@
450 371 }
451 372
452 373 /**
453 374 * Filter instructor
454 - *
455 - * @since 1.0.0
456 - *
457 - * @return void send wp_json response
458 375 */
459 376 public function load_filtered_instructor() {
460 377 tutor_utils()->checking_nonce();
461 378
462 - // phpcs:disable WordPress.Security.NonceVerification.Missing --nonce already verified
463 - $_post = tutor_sanitize_data( $_POST );
379 + $_post = tutor_sanitize_data($_POST);
464 380 $current_page = (int) sanitize_text_field( tutor_utils()->array_get( 'current_page', $_post, 1 ) );
465 381 $keyword = (string) sanitize_text_field( tutor_utils()->array_get( 'keyword', $_post, '' ) );
466 382
467 383 $category = (array) tutor_utils()->array_get( 'category', $_post, array() );
@@ -466,9 +382,9 @@
466 382
467 383 $category = (array) tutor_utils()->array_get( 'category', $_post, array() );
468 384 $category = array_filter(
469 385 $category,
470 - function ( $cat ) {
386 + function( $cat ) {
471 387 return is_numeric( $cat );
472 388 }
473 389 );
474 390
@@ -475,34 +391,15 @@
475 391 $data = $this->prepare_instructor_list( $current_page, $_post, $category, $keyword );
476 392
477 393 ob_start();
478 394 tutor_load_template( 'shortcode.tutor-instructor', $data );
479 - wp_send_json_success( array( 'html' => ob_get_clean() ) );
395 + wp_send_json_success( array('html' => ob_get_clean() ) );
480 396 exit;
481 397 }
482 398
483 399 /**
484 - * Tutor Cart Shortcode
485 - *
486 - * @since v.3.0.0
487 - *
488 - * @return mixed
400 + * Show layout selection dashboard in instructor setting
489 401 */
490 - public function tutor_cart_page() {
491 - ob_start();
492 - tutor_load_template( 'ecommerce.cart' );
493 - return apply_filters( 'tutor_ecommerce/cart', ob_get_clean() );
494 - }
495 -
496 - /**
497 - * Tutor Checkout Shortcode
498 - *
499 - * @since v.3.0.0
500 - *
501 - * @return mixed
502 - */
503 - public function tutor_checkout_page() {
504 - ob_start();
505 - tutor_load_template( 'ecommerce.checkout' );
506 - return apply_filters( 'tutor_ecommerce/checkout', ob_get_clean() );
402 + public function tutor_instructor_layout() {
403 + tutor_load_template( 'instructor-setting', array( 'templates' => $this->instructor_layout ) );
507 404 }
508 405 }