llms_get_template_override_directories()

Get template override directories.


Description Description

Moved from llms_get_template_override().


Top ↑

Return Return

(string[])


Top ↑

Source Source

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

function llms_get_template_override_directories() {

	$dirs = wp_cache_get( 'theme-override-directories', 'llms_template_functions' );
	if ( false === $dirs ) {
		$dirs = array_filter(
			array_unique(
				array(
					get_stylesheet_directory() . '/lifterlms',
					get_template_directory() . '/lifterlms',
				)
			),
			'is_dir'
		);
		wp_cache_set( 'theme-override-directories', $dirs, 'llms_template_functions' );
	}

	/**
	 * Filters the theme override directories.
	 *
	 * Allow themes and plugins to determine which folders to look in for theme overrides.
	 *
	 * @since Unknown
	 *
	 * @param string[] $theme_override_directories List of theme override directory paths.
	 */
	return apply_filters( 'lifterlms_theme_override_directories', $dirs );

}


Top ↑

Changelog Changelog

Changelog
Version Description
4.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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