@@ -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)) { |
@@ -69,8 +69,8 @@ |
||
69 | 69 | add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' ); |
70 | 70 | |
71 | 71 | function lsx_woocommerce_styles() { |
72 | - wp_enqueue_style( 'woocommerce-layout', get_template_directory_uri() . '/css/woocommerce-layout.css', array(), WC_VERSION, 'all' ); |
|
73 | - wp_enqueue_style( 'woocommerce-smallscreen', get_template_directory_uri() . '/css/woocommerce-smallscreen.css', array( 'woocommerce-layout' ), WC_VERSION, 'only screen and (max-width: 767px)' ); |
|
74 | - wp_enqueue_style( 'woocommerce-general', get_template_directory_uri() . '/css/woocommerce.css', array(), WC_VERSION, 'all' ); |
|
72 | + wp_enqueue_style( 'woocommerce-layout', get_template_directory_uri() . '/css/woocommerce-layout.css', array(), WC_VERSION, 'all' ); |
|
73 | + wp_enqueue_style( 'woocommerce-smallscreen', get_template_directory_uri() . '/css/woocommerce-smallscreen.css', array( 'woocommerce-layout' ), WC_VERSION, 'only screen and (max-width: 767px)' ); |
|
74 | + wp_enqueue_style( 'woocommerce-general', get_template_directory_uri() . '/css/woocommerce.css', array(), WC_VERSION, 'all' ); |
|
75 | 75 | } |
76 | 76 | add_action( 'wp_enqueue_scripts', 'lsx_woocommerce_styles' ); |
77 | 77 | \ No newline at end of file |
@@ -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 |
@@ -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"> |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | |
419 | 419 | //print_r(get_nav_menu_locations()); |
420 | 420 | |
421 | - if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?> |
|
421 | + if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?> |
|
422 | 422 | <nav class="primary-navbar collapse navbar-collapse"> |
423 | 423 | <?php |
424 | 424 | wp_nav_menu( array( |
@@ -546,9 +546,9 @@ discard block |
||
546 | 546 | if(null != $tag_cloud){ |
547 | 547 | printf( '<h2>'.__( '%1$s', 'lsx' ).'</h2>', $taxonomy ); |
548 | 548 | echo '<aside id="'.$taxonomy_id.'" class="widget widget_'.$taxonomy_id.'">'.$tag_cloud.'</aside>'; |
549 | - } |
|
550 | - } |
|
551 | - } |
|
549 | + } |
|
550 | + } |
|
551 | + } |
|
552 | 552 | } |
553 | 553 | |
554 | 554 | /** |
@@ -597,11 +597,11 @@ discard block |
||
597 | 597 | <div class="container"> |
598 | 598 | <nav class="top-menu"> |
599 | 599 | <?php |
600 | - wp_nav_menu( array( |
|
600 | + wp_nav_menu( array( |
|
601 | 601 | 'theme_location' => 'top-menu', |
602 | 602 | 'walker' => new lsx_bootstrap_navwalker()) |
603 | 603 | ); |
604 | - ?> |
|
604 | + ?> |
|
605 | 605 | </nav> |
606 | 606 | </div> |
607 | 607 | </div> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | // Add post/page slug |
16 | 16 | if (is_single() || is_page() && !is_front_page()) { |
17 | - $classes[] = basename(get_permalink()); |
|
17 | + $classes[] = basename(get_permalink()); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | if(!class_exists('Lsx_Banners')){ |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | // Remove unnecessary classes |
39 | 39 | $home_id_class = 'page-id-' . get_option('page_on_front'); |
40 | 40 | $remove_classes = array( |
41 | - 'page-template-default', |
|
42 | - $home_id_class |
|
41 | + 'page-template-default', |
|
42 | + $home_id_class |
|
43 | 43 | ); |
44 | 44 | $classes = array_diff($classes, $remove_classes); |
45 | 45 | |
@@ -272,12 +272,12 @@ discard block |
||
272 | 272 | || (is_singular('jetpack-portfolio')) ) { ?> |
273 | 273 | |
274 | 274 | <?php |
275 | - $bg_image = ''; |
|
276 | - if(has_post_thumbnail()){ |
|
277 | - $bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full'); |
|
278 | - $bg_image = $bg_image[0]; |
|
279 | - } |
|
280 | - ?> |
|
275 | + $bg_image = ''; |
|
276 | + if(has_post_thumbnail()){ |
|
277 | + $bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full'); |
|
278 | + $bg_image = $bg_image[0]; |
|
279 | + } |
|
280 | + ?> |
|
281 | 281 | |
282 | 282 | <?php if ( ! empty( $bg_image ) ) : ?> |
283 | 283 | |
@@ -310,8 +310,8 @@ discard block |
||
310 | 310 | * @category mobile |
311 | 311 | */ |
312 | 312 | function lsx_allow_sms_protocol( $protocols ) { |
313 | - $protocols[] = 'sms'; |
|
314 | - return $protocols; |
|
313 | + $protocols[] = 'sms'; |
|
314 | + return $protocols; |
|
315 | 315 | } |
316 | 316 | add_filter( 'kses_allowed_protocols', 'lsx_allow_sms_protocol' ); |
317 | 317 | |
@@ -323,27 +323,27 @@ discard block |
||
323 | 323 | $http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); |
324 | 324 | $http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : ''; |
325 | 325 | |
326 | - global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; |
|
327 | - if($is_lynx) $classes[] = 'lynx'; |
|
328 | - elseif($is_gecko) $classes[] = 'gecko'; |
|
329 | - elseif($is_opera) $classes[] = 'opera'; |
|
330 | - elseif($is_NS4) $classes[] = 'ns4'; |
|
331 | - elseif($is_safari) $classes[] = 'safari'; |
|
332 | - elseif($is_chrome) $classes[] = 'chrome'; |
|
333 | - elseif($is_IE) { |
|
334 | - $classes[] = 'ie'; |
|
335 | - if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) |
|
336 | - $classes[] = 'ie'.$browser_version[1]; |
|
337 | - } else $classes[] = 'unknown'; |
|
338 | - if($is_iphone) $classes[] = 'iphone'; |
|
339 | - if ( stristr( $http_user_agent, "mac") ) { |
|
340 | - $classes[] = 'osx'; |
|
341 | - } elseif ( stristr( $http_user_agent, "linux") ) { |
|
342 | - $classes[] = 'linux'; |
|
343 | - } elseif ( stristr( $http_user_agent, "windows") ) { |
|
344 | - $classes[] = 'windows'; |
|
345 | - } |
|
346 | - return $classes; |
|
326 | + global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; |
|
327 | + if($is_lynx) $classes[] = 'lynx'; |
|
328 | + elseif($is_gecko) $classes[] = 'gecko'; |
|
329 | + elseif($is_opera) $classes[] = 'opera'; |
|
330 | + elseif($is_NS4) $classes[] = 'ns4'; |
|
331 | + elseif($is_safari) $classes[] = 'safari'; |
|
332 | + elseif($is_chrome) $classes[] = 'chrome'; |
|
333 | + elseif($is_IE) { |
|
334 | + $classes[] = 'ie'; |
|
335 | + if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) |
|
336 | + $classes[] = 'ie'.$browser_version[1]; |
|
337 | + } else $classes[] = 'unknown'; |
|
338 | + if($is_iphone) $classes[] = 'iphone'; |
|
339 | + if ( stristr( $http_user_agent, "mac") ) { |
|
340 | + $classes[] = 'osx'; |
|
341 | + } elseif ( stristr( $http_user_agent, "linux") ) { |
|
342 | + $classes[] = 'linux'; |
|
343 | + } elseif ( stristr( $http_user_agent, "windows") ) { |
|
344 | + $classes[] = 'windows'; |
|
345 | + } |
|
346 | + return $classes; |
|
347 | 347 | } |
348 | 348 | add_filter('body_class','mv_browser_body_class'); |
349 | 349 |