dozent_load_template( $template, array $args = array(), bool $echo = true )


Parameters

$args

(array) (Optional)

Default value: array()

$echo

(bool) (Optional)

Default value: true

$template

(Required)


Return

(mixed|void) Get template


Source

File: includes/core-functions.php

	function dozent_load_template( $template, $args = [], $echo = true ) {
		$template_path = apply_filters( 'dozent_load_template_path', dozent_get_template_path( $template ), $template, $args );
		extract( $args );

		ob_start();
		do_action( 'dozent_before_template_part', $template, $template_path, $args );
		include $template_path;
		do_action( 'dozent_after_template_part', $template, $template_path, $args );

		$template_html = apply_filters( 'dozent_load_template', ob_get_clean(), $template, $template_path, $args );

		if ( $echo ) {
			echo $template_html;
		}

		return $template_html;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.