@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | { |
24 | 24 | $template = UtilityFacade::startWith( 'templates/', $slug ); |
25 | 25 | $templates = ["$template.php"]; |
26 | - if( !empty( $name )) { |
|
26 | + if( !empty( $name ) ) { |
|
27 | 27 | $fileName = basename( $template ); |
28 | 28 | $filePath = UtilityFacade::trimRight( $template, $fileName ); |
29 | - array_unshift( $templates, sprintf( '%s/%s.php', $filePath.$name, $fileName )); |
|
29 | + array_unshift( $templates, sprintf( '%s/%s.php', $filePath.$name, $fileName ) ); |
|
30 | 30 | } |
31 | - $templates = array_unique( apply_filters( "castor/templates/$slug", $templates, $name )); |
|
31 | + $templates = array_unique( apply_filters( "castor/templates/$slug", $templates, $name ) ); |
|
32 | 32 | $template = locate_template( $templates ); |
33 | - if( empty( $template )) { |
|
34 | - if( file_exists( "$slug.php" )) { |
|
33 | + if( empty( $template ) ) { |
|
34 | + if( file_exists( "$slug.php" ) ) { |
|
35 | 35 | return "$slug.php"; |
36 | 36 | } |
37 | 37 | LogFacade::debug( "$slug not found." ); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function load( $slug, $name = '' ) |
49 | 49 | { |
50 | - if( !empty(( $template = $this->get( $slug, $name )))) { |
|
50 | + if( !empty( ( $template = $this->get( $slug, $name ) ) ) ) { |
|
51 | 51 | DevelopmentFacade::storeTemplatePath( $template ); |
52 | 52 | load_template( $template, false ); |
53 | 53 | } |
@@ -70,6 +70,6 @@ discard block |
||
70 | 70 | { |
71 | 71 | $template = str_replace( get_stylesheet_directory().'/templates/', '', $template ); |
72 | 72 | $this->template = UtilityFacade::trimRight( $template, '.php' ); |
73 | - return $this->get( apply_filters( 'castor/templates/layout', 'layouts/default' )); |
|
73 | + return $this->get( apply_filters( 'castor/templates/layout', 'layouts/default' ) ); |
|
74 | 74 | } |
75 | 75 | } |