@@ -60,12 +60,12 @@ |
||
60 | 60 | <strong><?php _e( 'Get your Tourism Establishment Online', 'lsx' ); ?></strong> |
61 | 61 | |
62 | 62 | <?php |
63 | - if(is_singular('landing-page')){ |
|
64 | - $email_address = get_post_meta(get_the_ID(),'email_address',true); |
|
65 | - if(false === $email_address){ |
|
63 | + if(is_singular('landing-page')){ |
|
64 | + $email_address = get_post_meta(get_the_ID(),'email_address',true); |
|
65 | + if(false === $email_address){ |
|
66 | 66 | $email_address = '[email protected]'; |
67 | 67 | } |
68 | - } ?> |
|
68 | + } ?> |
|
69 | 69 | |
70 | 70 | <span class="email-address"><?php _e( 'Questions? Email Us: ', 'lsx' ); ?><a href="mailto:<?php echo $email_address; ?>"><?php echo $email_address; ?></a></span> |
71 | 71 | </div> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | if('posts' == $show_on_front && is_home()){ |
24 | 24 | $sidebar = 'home'; |
25 | - }else{ |
|
25 | + } else{ |
|
26 | 26 | $sidebar = 'sidebar-1'; |
27 | 27 | } |
28 | 28 | } |
@@ -38,9 +38,12 @@ discard block |
||
38 | 38 | |
39 | 39 | <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
40 | 40 | |
41 | - <?php else : ?> |
|
41 | + <?php else { |
|
42 | + : ?> |
|
42 | 43 | |
43 | - <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
|
44 | + <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); |
|
45 | +} |
|
46 | +?>" role="complementary"> |
|
44 | 47 | |
45 | 48 | <?php endif ; ?> |
46 | 49 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $layout = get_theme_mod('lsx_layout','2cr'); |
13 | 13 | if('posts' == $show_on_front && is_home()){ |
14 | 14 | $sidebar = 'home'; |
15 | - }else{ |
|
15 | + } else{ |
|
16 | 16 | $sidebar = 'sidebar-1'; |
17 | 17 | } |
18 | 18 |
@@ -33,8 +33,10 @@ discard block |
||
33 | 33 | $paged = get_query_var( 'paged' ); |
34 | 34 | elseif ( get_query_var( 'page' ) ) : |
35 | 35 | $paged = get_query_var( 'page' ); |
36 | - else : |
|
36 | + else { |
|
37 | + : |
|
37 | 38 | $paged = 1; |
39 | + } |
|
38 | 40 | endif; |
39 | 41 | |
40 | 42 | $args = array( |
@@ -59,11 +61,14 @@ discard block |
||
59 | 61 | </div> |
60 | 62 | </div><!-- .portfolio-wrapper --> |
61 | 63 | |
62 | - <?php else : ?> |
|
64 | + <?php else { |
|
65 | + : ?> |
|
63 | 66 | |
64 | 67 | <section class="no-results not-found"> |
65 | 68 | <header class="page-header"> |
66 | - <h1 class="page-title"><?php _e( 'Nothing Found', 'lsx' ); ?></h1> |
|
69 | + <h1 class="page-title"><?php _e( 'Nothing Found', 'lsx' ); |
|
70 | +} |
|
71 | +?></h1> |
|
67 | 72 | </header><!-- .page-header --> |
68 | 73 | |
69 | 74 | <div class="page-content"> |
@@ -71,9 +76,12 @@ discard block |
||
71 | 76 | |
72 | 77 | <p><?php printf( __( 'Ready to publish your first project? <a href="%1$s">Get started here</a>.', 'lsx' ), esc_url( admin_url( 'post-new.php?post_type=jetpack-portfolio' ) ) ); ?></p> |
73 | 78 | |
74 | - <?php else : ?> |
|
79 | + <?php else { |
|
80 | + : ?> |
|
75 | 81 | |
76 | - <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lsx' ); ?></p> |
|
82 | + <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lsx' ); |
|
83 | +} |
|
84 | +?></p> |
|
77 | 85 | <?php get_search_form(); ?> |
78 | 86 | |
79 | 87 | <?php endif; ?> |
@@ -44,9 +44,12 @@ |
||
44 | 44 | |
45 | 45 | <?php lsx_paging_nav(); ?> |
46 | 46 | |
47 | - <?php else : ?> |
|
47 | + <?php else { |
|
48 | + : ?> |
|
48 | 49 | |
49 | - <?php get_template_part( 'content', 'none' ); ?> |
|
50 | + <?php get_template_part( 'content', 'none' ); |
|
51 | +} |
|
52 | +?> |
|
50 | 53 | |
51 | 54 | <?php endif; ?> |
52 | 55 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | if(has_nav_menu('footer-menu')){ |
26 | 26 | wp_nav_menu(array('theme_location' => 'footer-menu')); |
27 | 27 | } |
28 | - }else{ |
|
28 | + } else{ |
|
29 | 29 | if(has_nav_menu('footer_logged_in')){ |
30 | 30 | wp_nav_menu(array('theme_location' => 'footer_logged_in')); |
31 | 31 | } |
@@ -62,18 +62,20 @@ |
||
62 | 62 | */ |
63 | 63 | $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
64 | 64 | foreach ( $attachments as $k => $attachment ) { |
65 | - if ( $attachment->ID == $post->ID ) |
|
66 | - break; |
|
65 | + if ( $attachment->ID == $post->ID ) { |
|
66 | + break; |
|
67 | + } |
|
67 | 68 | } |
68 | 69 | $k++; |
69 | 70 | // If there is more than 1 attachment in a gallery |
70 | 71 | if ( count( $attachments ) > 1 ) { |
71 | - if ( isset( $attachments[ $k ] ) ) |
|
72 | - // get the URL of the next image attachment |
|
72 | + if ( isset( $attachments[ $k ] ) ) { |
|
73 | + // get the URL of the next image attachment |
|
73 | 74 | $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
74 | - else |
|
75 | - // or get the URL of the first image attachment |
|
75 | + } else { |
|
76 | + // or get the URL of the first image attachment |
|
76 | 77 | $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
78 | + } |
|
77 | 79 | } else { |
78 | 80 | // or, if there's only 1 image, get the URL of the image |
79 | 81 | $next_attachment_url = wp_get_attachment_url(); |
@@ -31,20 +31,20 @@ discard block |
||
31 | 31 | |
32 | 32 | <div class="entry-meta"> |
33 | 33 | <?php |
34 | - $metadata = wp_get_attachment_metadata(); |
|
35 | - printf( wp_kses_post( '%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s × %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>' ), |
|
36 | - esc_html__( 'Published', 'lsx' ), |
|
37 | - esc_attr( get_the_date( 'c' ) ), |
|
38 | - esc_html( get_the_date() ), |
|
39 | - esc_html__( 'at', 'lsx' ), |
|
40 | - esc_url( wp_get_attachment_url() ), |
|
41 | - esc_attr( $metadata['width'] ), |
|
42 | - esc_attr( $metadata['height'] ), |
|
43 | - esc_html__( 'in', 'lsx' ), |
|
44 | - esc_url( get_permalink( $post->post_parent ) ), |
|
45 | - get_the_title( $post->post_parent ) |
|
46 | - ); |
|
47 | - ?> |
|
34 | + $metadata = wp_get_attachment_metadata(); |
|
35 | + printf( wp_kses_post( '%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s × %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>' ), |
|
36 | + esc_html__( 'Published', 'lsx' ), |
|
37 | + esc_attr( get_the_date( 'c' ) ), |
|
38 | + esc_html( get_the_date() ), |
|
39 | + esc_html__( 'at', 'lsx' ), |
|
40 | + esc_url( wp_get_attachment_url() ), |
|
41 | + esc_attr( $metadata['width'] ), |
|
42 | + esc_attr( $metadata['height'] ), |
|
43 | + esc_html__( 'in', 'lsx' ), |
|
44 | + esc_url( get_permalink( $post->post_parent ) ), |
|
45 | + get_the_title( $post->post_parent ) |
|
46 | + ); |
|
47 | + ?> |
|
48 | 48 | <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
49 | 49 | </div><!-- .entry-meta --> |
50 | 50 | |
@@ -59,34 +59,34 @@ discard block |
||
59 | 59 | <div class="entry-attachment"> |
60 | 60 | <div class="attachment"> |
61 | 61 | <?php |
62 | - /** |
|
63 | - * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, |
|
64 | - * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file |
|
65 | - */ |
|
66 | - $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
|
67 | - foreach ( $attachments as $k => $attachment ) { |
|
68 | - if ( $attachment->ID == $post->ID ) |
|
69 | - break; |
|
70 | - } |
|
71 | - $k++; |
|
72 | - // If there is more than 1 attachment in a gallery |
|
73 | - if ( count( $attachments ) > 1 ) { |
|
74 | - if ( isset( $attachments[ $k ] ) ) |
|
75 | - // get the URL of the next image attachment |
|
76 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
77 | - else |
|
78 | - // or get the URL of the first image attachment |
|
79 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
80 | - } else { |
|
81 | - // or, if there's only 1 image, get the URL of the image |
|
82 | - $next_attachment_url = wp_get_attachment_url(); |
|
83 | - } |
|
84 | - ?> |
|
62 | + /** |
|
63 | + * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, |
|
64 | + * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file |
|
65 | + */ |
|
66 | + $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
|
67 | + foreach ( $attachments as $k => $attachment ) { |
|
68 | + if ( $attachment->ID == $post->ID ) |
|
69 | + break; |
|
70 | + } |
|
71 | + $k++; |
|
72 | + // If there is more than 1 attachment in a gallery |
|
73 | + if ( count( $attachments ) > 1 ) { |
|
74 | + if ( isset( $attachments[ $k ] ) ) |
|
75 | + // get the URL of the next image attachment |
|
76 | + $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
77 | + else |
|
78 | + // or get the URL of the first image attachment |
|
79 | + $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
80 | + } else { |
|
81 | + // or, if there's only 1 image, get the URL of the image |
|
82 | + $next_attachment_url = wp_get_attachment_url(); |
|
83 | + } |
|
84 | + ?> |
|
85 | 85 | |
86 | 86 | <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
87 | - $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
88 | - echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
89 | - ?></a> |
|
87 | + $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
88 | + echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
89 | + ?></a> |
|
90 | 90 | </div><!-- .attachment --> |
91 | 91 | |
92 | 92 | <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
@@ -97,15 +97,15 @@ discard block |
||
97 | 97 | </div><!-- .entry-attachment --> |
98 | 98 | |
99 | 99 | <?php |
100 | - the_content(); |
|
100 | + the_content(); |
|
101 | 101 | |
102 | - wp_link_pages( array( |
|
103 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
104 | - 'after' => '</div></div>', |
|
105 | - 'link_before' => '<span>', |
|
106 | - 'link_after' => '</span>' |
|
107 | - ) ); |
|
108 | - ?> |
|
102 | + wp_link_pages( array( |
|
103 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
104 | + 'after' => '</div></div>', |
|
105 | + 'link_before' => '<span>', |
|
106 | + 'link_after' => '</span>' |
|
107 | + ) ); |
|
108 | + ?> |
|
109 | 109 | |
110 | 110 | </div><!-- .entry-content --> |
111 | 111 |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | $show_on_front = get_option('show_on_front','posts'); |
34 | 34 | if('page' == $show_on_front){ |
35 | 35 | $archive_link = get_permalink(get_option('page_for_posts')); |
36 | - }else{ |
|
36 | + } else{ |
|
37 | 37 | $archive_link = home_url(); |
38 | 38 | } |
39 | - }else{ |
|
39 | + } else{ |
|
40 | 40 | $archive_link = get_post_format_link($format); |
41 | 41 | } |
42 | 42 | $format = lsx_translate_format_to_fontawesome($format); |
@@ -71,10 +71,12 @@ discard block |
||
71 | 71 | </div><!-- .entry-summary --> |
72 | 72 | <?php elseif ( has_post_format( array('link') ) ) : ?> |
73 | 73 | |
74 | - <?php else : ?> |
|
74 | + <?php else { |
|
75 | + : ?> |
|
75 | 76 | <div class="entry-content"> |
76 | 77 | <?php |
77 | 78 | the_content(); |
79 | +} |
|
78 | 80 | |
79 | 81 | wp_link_pages( array( |
80 | 82 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
@@ -159,17 +159,17 @@ |
||
159 | 159 | * @return null Null on failure with no changes to parameters. |
160 | 160 | */ |
161 | 161 | public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { |
162 | - if ( ! $element ) |
|
163 | - return; |
|
162 | + if ( ! $element ) |
|
163 | + return; |
|
164 | 164 | |
165 | - $id_field = $this->db_fields['id']; |
|
165 | + $id_field = $this->db_fields['id']; |
|
166 | 166 | |
167 | - // Display this element. |
|
168 | - if ( is_object( $args[0] ) ) |
|
169 | - $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
167 | + // Display this element. |
|
168 | + if ( is_object( $args[0] ) ) |
|
169 | + $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
170 | 170 | |
171 | - parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
|
172 | - } |
|
171 | + parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
|
172 | + } |
|
173 | 173 | |
174 | 174 | /** |
175 | 175 | * Menu Fallback |
@@ -1,5 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + return; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | class lsx_bootstrap_navwalker extends Walker_Nav_Menu { |
5 | 8 | |
@@ -71,14 +74,17 @@ discard block |
||
71 | 74 | |
72 | 75 | $class_names = join( ' ', $classes ); |
73 | 76 | |
74 | - if ( $args->has_children ) |
|
75 | - $class_names .= ' dropdown'; |
|
77 | + if ( $args->has_children ) { |
|
78 | + $class_names .= ' dropdown'; |
|
79 | + } |
|
76 | 80 | |
77 | - if ( in_array( 'current-menu-item', $classes ) ) |
|
78 | - $class_names .= ' active'; |
|
81 | + if ( in_array( 'current-menu-item', $classes ) ) { |
|
82 | + $class_names .= ' active'; |
|
83 | + } |
|
79 | 84 | |
80 | - if ( in_array( 'current-menu-parent', $classes ) ) |
|
81 | - $class_names .= ' active'; |
|
85 | + if ( in_array( 'current-menu-parent', $classes ) ) { |
|
86 | + $class_names .= ' active'; |
|
87 | + } |
|
82 | 88 | |
83 | 89 | //Check if this is ment to be a "social" type menu |
84 | 90 | $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; |
@@ -159,14 +165,16 @@ discard block |
||
159 | 165 | * @return null Null on failure with no changes to parameters. |
160 | 166 | */ |
161 | 167 | public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { |
162 | - if ( ! $element ) |
|
163 | - return; |
|
168 | + if ( ! $element ) { |
|
169 | + return; |
|
170 | + } |
|
164 | 171 | |
165 | 172 | $id_field = $this->db_fields['id']; |
166 | 173 | |
167 | 174 | // Display this element. |
168 | - if ( is_object( $args[0] ) ) |
|
169 | - $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
175 | + if ( is_object( $args[0] ) ) { |
|
176 | + $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
177 | + } |
|
170 | 178 | |
171 | 179 | parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
172 | 180 | } |
@@ -192,29 +200,34 @@ discard block |
||
192 | 200 | if ( $container ) { |
193 | 201 | $fb_output = '<' . $container; |
194 | 202 | |
195 | - if ( $container_id ) |
|
196 | - $fb_output .= ' id="' . $container_id . '"'; |
|
203 | + if ( $container_id ) { |
|
204 | + $fb_output .= ' id="' . $container_id . '"'; |
|
205 | + } |
|
197 | 206 | |
198 | - if ( $container_class ) |
|
199 | - $fb_output .= ' class="' . $container_class . '"'; |
|
207 | + if ( $container_class ) { |
|
208 | + $fb_output .= ' class="' . $container_class . '"'; |
|
209 | + } |
|
200 | 210 | |
201 | 211 | $fb_output .= '>'; |
202 | 212 | } |
203 | 213 | |
204 | 214 | $fb_output .= '<ul'; |
205 | 215 | |
206 | - if ( $menu_id ) |
|
207 | - $fb_output .= ' id="' . $menu_id . '"'; |
|
216 | + if ( $menu_id ) { |
|
217 | + $fb_output .= ' id="' . $menu_id . '"'; |
|
218 | + } |
|
208 | 219 | |
209 | - if ( $menu_class ) |
|
210 | - $fb_output .= ' class="' . $menu_class . '"'; |
|
220 | + if ( $menu_class ) { |
|
221 | + $fb_output .= ' class="' . $menu_class . '"'; |
|
222 | + } |
|
211 | 223 | |
212 | 224 | $fb_output .= '>'; |
213 | 225 | $fb_output .= '<li><a href="' . admin_url( 'nav-menus.php' ) . '">'.__('Add a menu','lsx').'</a></li>'; |
214 | 226 | $fb_output .= '</ul>'; |
215 | 227 | |
216 | - if ( $container ) |
|
217 | - $fb_output .= '</' . $container . '>'; |
|
228 | + if ( $container ) { |
|
229 | + $fb_output .= '</' . $container . '>'; |
|
230 | + } |
|
218 | 231 | |
219 | 232 | echo $fb_output; |
220 | 233 | } |