Skip to content

Commit

Permalink
Merge pull request #13 from ekandreas/analysis-qMvNLz
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
Andreas Ek committed Jan 6, 2016
2 parents 24b9711 + 0f10588 commit a534231
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,16 @@ private function addTemplateFilters()

$types = apply_filters('bladerunner/template_types', $types);

if( $types ) {
if ($types) {
foreach ($types as $key => $type) {
add_filter($key.'_template', function ($original) use ($type) {
if( locate_template( $type, false ) ) {
if (locate_template($type, false)) {
return $type;
}
else {
} else {
return $original;
}
}, 99);
}
}

}
}

0 comments on commit a534231

Please sign in to comment.