Skip to content

Commit

Permalink
fix curly brace syntax from #1329
Browse files Browse the repository at this point in the history
  • Loading branch information
aschweigert committed Oct 11, 2016
1 parent f4ef22d commit 6ed4f3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inc/post-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ function get_post_template( $template ) {
if ( is_object( $post ) ) {
$custom_field = get_post_meta( $post->ID, '_wp_post_template', true );
}
if ( !empty( $custom_field ) ) {
if ( file_exists( get_stylesheet_directory() . '/{$custom_field}' ) ) {
$template = get_stylesheet_directory() . '/{$custom_field}';
} else if ( file_exists( get_template_directory() . '/{$custom_field}') ) {
$template = get_template_directory() . '/{$custom_field}';
if ( ! empty( $custom_field ) ) {
if ( file_exists( get_stylesheet_directory() . "/{$custom_field}" ) ) {
$template = get_stylesheet_directory() . "/{$custom_field}";
} else if ( file_exists( get_template_directory() . "/{$custom_field}" ) ) {
$template = get_template_directory() . "/{$custom_field}";
}
}
return $template;
Expand Down

0 comments on commit 6ed4f3a

Please sign in to comment.