@@ -93,14 +93,17 @@ |
||
93 | 93 | |
94 | 94 | $class_names = join( ' ', $classes ); |
95 | 95 | |
96 | - if ( $args->has_children ) |
|
97 | - $class_names .= ' dropdown'; |
|
96 | + if ( $args->has_children ) { |
|
97 | + $class_names .= ' dropdown'; |
|
98 | + } |
|
98 | 99 | |
99 | - if ( in_array( 'current-menu-item', $classes ) ) |
|
100 | - $class_names .= ' active'; |
|
100 | + if ( in_array( 'current-menu-item', $classes ) ) { |
|
101 | + $class_names .= ' active'; |
|
102 | + } |
|
101 | 103 | |
102 | - if ( in_array( 'current-menu-parent', $classes ) ) |
|
103 | - $class_names .= ' active'; |
|
104 | + if ( in_array( 'current-menu-parent', $classes ) ) { |
|
105 | + $class_names .= ' active'; |
|
106 | + } |
|
104 | 107 | |
105 | 108 | //Check if this is ment to be a "social" type menu |
106 | 109 | $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; |
@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function add_gutenberg_compatible_body_class( $classes ) { |
28 | 28 | // if ( ! is_home() && ! is_front_page() ). |
29 | - if ( is_page() || is_page_template() || is_single() ) |
|
30 | - $classes[] = 'gutenberg-compatible-template'; |
|
29 | + if ( is_page() || is_page_template() || is_single() ) { |
|
30 | + $classes[] = 'gutenberg-compatible-template'; |
|
31 | + } |
|
31 | 32 | |
32 | 33 | // Add a class if the page is using the Content and Media block. |
33 | 34 | $post = get_post(); |
@@ -48,8 +49,9 @@ discard block |
||
48 | 49 | |
49 | 50 | // Add custom class for templates that are using the Gutenberg editor. |
50 | 51 | add_action('body_class', function( $classes ) { |
51 | - if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) |
|
52 | - $classes[] = 'using-gutenberg'; |
|
52 | + if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) { |
|
53 | + $classes[] = 'using-gutenberg'; |
|
54 | + } |
|
53 | 55 | return $classes; |
54 | 56 | }); |
55 | 57 |
@@ -30,9 +30,12 @@ |
||
30 | 30 | |
31 | 31 | <?php lsx_paging_nav(); ?> |
32 | 32 | |
33 | - <?php else : ?> |
|
33 | + <?php else { |
|
34 | + : ?> |
|
34 | 35 | |
35 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
36 | + <?php get_template_part( 'partials/content', 'none' ); |
|
37 | +} |
|
38 | +?> |
|
36 | 39 | |
37 | 40 | <?php endif; ?> |
38 | 41 |
@@ -20,7 +20,10 @@ |
||
20 | 20 | <div class="col-sm-12"> |
21 | 21 | <?php lsx_footer_top(); ?> |
22 | 22 | |
23 | - <p class="credit <?php if ( has_nav_menu( 'social' ) || has_nav_menu( 'footer' ) ) echo 'credit-float'; ?>"> |
|
23 | + <p class="credit <?php if ( has_nav_menu( 'social' ) || has_nav_menu( 'footer' ) ) { |
|
24 | + echo 'credit-float'; |
|
25 | +} |
|
26 | +?>"> |
|
24 | 27 | <?php |
25 | 28 | printf( |
26 | 29 | /* Translators: 1: current year, 2: blog name */ |
@@ -24,9 +24,12 @@ |
||
24 | 24 | |
25 | 25 | <?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?> |
26 | 26 | |
27 | - <?php else : ?> |
|
27 | + <?php else { |
|
28 | + : ?> |
|
28 | 29 | |
29 | - <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lsx' ); ?></p> |
|
30 | + <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lsx' ); |
|
31 | +} |
|
32 | +?></p> |
|
30 | 33 | <?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?> |
31 | 34 | |
32 | 35 | <?php endif; ?> |
@@ -80,14 +80,20 @@ discard block |
||
80 | 80 | <h1 class="entry-title"> |
81 | 81 | <?php if ( has_post_thumbnail() ) : ?> |
82 | 82 | <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a> |
83 | - <?php else : ?> |
|
84 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
83 | + <?php else { |
|
84 | + : ?> |
|
85 | + <a href="<?php echo esc_url( $archive_link ); |
|
86 | +} |
|
87 | +?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
85 | 88 | <?php endif; ?> |
86 | 89 | |
87 | 90 | <?php if ( has_post_format( array( 'link' ) ) ) : ?> |
88 | 91 | <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
89 | - <?php else : ?> |
|
90 | - <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
|
92 | + <?php else { |
|
93 | + : ?> |
|
94 | + <a href="<?php the_permalink(); |
|
95 | +} |
|
96 | +?>" rel="bookmark"><?php the_title(); ?></a> |
|
91 | 97 | <?php endif; ?> |
92 | 98 | |
93 | 99 | <?php if ( is_sticky() ) : ?> |
@@ -130,11 +136,13 @@ discard block |
||
130 | 136 | <?php the_content(); ?> |
131 | 137 | </div><!-- .entry-content --> |
132 | 138 | |
133 | - <?php else : ?> |
|
139 | + <?php else { |
|
140 | + : ?> |
|
134 | 141 | |
135 | 142 | <div class="entry-content"> |
136 | 143 | <?php |
137 | 144 | the_content(); |
145 | +} |
|
138 | 146 | |
139 | 147 | wp_link_pages( array( |
140 | 148 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
@@ -76,14 +76,20 @@ discard block |
||
76 | 76 | <h2 class="entry-title"> |
77 | 77 | <?php if ( has_post_thumbnail() ) : ?> |
78 | 78 | <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a> |
79 | - <?php else : ?> |
|
80 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
79 | + <?php else { |
|
80 | + : ?> |
|
81 | + <a href="<?php echo esc_url( $archive_link ); |
|
82 | +} |
|
83 | +?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
81 | 84 | <?php endif; ?> |
82 | 85 | |
83 | 86 | <?php if ( has_post_format( array( 'link' ) ) ) : ?> |
84 | 87 | <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
85 | - <?php else : ?> |
|
86 | - <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
|
88 | + <?php else { |
|
89 | + : ?> |
|
90 | + <a href="<?php the_permalink(); |
|
91 | +} |
|
92 | +?>" rel="bookmark"><?php the_title(); ?></a> |
|
87 | 93 | <?php endif; ?> |
88 | 94 | |
89 | 95 | <?php if ( is_sticky() ) : ?> |
@@ -124,11 +130,13 @@ discard block |
||
124 | 130 | <?php the_content(); ?> |
125 | 131 | </div><!-- .entry-content --> |
126 | 132 | |
127 | - <?php else : ?> |
|
133 | + <?php else { |
|
134 | + : ?> |
|
128 | 135 | |
129 | 136 | <div class="entry-content"> |
130 | 137 | <?php |
131 | 138 | the_content(); |
139 | +} |
|
132 | 140 | |
133 | 141 | wp_link_pages( array( |
134 | 142 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
@@ -30,9 +30,12 @@ |
||
30 | 30 | |
31 | 31 | <?php lsx_paging_nav(); ?> |
32 | 32 | |
33 | - <?php else : ?> |
|
33 | + <?php else { |
|
34 | + : ?> |
|
34 | 35 | |
35 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
36 | + <?php get_template_part( 'partials/content', 'none' ); |
|
37 | +} |
|
38 | +?> |
|
36 | 39 | |
37 | 40 | <?php endif; ?> |
38 | 41 |