learndash_template_filename

apply_filters( 'learndash_template_filename',  string $template_filename,  string $name,  array $args,  boolean $echo,  boolean $return_file_path )

Filters template file name.


Description #


Parameters #

$template_filename

(string) Template file name.

$name

(string) Template name.

$args

(array) Template data.

$echo

(boolean) Whether to echo the template output or not.

$return_file_path

(boolean) Whether to return file or path or not.


Source #

File: includes/class-ld-lms.php


Examples #

 <?php
/**
 * Example usage for learndash_template_filename filter.
 */
add_filter(
	'learndash_template_filename',
	function( $template_filename, $name, $args, $echo, $return_file_path ) {
		// May add any custom logic using $template_filename, $name, $args, $echo, $return_file_path.

		// Always return $template_filename.
		return $template_filename;
	},
	10,
	5
);
 

Changelog #

Changelog
Version Description
3.0.0 Introduced.