Skip to content

Commit

Permalink
Merge pull request getblocklab#370 from getblocklab/bugfix/334-child-…
Browse files Browse the repository at this point in the history
…theme-css

Load child theme templates before parent theme
  • Loading branch information
lukecarbis committed Jul 23, 2019
2 parents 0fa2490 + 48123b0 commit d62ac55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions php/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ function block_lab_locate_template( $template_names, $path = '', $single = true
}
}

if ( file_exists( trailingslashit( $stylesheet_path ) . $template_name ) ) {
$located[] = trailingslashit( $stylesheet_path ) . $template_name;
if ( file_exists( trailingslashit( $template_path ) . $template_name ) ) {
$located[] = trailingslashit( $template_path ) . $template_name;
if ( $single ) {
break;
}
}

if ( file_exists( trailingslashit( $template_path ) . $template_name ) ) {
$located[] = trailingslashit( $template_path ) . $template_name;
if ( file_exists( trailingslashit( $stylesheet_path ) . $template_name ) ) {
$located[] = trailingslashit( $stylesheet_path ) . $template_name;
if ( $single ) {
break;
}
Expand Down

0 comments on commit d62ac55

Please sign in to comment.