Skip to content

Commit

Permalink
Merge pull request #1 from wolfkang/patch-1
Browse files Browse the repository at this point in the history
Update trait-nss-template-impl.php
  • Loading branch information
chwnam authored Nov 22, 2021
2 parents 1d825c0 + 5e99291 commit 2a51b55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/traits/trait-nss-template-impl.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ protected function locate_file( string $tmpl_type, string $relpath, string $vari
}

$paths = [
$variant ? STYLESHEETPATH . "/nss/{$dir}/{$file_name}-{$variant}.{$ext}" : false,
STYLESHEETPATH . "/nss/{$dir}/{$file_name}.{$ext}",
$variant ? TEMPLATEPATH . "/nss/{$dir}/{$file_name}-{$variant}.{$ext}" : false,
TEMPLATEPATH . "/nss/{$dir}/{$file_name}.{$ext}",
$variant ? get_stylesheet_directory() . "/nss/{$dir}/{$file_name}-{$variant}.{$ext}" : false,
get_stylesheet_directory() . "/nss/{$dir}/{$file_name}.{$ext}",
$variant ? get_template_directory() . "/nss/{$dir}/{$file_name}-{$variant}.{$ext}" : false,
get_template_directory() . "/nss/{$dir}/{$file_name}.{$ext}",
$variant ? plugin_dir_path( nss()->get_main_file() ) . "includes/templates/{$dir}/{$file_name}-{$variant}.{$ext}" : false,
plugin_dir_path( nss()->get_main_file() ) . "includes/templates/{$dir}/{$file_name}.{$ext}",
];

$paths = apply_filters( 'nss_locate_file_paths', array_filter( $paths ) );
$paths = apply_filters( 'nss_locate_file_paths', array_filter( $paths ), $filename );
$located = false;

foreach ( (array) $paths as $path ) {
Expand Down

0 comments on commit 2a51b55

Please sign in to comment.