Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
* @link https://themeum.com
* @since 1.3.4
*/
namespace TUTOR;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Dashboard Class
*
* @since 1.3.4
*/
class Dashboard {
/**
* Constructor
*
* @since 1.3.4
* @return void
*/
public function __construct() {
add_action( 'tutor_load_template_after', array( $this, 'tutor_load_template_after' ), 10, 2 );
add_filter( 'should_tutor_load_template', array( $this, 'should_tutor_load_template' ), 10, 2 );
}
/**
* Load template after
*
* @since 1.3.4
* @return void
*/
public function tutor_load_template_after() {
global $wp_query;
$tutor_dashboard_page = tutor_utils()->array_get( 'query_vars.tutor_dashboard_page', $wp_query );
if ( 'create-course' === $tutor_dashboard_page ) {
wp_reset_query();
}
}
/**
* Check template need to load or not
*
* @since 1.3.4
*
* @param bool $bool true or false.
* @param string $template template name.
*
* @return boolean
*/
public function should_tutor_load_template( $bool, $template ) {
if ( 'dashboard.create-course' === $template && ! tutor()->has_pro ) {
return false;
}
return $bool;
}
}