PluginProbe ʕ •ᴥ•ʔ
Tutor LMS – eLearning and online course solution / 2.0.0
Tutor LMS – eLearning and online course solution v2.0.0
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 1.1.0 1.1.1 1.2.0 1.2.1 1.2.11 1.2.12 1.2.13 1.2.20 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.15 1.9.16 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.10 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / classes / Tools_V2.php
tutor / classes Last commit date
Addons.php 4 years ago Admin.php 4 years ago Ajax.php 4 years ago Announcements.php 4 years ago Assets.php 4 years ago Backend_Page_Trait.php 4 years ago Course.php 4 years ago Course_Filter.php 4 years ago Course_List.php 4 years ago Course_Settings_Tabs.php 4 years ago Course_Widget.php 4 years ago Custom_Validation.php 5 years ago Dashboard.php 4 years ago FormHandler.php 4 years ago Frontend.php 4 years ago Gutenberg.php 4 years ago Instructor.php 4 years ago Instructors_List.php 4 years ago Lesson.php 4 years ago Options_V2.php 4 years ago Post_types.php 4 years ago Private_Course_Access.php 4 years ago Q_and_A.php 4 years ago Question_Answers_List.php 4 years ago Quiz.php 4 years ago Quiz_Attempts_List.php 4 years ago RestAPI.php 4 years ago Reviews.php 4 years ago Rewrite_Rules.php 4 years ago Shortcode.php 4 years ago Student.php 4 years ago Students_List.php 4 years ago Taxonomies.php 4 years ago Template.php 4 years ago Theme_Compatibility.php 5 years ago Tools.php 4 years ago Tools_V2.php 4 years ago Tutor.php 4 years ago TutorEDD.php 4 years ago Tutor_Base.php 5 years ago Tutor_List_Table.php 4 years ago Tutor_Setup.php 4 years ago Upgrader.php 4 years ago User.php 4 years ago Utils.php 4 years ago Video_Stream.php 4 years ago Withdraw.php 4 years ago Withdraw_Requests_List.php 4 years ago WooCommerce.php 4 years ago
Tools_V2.php
541 lines
1 <?php
2
3 /**
4 * Options for TutorLMS
5 *
6 * @since v.2.0
7 *
8 * @author Themeum
9 * @url https://themeum.com
10 *
11 * @package TutorLMS/Certificate
12 * @version 2.0
13 */
14
15 namespace Tutor;
16
17 use TUTOR\Admin;
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22
23 class Tools_V2 {
24
25 private $environment_status;
26 private $tools_fields;
27
28 public function tutor_apply_settings() {
29 $tutor_settings_log = get_option( 'tutor_settings_log' );
30 $apply_id = $this->get_request_data( 'apply_id' );
31
32 update_option( 'tutor_option', $tutor_settings_log[ $apply_id ]['dataset'] );
33
34 wp_send_json_success( $tutor_settings_log[ $apply_id ] );
35 }
36
37 public function get_request_data( $var ) {
38 return isset( $_REQUEST[ $var ] ) ? $_REQUEST[ $var ] : null;
39 }
40
41 /**
42 * tutor_default_settings
43 *
44 * @return JSON
45 */
46 public function tutor_default_settings() {
47 $attr = $this->get_setting_fields();
48 foreach ( $attr as $sections ) {
49 foreach ( $sections['sections'] as $section ) {
50 foreach ( $section['blocks'] as $blocks ) {
51 foreach ( $blocks['fields'] as $field ) {
52 if ( isset( $field['default'] ) ) {
53 $attr_default[ $field['key'] ] = $field['default'];
54 }
55 }
56 }
57 }
58 }
59
60 update_option( 'tutor_option', $attr_default );
61
62 wp_send_json_success( $attr_default );
63 }
64
65 public function load_tools_page() {
66 $tools_fields = $this->get_tools_fields();
67 $tutor_setup = array( 'tutor-setup' => $tools_fields['tutor-setup'] );
68 unset( $tools_fields['tutor-setup'] );
69 $tools_fields = array_merge( $tools_fields, $tutor_setup );
70
71 $active_tab = tutor_utils()->array_get( 'sub_page', $_GET, 'status' );
72 include tutor()->path . '/views/options/tools.php';
73 }
74
75 /**
76 * Function options_tools
77 *
78 * @return void
79 */
80 private function get_tools_fields() {
81 global $wpdb;
82
83 if ( $this->tools_fields ) {
84 // Return fields if already prepared
85 return $this->tools_fields;
86 }
87
88 $attr_tools = array(
89 'status' => array(
90 'label' => __( 'Status', 'tutor' ),
91 'slug' => 'status',
92 'desc' => __( 'Status Settings', 'tutor' ),
93 'template' => 'status',
94 'view_path' => tutor()->path . 'views/options/template/',
95 'icon' => 'tutor-icon-chart-filled',
96 'blocks' => array(
97 'wordpress_environment' => array(
98 'label' => __( 'WordPress environment', 'tutor' ),
99 'slug' => 'wordpress_environment',
100 'classes' => 'wordpress_environment',
101 'block_type' => 'column',
102 'fieldset' => array(
103 array(
104 array(
105 'key' => 'home_url',
106 'type' => 'info_row',
107 'label' => __( 'Home URL', 'tutor' ),
108 'status' => 'default',
109 'default' => $this->status( 'home_url' ),
110 ),
111 ),
112 array(
113 array(
114 'key' => 'wordpress_version',
115 'type' => 'info_col',
116 'label' => __( 'WordPress version', 'tutor' ),
117 'status' => 'default',
118 'default' => $this->status( 'wordpress_version' ),
119
120 ),
121 array(
122 'key' => 'wordpress_multisite',
123 'type' => 'info_col',
124 'label' => __( 'WordPress multisite', 'tutor' ),
125 'status' => 'default',
126 'default' => $this->status( 'wordpress_multisite' ),
127
128 ),
129 array(
130 'key' => 'wordpress_debug_mode',
131 'type' => 'info_col',
132 'label' => __( 'WordPress debug mode', 'tutor' ),
133 'status' => ( defined( 'WP_DEBUG' ) && true === WP_DEBUG ) ? 'success' : 'default',
134 'default' => $this->status( 'wordpress_debug_mode' ),
135
136 ),
137 array(
138 'key' => 'language',
139 'type' => 'info_col',
140 'label' => __( 'Language', 'tutor' ),
141 'status' => 'default',
142 'default' => $this->status( 'language' ),
143
144 ),
145 ),
146 array(
147 array(
148 'key' => 'site_url',
149 'type' => 'info_row',
150 'label' => __( 'Site URL', 'tutor' ),
151 'status' => 'default',
152 'default' => $this->status( 'site_url' ),
153
154 ),
155 ),
156 array(
157 array(
158 'key' => 'tutor_version',
159 'type' => 'info_col',
160 'label' => __( 'Tutor version', 'tutor' ),
161 'status' => 'success',
162 'default' => $this->status( 'tutor_version' ),
163
164 ),
165 array(
166 'key' => 'wordpress_memory_limit',
167 'type' => 'info_col',
168 'label' => __( 'WordPress memory limit', 'tutor' ),
169 'status' => 'success',
170 'default' => $this->status( 'wordpress_memory_limit' ),
171
172 ),
173 array(
174 'key' => 'wordpress_cron',
175 'type' => 'info_col',
176 'label' => __( 'WordPress corn', 'tutor' ),
177 'status' => ! empty( _get_cron_array() ) ? 'success' : 'default',
178 'default' => $this->status( 'wordpress_cron' ),
179
180 ),
181 array(
182 'key' => 'external_object_cache',
183 'type' => 'info_col',
184 'label' => __( 'External object cache', 'tutor' ),
185 'status' => 'default',
186 'default' => $this->status( 'external_object_cache' ),
187
188 ),
189 ),
190 ),
191 ),
192 'server_environment' => array(
193 'label' => __( 'Server environment', 'tutor' ),
194 'slug' => 'server_environment',
195 'block_type' => 'column',
196 'fieldset' => array(
197 array(
198 array(
199 'key' => 'server_info',
200 'type' => 'info_col',
201 'label' => __( 'Server info', 'tutor' ),
202 'status' => 'default',
203 'default' => $this->status( 'server_info' ),
204
205 ),
206 array(
207 'key' => 'php_version',
208 'type' => 'info_col',
209 'label' => __( 'PHP version', 'tutor' ),
210 'status' => 'default',
211 'default' => $this->status( 'php_version' ),
212
213 ),
214 array(
215 'key' => 'php_post_max_size',
216 'type' => 'info_col',
217 'label' => __( 'PHP post max size', 'tutor' ),
218 'status' => 'default',
219 'default' => $this->status( 'php_post_max_size' ),
220
221 ),
222 array(
223 'key' => 'php_time_limit',
224 'type' => 'info_col',
225 'label' => __( 'PHP time limit', 'tutor' ),
226 'status' => 'default',
227 'default' => $this->status( 'php_time_limit' ),
228
229 ),
230 array(
231 'key' => 'curl_version',
232 'type' => 'info_col',
233 'label' => __( 'cURL version', 'tutor' ),
234 'status' => 'default',
235 'default' => $this->status( 'curl_version' ),
236
237 ),
238 array(
239 'key' => 'wordpress_debug_mode',
240 'type' => 'info_col',
241 'label' => __( 'WordPress debug mode', 'tutor' ),
242 'status' => 'default',
243 'default' => $this->status( 'wordpress_debug_mode' ),
244
245 ),
246 array(
247 'key' => 'language',
248 'type' => 'info_col',
249 'label' => __( 'Language', 'tutor' ),
250 'status' => 'default',
251 'default' => $this->status( 'language' ),
252
253 ),
254 array(
255 'key' => 'wordpress_debug_mode',
256 'type' => 'info_col',
257 'label' => __( 'WordPress debug mode', 'tutor' ),
258 'status' => 'default',
259 'default' => $this->status( 'wordpress_debug_mode' ),
260
261 ),
262 ),
263 array(
264 array(
265 'key' => 'tutor_version',
266 'type' => 'info_col',
267 'label' => __( 'MySQL version', 'tutor' ),
268 'status' => 'default',
269 'default' => sprintf( 'Server: %s, Client: %s', $wpdb->dbh->server_info, $wpdb->dbh->client_info ),
270 ),
271 array(
272 'key' => 'wordpress_memory_limit',
273 'type' => 'info_col',
274 'label' => __( 'Default timezone is UTC', 'tutor' ),
275 'status' => 'default',
276 'default' => $this->status( 'default_timezone_is_utc' ),
277 ),
278 array(
279 'key' => 'wordpress_cron',
280 'type' => 'info_col',
281 'label' => __( 'fsockopen/cURL', 'tutor' ),
282 'status' => 'default',
283 'default' => $this->status( 'fsockopen_curl' ),
284 ),
285 array(
286 'key' => 'external_object_cache',
287 'type' => 'info_col',
288 'label' => __( 'DOMDocument', 'tutor' ),
289 'status' => 'default',
290 'default' => $this->status( 'dom_document' ),
291 ),
292 array(
293 'key' => 'external_object_cache',
294 'type' => 'info_col',
295 'label' => __( 'GZip', 'tutor' ),
296 'status' => 'default',
297 'default' => $this->status( 'gzip' ),
298 ),
299 array(
300 'key' => 'external_object_cache',
301 'type' => 'info_col',
302 'label' => __( 'Multibyte string', 'tutor' ),
303 'status' => 'default',
304 'default' => $this->status( 'multibyte_string' ),
305 ),
306 ),
307 ),
308 ),
309 ),
310 ),
311 'import_export' => array(
312 'label' => __( 'Import/Export', 'tutor' ),
313 'slug' => 'import_export',
314 'desc' => __( 'Import/Export Settings', 'tutor' ),
315 'template' => 'import_export',
316 'view_path' => tutor()->path . 'views/options/template/',
317 'icon' => 'tutor-icon-import-export-filled',
318 'blocks' => array(),
319 ),
320 'tutor_pages' => array(
321 'label' => __( 'Tutor Pages', 'tutor' ),
322 'slug' => 'tutor_pages',
323
324 'desc' => __( 'Tutor Pages Settings', 'tutor' ),
325 'template' => 'tutor_pages',
326 'view_path' => tutor()->path . 'views/options/template/',
327 'icon' => 'tutor-icon-review-line',
328 'blocks' => array(
329 'block' => array(),
330 ),
331 ),
332 'tutor-setup' => array(
333 'label' => __( 'Setup Wizard', 'tutor' ),
334 'slug' => 'tutor-setup',
335 'desc' => __( 'Setup Wizard Settings', 'tutor' ),
336 'icon' => 'tutor-icon-earth-filled',
337 'blocks' => array(
338 'block' => array(),
339 ),
340 ),
341 );
342
343 $attr_tools = apply_filters( 'tutor/tools/extend/attr', apply_filters( 'tutor/tools/attr', apply_filters( 'tutor_tool_pages', $attr_tools ) ) );
344
345 $this->tools_fields = $attr_tools;
346
347 return $this->tools_fields;
348 }
349
350 private function get_environment_info() {
351
352 if ( $this->environment_status ) {
353 // Use runtime cache for repetitve call
354 return $this->environment_status;
355 }
356
357 // Figure out cURL version, if installed.
358 $curl_version = '';
359 if ( function_exists( 'curl_version' ) ) {
360 $curl_version = curl_version();
361 $curl_version = $curl_version['version'] . ', ' . $curl_version['ssl_version'];
362 }
363
364 // WP memory limit.
365 $wp_memory_limit = tutor_utils()->let_to_num( WP_MEMORY_LIMIT );
366 if ( function_exists( 'memory_get_usage' ) ) {
367 $wp_memory_limit = max( $wp_memory_limit, tutor_utils()->let_to_num( @ini_get( 'memory_limit' ) ) );
368 }
369
370 $database_version = tutor_utils()->get_db_version();
371
372 $this->environment_status = array(
373 'home_url' => get_option( 'home' ),
374 'site_url' => get_option( 'siteurl' ),
375 'version' => TUTOR_VERSION,
376 'wp_version' => get_bloginfo( 'version' ),
377 'wp_multisite' => is_multisite(),
378 'wp_memory_limit' => $wp_memory_limit,
379 'wp_debug_mode' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
380 'wp_cron' => ! ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ),
381 'language' => get_locale(),
382 'external_object_cache' => wp_using_ext_object_cache(),
383 'server_info' => isset( $_SERVER['SERVER_SOFTWARE'] ) ? wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) : '',
384 'php_version' => phpversion(),
385 'php_post_max_size' => tutor_utils()->let_to_num( ini_get( 'post_max_size' ) ),
386 'php_max_execution_time' => ini_get( 'max_execution_time' ),
387 'php_max_input_vars' => ini_get( 'max_input_vars' ),
388 'curl_version' => $curl_version,
389 'suhosin_installed' => extension_loaded( 'suhosin' ),
390 'max_upload_size' => wp_max_upload_size(),
391 'mysql_version' => $database_version['number'],
392 'mysql_version_string' => $database_version['string'],
393 'default_timezone' => date_default_timezone_get(),
394 'fsockopen_or_curl_enabled' => ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ),
395 'soapclient_enabled' => class_exists( 'SoapClient' ),
396 'domdocument_enabled' => class_exists( 'DOMDocument' ),
397 'gzip_enabled' => is_callable( 'gzopen' ),
398 'mbstring_enabled' => extension_loaded( 'mbstring' ),
399 );
400
401 return $this->environment_status;
402 }
403
404 public function status( $type = '' ) {
405
406 $data = array();
407 $data[ null ] = 'null';
408
409 $environment = $this->get_environment_info();
410
411 $data['home_url'] = $environment['home_url'] ?? null;
412 $data['site_url'] = $environment['site_url'] ?? null;
413
414 $latest_version = get_transient( 'tutor_system_status_wp_version_check' );
415
416 if ( false === $latest_version ) {
417 $version_check = wp_remote_get( 'https://api.wordpress.org/core/version-check/1.7/' );
418 $api_response = json_decode( wp_remote_retrieve_body( $version_check ), true );
419
420 $latest_version = ( $api_response && isset( $api_response['offers'], $api_response['offers'][0], $api_response['offers'][0]['version'] ) )
421 ? $api_response['offers'][0]['version']
422 : $environment['wp_version'];
423 set_transient( 'tutor_system_status_wp_version_check', $latest_version, DAY_IN_SECONDS );
424 }
425
426 $data['wordpress_version'] = ( version_compare( $environment['wp_version'], $latest_version, '<' ) )
427 ? sprintf( esc_html__( '%1$s - There is a newer version of WordPress available (%2$s)', 'tutor' ), esc_html( $environment['wp_version'] ), esc_html( $latest_version ) )
428 : esc_html( $environment['wp_version'] );
429
430 $data['tutor_version'] = esc_html( $environment['version'] );
431
432 $data['wordpress_multisite'] = $environment['wp_multisite'] ? '' : '-';
433
434 $data['wordpress_debug_mode'] = $environment['wp_debug_mode'] ? '' : '-';
435
436 $data['language'] = esc_html( $environment['language'] );
437
438 $data['wordpress_memory_limit'] = ( $environment['wp_memory_limit'] < 67108864 )
439 ? sprintf( esc_html__( '%1$s - We recommend setting memory to at least 64MB. See: %2$s', 'tutor' ), esc_html( size_format( $environment['wp_memory_limit'] ) ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">' . esc_html__( 'Increasing memory allocated to PHP', 'tutor' ) . '</a>' )
440 : esc_html( size_format( $environment['wp_memory_limit'] ) );
441
442 $data['wordpress_cron'] = $environment['wp_cron'] ? '' : '-';
443
444 $data['external_object_cache'] = $environment['external_object_cache'] ? '' : '-';
445
446 $data['server_info'] = $environment['server_info'] ?? null;
447
448 $data['php_version'] = ( version_compare( $environment['php_version'], '7.2', '>=' ) )
449 ? esc_html( $environment['php_version'] )
450 : ( ( version_compare( $environment['php_version'], '5.6', '<' ) )
451 ? __( 'Tutor will run under this version of PHP, however, it has reached end of life. We recommend using PHP version 7.2 or above for greater performance and security.', 'tutor' )
452 : __( 'We recommend using PHP version 7.2 or above for greater performance and security.', 'tutor' ) );
453
454 $data['php_post_max_size'] = esc_html( size_format( $environment['php_post_max_size'] ) ) ?? null;
455
456 $data['php_time_limit'] = esc_html( $environment['php_max_execution_time'] ) ?? null;
457
458 $data['php_max_input_vars'] = esc_html( $environment['php_max_input_vars'] ) ?? null;
459
460 $data['curl_version'] = esc_html( $environment['curl_version'] ) ?? null;
461
462 $data['suhosin_installed'] = $environment['suhosin_installed'] ? '' : '-';
463
464 $data['max_upload_size'] = esc_html( size_format( $environment['max_upload_size'] ) ) ?? null;
465
466 $data['mysql_version'] = ( version_compare( $environment['mysql_version'], '5.6', '<' ) && ! strstr( $environment['mysql_version_string'], 'MariaDB' ) )
467 ? sprintf( esc_html__( '%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s', 'tutor' ), esc_html( $environment['mysql_version_string'] ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . esc_html__( 'WordPress requirements', 'tutor' ) . '</a>' )
468 : esc_html( $environment['mysql_version_string'] );
469
470 $data['default_timezone_is_utc'] = ( 'UTC' !== $environment['default_timezone'] )
471 ? sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'tutor' ), esc_html( $environment['default_timezone'] ) )
472 : '';
473
474 $data['fsockopen_curl'] = $environment['fsockopen_or_curl_enabled']
475 ? ''
476 : esc_html__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'tutor' );
477
478 $data['dom_document'] = $environment['domdocument_enabled']
479 ? ''
480 : sprintf( esc_html__( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'tutor' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' );
481
482 $data['gzip'] = ( $environment['gzip_enabled'] )
483 ? ''
484 : sprintf( esc_html__( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.', 'tutor' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' );
485
486 $data['multibyte_string'] = ( $environment['mbstring_enabled'] )
487 ? ''
488 : sprintf( esc_html__( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'tutor' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' );
489
490 if ( ! null == $type ) {
491 return $data[ $type ];
492 }
493
494 return $data[ null ];
495 }
496
497 /**
498 * @param array $field
499 *
500 * @return string
501 *
502 * Generate Option Field
503 */
504 public function generate_field( $field = array() ) {
505 ob_start();
506 include tutor()->path . "views/options/field-types/{$field['type']}.php";
507
508 return ob_get_clean();
509 }
510
511 public function field_type( $field = array() ) {
512 ob_start();
513 include tutor()->path . "views/options/field-types/{$field['type']}.php";
514 return ob_get_clean();
515 }
516
517 public function blocks( $blocks = array() ) {
518 ob_start();
519 include tutor()->path . 'views/options/option_blocks.php';
520 return ob_get_clean();
521 }
522
523 public function template( $section = array() ) {
524 ob_start();
525 include $section['view_path'] . $section['template'] . '.php';
526 return ob_get_clean();
527 }
528 /**
529 * Load template inside template dirctory
530 *
531 * @param mixed $template_slug
532 * @param mixed $section
533 * @return void
534 */
535 public function view_template( $template_slug, $section = array() ) {
536 ob_start();
537 require tutor()->path . "views/options/template/{$template_slug}";
538 return ob_get_clean();
539 }
540 }
541