llms_template_file_path( string $template, string $template_directory = 'templates', bool $template_directory_absolute = false )

Build the plugin’s template file path.

Parameters Parameters


(string) (Required) Template file name.


(string) (Optional) Template directory relative to the plugin base directory.

Default value: 'templates'


(bool) (Optional) Whether the template directory is absolute or not.

Default value: false

Top ↑

Return Return


Top ↑

Source Source

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

function llms_template_file_path( $template, $template_directory = 'templates', $template_directory_absolute = false ) {

	// We have reason to use a LifterLMS template, check if there's an override we should use from a theme / etc...
	$override           = llms_get_template_override( $template );
	$template_directory = $template_directory_absolute ? $template_directory : llms()->plugin_path() . "/{$template_directory}/";
	$template_path      = $override ? $override : $template_directory;

	return trailingslashit( $template_path ) . "{$template}";

Top ↑

Changelog Changelog

Version Description
5.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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