wordpress/wp-content/themes/basic/themify/themify-builder/includes/components/base.php
/**
     * Locate a template and return the path for inclusion.
     *
     * This is the load order:
     *
     * 		yourtheme		/	$template_path	/	$template_name
     * 		$default_path	/	$template_name
     */
Locate a template and return the path for inclusion.
This is the load order.


Locate a template and return the path for inclusion . This is the load order .
public static function locate_template($template_name, $template_path = '', $default_path = '') {
	$template = '';
	$templates = Themify_Builder_Model::get_directory_path('templates');
	foreach ($templates as $dir) {
	    if (is_file($dir . $template_name)) {
		$template = $dir . $template_name;
		break;
	    }
	}
	if (!$template) {
	    $template = $default_path . $template_name;
	}
	return apply_filters('themify_builder_locate_template', $template, $template_name, $template_path);
    }
public static function locate_template ( $ template_name , $ template_path = '' , $ default_path = '' ) { $ template = '' ; $ templates = Themify_Builder_Model :: get_directory_path ( 'templates' ) ; foreach ( $ templates as $ dir ) { if ( is_file ( $ dir . $ template_name ) ) { $ template = $ dir . $ template_name ; break ; } } if ( ! $ template ) { $ template = $ default_path . $ template_name ; } return apply_filters ( 'themify_builder_locate_template' , $ template , $ template_name , $ template_path ) ; }
Locate a template and return the path for inclusion.
Locate a template and return the path for inclusion .
// Get default template // Return what we found