llms_get_template( string $template_name, array $args = array(), string $template_path = '', string $default_path = '' )

Get Template Part


Description Description


Parameters Parameters

$template_name

(string) (Required) [name of template]

$args

(array) (Optional) [array of pst args]

Default value: array()

$template_path

(string) (Optional) [file path to template]

Default value: ''

$default_path

(string) (Optional) [default file path]

Default value: ''


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/functions/llms.functions.template.php

function llms_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
	if ( $args && is_array( $args ) ) {
		  extract( $args );
	}

	  $located = llms_locate_template( $template_name, $template_path, $default_path );

	  do_action( 'lifterlms_before_template_part', $template_name, $template_path, $located, $args );

	if ( file_exists( $located ) ) {
		include( $located );
	}

	  do_action( 'lifterlms_after_template_part', $template_name, $template_path, $located, $args );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: