@@ -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> |
@@ -31,17 +31,17 @@ discard block |
||
31 | 31 | |
32 | 32 | <div class="entry-meta"> |
33 | 33 | <?php |
34 | - $metadata = wp_get_attachment_metadata(); |
|
35 | - printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx' ), |
|
36 | - esc_attr( get_the_date( 'c' ) ), |
|
37 | - esc_html( get_the_date() ), |
|
38 | - wp_get_attachment_url(), |
|
39 | - $metadata['width'], |
|
40 | - $metadata['height'], |
|
41 | - get_permalink( $post->post_parent ), |
|
42 | - get_the_title( $post->post_parent ) |
|
43 | - ); |
|
44 | - ?> |
|
34 | + $metadata = wp_get_attachment_metadata(); |
|
35 | + printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx' ), |
|
36 | + esc_attr( get_the_date( 'c' ) ), |
|
37 | + esc_html( get_the_date() ), |
|
38 | + wp_get_attachment_url(), |
|
39 | + $metadata['width'], |
|
40 | + $metadata['height'], |
|
41 | + get_permalink( $post->post_parent ), |
|
42 | + get_the_title( $post->post_parent ) |
|
43 | + ); |
|
44 | + ?> |
|
45 | 45 | <?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
46 | 46 | </div><!-- .entry-meta --> |
47 | 47 | |
@@ -56,34 +56,34 @@ discard block |
||
56 | 56 | <div class="entry-attachment"> |
57 | 57 | <div class="attachment"> |
58 | 58 | <?php |
59 | - /** |
|
60 | - * 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, |
|
61 | - * 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 |
|
62 | - */ |
|
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 | - foreach ( $attachments as $k => $attachment ) { |
|
65 | - if ( $attachment->ID == $post->ID ) |
|
66 | - break; |
|
67 | - } |
|
68 | - $k++; |
|
69 | - // If there is more than 1 attachment in a gallery |
|
70 | - if ( count( $attachments ) > 1 ) { |
|
71 | - if ( isset( $attachments[ $k ] ) ) |
|
72 | - // get the URL of the next image attachment |
|
73 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
74 | - else |
|
75 | - // or get the URL of the first image attachment |
|
76 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
77 | - } else { |
|
78 | - // or, if there's only 1 image, get the URL of the image |
|
79 | - $next_attachment_url = wp_get_attachment_url(); |
|
80 | - } |
|
81 | - ?> |
|
59 | + /** |
|
60 | + * 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, |
|
61 | + * 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 |
|
62 | + */ |
|
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 | + foreach ( $attachments as $k => $attachment ) { |
|
65 | + if ( $attachment->ID == $post->ID ) |
|
66 | + break; |
|
67 | + } |
|
68 | + $k++; |
|
69 | + // If there is more than 1 attachment in a gallery |
|
70 | + if ( count( $attachments ) > 1 ) { |
|
71 | + if ( isset( $attachments[ $k ] ) ) |
|
72 | + // get the URL of the next image attachment |
|
73 | + $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
74 | + else |
|
75 | + // or get the URL of the first image attachment |
|
76 | + $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
77 | + } else { |
|
78 | + // or, if there's only 1 image, get the URL of the image |
|
79 | + $next_attachment_url = wp_get_attachment_url(); |
|
80 | + } |
|
81 | + ?> |
|
82 | 82 | |
83 | 83 | <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
84 | - $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
85 | - echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
86 | - ?></a> |
|
84 | + $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
85 | + echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
86 | + ?></a> |
|
87 | 87 | </div><!-- .attachment --> |
88 | 88 | |
89 | 89 | <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | </div><!-- .entry-attachment --> |
95 | 95 | |
96 | 96 | <?php |
97 | - the_content(); |
|
97 | + the_content(); |
|
98 | 98 | |
99 | - wp_link_pages( array( |
|
100 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
101 | - 'after' => '</div></div>', |
|
102 | - 'link_before' => '<span>', |
|
103 | - 'link_after' => '</span>' |
|
104 | - ) ); |
|
105 | - ?> |
|
99 | + wp_link_pages( array( |
|
100 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
101 | + 'after' => '</div></div>', |
|
102 | + 'link_before' => '<span>', |
|
103 | + 'link_after' => '</span>' |
|
104 | + ) ); |
|
105 | + ?> |
|
106 | 106 | |
107 | 107 | </div><!-- .entry-content --> |
108 | 108 |
@@ -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 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Enqueue the styles and scripts |
15 | - **/ |
|
15 | + **/ |
|
16 | 16 | public function enqueue(){ |
17 | 17 | // styles |
18 | 18 | wp_enqueue_style( 'lsx-font-picker-custom-control', get_template_directory_uri() .'/css/customizer-font.css'); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Render the content on the theme customizer page |
26 | - **/ |
|
26 | + **/ |
|
27 | 27 | public function render_content(){ |
28 | 28 | if ( empty( $this->choices ) ){ |
29 | 29 | // if there are no choices then don't print anything |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | * @category portfolio |
124 | 124 | */ |
125 | 125 | function lsx_remove_single_related_posts() { |
126 | - if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) { |
|
127 | - $jprp = Jetpack_RelatedPosts::init(); |
|
128 | - $callback = array( $jprp, 'filter_add_target_to_dom' ); |
|
129 | - remove_filter( 'the_content', $callback, 40 ); |
|
130 | - } |
|
126 | + if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) { |
|
127 | + $jprp = Jetpack_RelatedPosts::init(); |
|
128 | + $callback = array( $jprp, 'filter_add_target_to_dom' ); |
|
129 | + remove_filter( 'the_content', $callback, 40 ); |
|
130 | + } |
|
131 | 131 | } |
132 | 132 | add_filter( 'wp', 'lsx_remove_single_related_posts', 20 ); |
133 | 133 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if(is_array($types)){ |
312 | 312 | foreach ($types as $type) { |
313 | 313 | $content = '<li><a href="#" data-filter=".'.$type->slug.'">'; |
314 | - $content .= $type->name; |
|
314 | + $content .= $type->name; |
|
315 | 315 | $content .= '</a></li>'; |
316 | 316 | echo $content; |
317 | 317 | echo "\n"; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * @category styles |
126 | 126 | */ |
127 | 127 | function lsx_sensei_styles() { |
128 | - wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' ); |
|
128 | + wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' ); |
|
129 | 129 | } |
130 | 130 | add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' ); |
131 | 131 | |
@@ -136,10 +136,10 @@ discard block |
||
136 | 136 | * @category styles |
137 | 137 | */ |
138 | 138 | function lsx_sensei_redirect_to_home( $query ){ |
139 | - if(!is_admin() && is_post_type_archive( 'lesson' ) ) { |
|
140 | - wp_redirect( home_url() . '/courses-overview' ); |
|
141 | - exit; |
|
142 | - } |
|
139 | + if(!is_admin() && is_post_type_archive( 'lesson' ) ) { |
|
140 | + wp_redirect( home_url() . '/courses-overview' ); |
|
141 | + exit; |
|
142 | + } |
|
143 | 143 | } |
144 | 144 | add_action( 'parse_query', 'lsx_sensei_redirect_to_home' ); |
145 | 145 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Constructor |
15 | - **/ |
|
15 | + **/ |
|
16 | 16 | public function __construct($title, $location, $cssDeclaration, $cssClass) |
17 | 17 | { |
18 | 18 | $this->title = $title; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Getters |
26 | 26 | * taken from: http://stackoverflow.com/questions/4478661/getter-and-setter |
27 | - **/ |
|
27 | + **/ |
|
28 | 28 | public function __get($property) |
29 | 29 | { |
30 | 30 | if (property_exists($this, $property)) { |
@@ -14,27 +14,27 @@ discard block |
||
14 | 14 | */ |
15 | 15 | class LSX_Walker_Comment extends Walker_Comment { |
16 | 16 | function start_lvl(&$output, $depth = 0, $args = array()) { |
17 | - $GLOBALS['comment_depth'] = $depth + 1; ?> |
|
17 | + $GLOBALS['comment_depth'] = $depth + 1; ?> |
|
18 | 18 | <ul <?php comment_class('media unstyled comment-' . get_comment_ID()); ?>> |
19 | 19 | <?php |
20 | 20 | } |
21 | 21 | |
22 | 22 | function end_lvl(&$output, $depth = 0, $args = array()) { |
23 | - $GLOBALS['comment_depth'] = $depth + 1; |
|
24 | - echo '</ul>'; |
|
23 | + $GLOBALS['comment_depth'] = $depth + 1; |
|
24 | + echo '</ul>'; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0) { |
28 | - $depth++; |
|
29 | - $GLOBALS['comment_depth'] = $depth; |
|
30 | - $GLOBALS['comment'] = $comment; |
|
28 | + $depth++; |
|
29 | + $GLOBALS['comment_depth'] = $depth; |
|
30 | + $GLOBALS['comment'] = $comment; |
|
31 | 31 | |
32 | - if (!empty($args['callback'])) { |
|
33 | - call_user_func($args['callback'], $comment, $args, $depth); |
|
34 | - return; |
|
35 | - } |
|
32 | + if (!empty($args['callback'])) { |
|
33 | + call_user_func($args['callback'], $comment, $args, $depth); |
|
34 | + return; |
|
35 | + } |
|
36 | 36 | |
37 | - extract($args, EXTR_SKIP);?> |
|
37 | + extract($args, EXTR_SKIP);?> |
|
38 | 38 | |
39 | 39 | <li id="comment-<?php comment_ID(); ?>" <?php comment_class('media comment-' . get_comment_ID()); ?>> |
40 | 40 | <?php get_template_part('comment'); ?> |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | function end_el(&$output, $comment, $depth = 0, $args = array()) { |
45 | - if (!empty($args['end-callback'])) { |
|
46 | - call_user_func($args['end-callback'], $comment, $args, $depth); |
|
47 | - return; |
|
48 | - } |
|
49 | - echo "</div></li>\n"; |
|
45 | + if (!empty($args['end-callback'])) { |
|
46 | + call_user_func($args['end-callback'], $comment, $args, $depth); |
|
47 | + return; |
|
48 | + } |
|
49 | + echo "</div></li>\n"; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | function lsx_breadcrumbs() { |
13 | 13 | if (!function_exists('yoast_breadcrumb') && !function_exists('woocommerce_breadcrumb')) { |
14 | - return null; |
|
14 | + return null; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $show_on_front = get_option('show_on_front'); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * Displays logo when applicable |
69 | 69 | * |
70 | 70 | * @return void |
71 | - */ |
|
71 | + */ |
|
72 | 72 | function lsx_site_title() { |
73 | 73 | ?> |
74 | 74 | <div class="site-branding"> |
@@ -117,13 +117,13 @@ discard block |
||
117 | 117 | |
118 | 118 | |
119 | 119 | <?php |
120 | - $post_categories = wp_get_post_categories( get_the_ID() ); |
|
121 | - $cats = array(); |
|
122 | - foreach($post_categories as $c){ |
|
123 | - $cat = get_category( $c ); |
|
124 | - $cats[] = '<a href="' . get_category_link( $cat->term_id ) . '" title="' . sprintf( __( "View all posts in %s" , 'lsx' ), $cat->name ) . '" ' . '>' . $cat->name.'</a>'; |
|
125 | - } |
|
126 | - if(!empty($cats)){ ?> |
|
120 | + $post_categories = wp_get_post_categories( get_the_ID() ); |
|
121 | + $cats = array(); |
|
122 | + foreach($post_categories as $c){ |
|
123 | + $cat = get_category( $c ); |
|
124 | + $cats[] = '<a href="' . get_category_link( $cat->term_id ) . '" title="' . sprintf( __( "View all posts in %s" , 'lsx' ), $cat->name ) . '" ' . '>' . $cat->name.'</a>'; |
|
125 | + } |
|
126 | + if(!empty($cats)){ ?> |
|
127 | 127 | <span class="post-meta-categories"><span><?php _e('Posted in:','lsx'); ?></span> <?php echo implode(', ', $cats); ?></span> |
128 | 128 | <?php } ?> |
129 | 129 | |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | |
411 | 411 | //print_r(get_nav_menu_locations()); |
412 | 412 | |
413 | - if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?> |
|
413 | + if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?> |
|
414 | 414 | <nav class="primary-navbar collapse navbar-collapse"> |
415 | 415 | <?php |
416 | 416 | wp_nav_menu( array( |
@@ -538,9 +538,9 @@ discard block |
||
538 | 538 | if(null != $tag_cloud){ |
539 | 539 | printf( '<h2>'.__( '%1$s', 'lsx' ).'</h2>', $taxonomy ); |
540 | 540 | echo '<aside id="'.$taxonomy_id.'" class="widget widget_'.$taxonomy_id.'">'.$tag_cloud.'</aside>'; |
541 | - } |
|
542 | - } |
|
543 | - } |
|
541 | + } |
|
542 | + } |
|
543 | + } |
|
544 | 544 | } |
545 | 545 | |
546 | 546 | /** |
@@ -589,11 +589,11 @@ discard block |
||
589 | 589 | <div class="container"> |
590 | 590 | <nav class="top-menu"> |
591 | 591 | <?php |
592 | - wp_nav_menu( array( |
|
592 | + wp_nav_menu( array( |
|
593 | 593 | 'theme_location' => 'top-menu', |
594 | 594 | 'walker' => new lsx_bootstrap_navwalker()) |
595 | 595 | ); |
596 | - ?> |
|
596 | + ?> |
|
597 | 597 | </nav> |
598 | 598 | </div> |
599 | 599 | </div> |