Template::dozent_load_dashboard_page( $template_html,  $template )


Parameters

$template_html

(Required)

$template

(Required)


Return

(mixed|void) Check dashboard page if proper permission exists


Source

File: classes/Template.php

    public function dozent_load_dashboard_page( $template_html, $template ){
        $url_segment = dozent_get_dashboard_url_segment();

        if ( $url_segment ) {
        	$has_permission = dozent_has_instructor_permission_dashboard_permalink( $url_segment );

        	if ( ! $has_permission ){
		        $template_html = dozent_load_template( 'global/permission-denied', [], false );
	        }
        }

        return $template_html;
    }