Пример #1
0
function get_custom_product_listing_path()
{
    $folder = get_custom_templates_folder();
    return $folder . 'product-listing.php';
}
Пример #2
0
/**
 * Manages template files paths
 *
 * @param type $file_path
 * @return type
 */
function ic_get_template_file($file_path)
{
    $folder = get_custom_templates_folder();
    $file_name = basename($file_path);
    if (file_exists($folder . $file_name)) {
        return $folder . $file_name;
    } else {
        if (file_exists(AL_BASE_PATH . '/templates/template-parts/' . $file_path)) {
            return AL_BASE_PATH . '/templates/template-parts/' . $file_path;
        } else {
            return false;
        }
    }
}