@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | |
9 | 9 | $type_class = "filter-item column-3 "; |
10 | -$types = get_the_terms( get_the_ID(), 'jetpack-portfolio-type'); |
|
10 | +$types = get_the_terms(get_the_ID(), 'jetpack-portfolio-type'); |
|
11 | 11 | if ($types) { |
12 | 12 | foreach ($types as $type) { |
13 | 13 | $type_class .= $type->slug . " "; |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | <article id="post-<?php the_ID(); ?>" data-column="<?php echo 3; ?>" <?php post_class($type_class); ?>> |
19 | 19 | <div class="portfolio-content-wrapper"> |
20 | 20 | <div class="portfolio-thumbnail"> |
21 | - <?php if ( has_post_thumbnail() ) : ?> |
|
21 | + <?php if (has_post_thumbnail()) : ?> |
|
22 | 22 | <a href="<?php the_permalink(); ?>"> |
23 | - <?php lsx_thumbnail( 'lsx-thumbnail-wide' ); ?> |
|
23 | + <?php lsx_thumbnail('lsx-thumbnail-wide'); ?> |
|
24 | 24 | </a> |
25 | 25 | <?php endif; ?> |
26 | 26 | </div> |
27 | 27 | |
28 | - <?php the_title( '<a class="portfolio-title" href="' . esc_url( get_permalink() ) . '" rel="bookmark"><span>', '</span></a>' ); ?> |
|
28 | + <?php the_title('<a class="portfolio-title" href="' . esc_url(get_permalink()) . '" rel="bookmark"><span>', '</span></a>'); ?> |
|
29 | 29 | </div> |
30 | 30 | </article> |
31 | 31 | \ No newline at end of file |
@@ -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 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @package lsx |
8 | 8 | */ |
9 | 9 | ?> |
10 | -<?php if ( !is_singular('landing-page') ) { ?> |
|
10 | +<?php if ( ! is_singular('landing-page')) { ?> |
|
11 | 11 | |
12 | 12 | </div><!-- .content --> |
13 | 13 | </div><!-- wrap --> |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | <div class="footer-menu"> |
22 | 22 | <?php |
23 | 23 | |
24 | - if(!is_user_logged_in()){ |
|
25 | - if(has_nav_menu('footer-menu')){ |
|
24 | + if ( ! is_user_logged_in()) { |
|
25 | + if (has_nav_menu('footer-menu')) { |
|
26 | 26 | wp_nav_menu(array('theme_location' => 'footer-menu')); |
27 | 27 | } |
28 | - }else{ |
|
29 | - if(has_nav_menu('footer_logged_in')){ |
|
28 | + } else { |
|
29 | + if (has_nav_menu('footer_logged_in')) { |
|
30 | 30 | wp_nav_menu(array('theme_location' => 'footer_logged_in')); |
31 | 31 | } |
32 | 32 | } |
@@ -41,26 +41,26 @@ discard block |
||
41 | 41 | |
42 | 42 | <?php lsx_footer_top(); ?> |
43 | 43 | |
44 | - <p class="credit <?php if ( has_nav_menu( 'social' ) || has_nav_menu( 'footer' ) ) { ?>credit-float<?php } ?>"><?php printf( esc_html__( '© %1$s %2$s All Rights Reserved.', 'lsx' ), esc_html( date_i18n( 'Y' ) ), esc_html( get_bloginfo( 'name' ) ) ); ?></p> |
|
45 | - <?php if ( has_nav_menu( 'social' ) ) { ?> |
|
44 | + <p class="credit <?php if (has_nav_menu('social') || has_nav_menu('footer')) { ?>credit-float<?php } ?>"><?php printf(esc_html__('© %1$s %2$s All Rights Reserved.', 'lsx'), esc_html(date_i18n('Y')), esc_html(get_bloginfo('name'))); ?></p> |
|
45 | + <?php if (has_nav_menu('social')) { ?> |
|
46 | 46 | <nav id="social-navigation" class="social-navigation"> |
47 | 47 | <?php |
48 | 48 | // Social links navigation menu. |
49 | - wp_nav_menu( array( |
|
49 | + wp_nav_menu(array( |
|
50 | 50 | 'theme_location' => 'social', |
51 | 51 | 'depth' => 1, |
52 | - ) ); |
|
52 | + )); |
|
53 | 53 | ?> |
54 | 54 | </nav><!-- .social-navigation --> |
55 | 55 | <?php } ?> |
56 | - <?php if ( has_nav_menu( 'footer' ) ) { ?> |
|
56 | + <?php if (has_nav_menu('footer')) { ?> |
|
57 | 57 | <nav id="footer-navigation" class="footer-navigation"> |
58 | 58 | <?php |
59 | 59 | // Footer links navigation menu. |
60 | - wp_nav_menu( array( |
|
60 | + wp_nav_menu(array( |
|
61 | 61 | 'theme_location' => 'footer', |
62 | 62 | 'depth' => 1, |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | ?> |
65 | 65 | </nav><!-- .footer-navigation --> |
66 | 66 | <?php } ?> |
@@ -87,15 +87,15 @@ discard block |
||
87 | 87 | |
88 | 88 | <?php lsx_footer_top(); ?> |
89 | 89 | |
90 | - <p class="credit <?php if ( has_nav_menu( 'social' ) ) { ?>credit-float<?php } ?>"><?php printf( esc_html__( '© %1$s %2$s All Rights Reserved.', 'lsx' ), esc_html( date_i18n( 'Y' ) ), esc_html( get_bloginfo( 'name' ) ) ); ?></p> |
|
91 | - <?php if ( has_nav_menu( 'social' ) ) { ?> |
|
90 | + <p class="credit <?php if (has_nav_menu('social')) { ?>credit-float<?php } ?>"><?php printf(esc_html__('© %1$s %2$s All Rights Reserved.', 'lsx'), esc_html(date_i18n('Y')), esc_html(get_bloginfo('name'))); ?></p> |
|
91 | + <?php if (has_nav_menu('social')) { ?> |
|
92 | 92 | <nav id="social-navigation" class="social-navigation" role="navigation"> |
93 | 93 | <?php |
94 | 94 | // Social links navigation menu. |
95 | - wp_nav_menu( array( |
|
95 | + wp_nav_menu(array( |
|
96 | 96 | 'theme_location' => 'social', |
97 | 97 | 'depth' => 1, |
98 | - ) ); |
|
98 | + )); |
|
99 | 99 | ?> |
100 | 100 | </nav><!-- .social-navigation --> |
101 | 101 | <?php } ?> |
@@ -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 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | <?php lsx_content_wrap_before(); ?> |
12 | 12 | |
13 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
13 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
14 | 14 | |
15 | 15 | <?php lsx_content_before(); ?> |
16 | 16 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | <?php lsx_content_top(); ?> |
20 | 20 | |
21 | - <?php while ( have_posts() ) : the_post(); ?> |
|
21 | + <?php while (have_posts()) : the_post(); ?> |
|
22 | 22 | |
23 | 23 | <?php lsx_entry_before(); ?> |
24 | 24 | |
@@ -32,25 +32,25 @@ discard block |
||
32 | 32 | <div class="entry-meta"> |
33 | 33 | <?php |
34 | 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 ) |
|
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 | 46 | ); |
47 | 47 | ?> |
48 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
|
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 | |
51 | 51 | <nav id="image-navigation" class="site-navigation"> |
52 | - <span class="previous-image"><?php previous_image_link( false, '← '.esc_html__( 'Previous', 'lsx' ) ); ?></span> |
|
53 | - <span class="next-image"><?php next_image_link( false, esc_html__( 'Next', 'lsx' ).' →' ); ?></span> |
|
52 | + <span class="previous-image"><?php previous_image_link(false, '← ' . esc_html__('Previous', 'lsx')); ?></span> |
|
53 | + <span class="next-image"><?php next_image_link(false, esc_html__('Next', 'lsx') . ' →'); ?></span> |
|
54 | 54 | </nav><!-- #image-navigation --> |
55 | 55 | </header><!-- .entry-header --> |
56 | 56 | |
@@ -63,33 +63,33 @@ discard block |
||
63 | 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 | 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 | 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 ) |
|
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 | 69 | break; |
70 | 70 | } |
71 | 71 | $k++; |
72 | 72 | // If there is more than 1 attachment in a gallery |
73 | - if ( count( $attachments ) > 1 ) { |
|
74 | - if ( isset( $attachments[ $k ] ) ) |
|
73 | + if (count($attachments) > 1) { |
|
74 | + if (isset($attachments[$k])) |
|
75 | 75 | // get the URL of the next image attachment |
76 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
76 | + $next_attachment_url = get_attachment_link($attachments[$k]->ID); |
|
77 | 77 | else |
78 | 78 | // or get the URL of the first image attachment |
79 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
79 | + $next_attachment_url = get_attachment_link($attachments[0]->ID); |
|
80 | 80 | } else { |
81 | 81 | // or, if there's only 1 image, get the URL of the image |
82 | 82 | $next_attachment_url = wp_get_attachment_url(); |
83 | 83 | } |
84 | 84 | ?> |
85 | 85 | |
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 ); |
|
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 | 89 | ?></a> |
90 | 90 | </div><!-- .attachment --> |
91 | 91 | |
92 | - <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
|
92 | + <?php if ( ! empty($post->post_excerpt)) : ?> |
|
93 | 93 | <div class="entry-caption"> |
94 | 94 | <?php the_excerpt(); ?> |
95 | 95 | </div><!-- .entry-caption --> |
@@ -99,27 +99,27 @@ discard block |
||
99 | 99 | <?php |
100 | 100 | the_content(); |
101 | 101 | |
102 | - wp_link_pages( array( |
|
102 | + wp_link_pages(array( |
|
103 | 103 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
104 | 104 | 'after' => '</div></div>', |
105 | 105 | 'link_before' => '<span>', |
106 | 106 | 'link_after' => '</span>' |
107 | - ) ); |
|
107 | + )); |
|
108 | 108 | ?> |
109 | 109 | |
110 | 110 | </div><!-- .entry-content --> |
111 | 111 | |
112 | 112 | <footer class="entry-meta"> |
113 | 113 | |
114 | - <?php if ( ! is_single() ) : ?> |
|
115 | - <a class="read-more" href="<?php the_permalink(); ?>"><?php esc_html_e( 'Read More', 'lsx' ); ?></a> |
|
114 | + <?php if ( ! is_single()) : ?> |
|
115 | + <a class="read-more" href="<?php the_permalink(); ?>"><?php esc_html_e('Read More', 'lsx'); ?></a> |
|
116 | 116 | <?php endif ?> |
117 | 117 | |
118 | - <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> |
|
119 | - <span class="comments-link"><?php comments_popup_link( esc_html__( 'Leave a comment', 'lsx' ), esc_html__( '1 Comment', 'lsx' ), esc_html__( '% Comments', 'lsx' ) ); ?></span> |
|
118 | + <?php if ( ! post_password_required() && (comments_open() || '0' != get_comments_number())) : ?> |
|
119 | + <span class="comments-link"><?php comments_popup_link(esc_html__('Leave a comment', 'lsx'), esc_html__('1 Comment', 'lsx'), esc_html__('% Comments', 'lsx')); ?></span> |
|
120 | 120 | <?php endif; ?> |
121 | 121 | |
122 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?> |
|
122 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?> |
|
123 | 123 | </footer><!-- .entry-meta --> |
124 | 124 | |
125 | 125 | <?php lsx_entry_bottom(); ?> |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | <?php |
130 | 130 | // If comments are open or we have at least one comment, load up the comment template |
131 | - if ( comments_open() || '0' != get_comments_number() ) : |
|
131 | + if (comments_open() || '0' != get_comments_number()) : |
|
132 | 132 | comments_template(); |
133 | 133 | endif; |
134 | 134 | ?> |
@@ -1,5 +1,8 @@ |
||
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 | /** |
5 | 8 | * Theme Configuration File |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Theme Configuration File |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @package lsx |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! function_exists( 'lsx_setup' ) ) : |
|
11 | +if ( ! function_exists('lsx_setup')) : |
|
12 | 12 | /** |
13 | 13 | * Sets up theme defaults and registers support for various WordPress features. |
14 | 14 | * |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | function lsx_setup() { |
20 | 20 | global $content_width; |
21 | 21 | |
22 | - load_theme_textdomain( 'lsx', get_template_directory() . '/languages' ); |
|
22 | + load_theme_textdomain('lsx', get_template_directory() . '/languages'); |
|
23 | 23 | |
24 | 24 | $args = array( |
25 | 25 | 'header-text' => array( |
@@ -28,68 +28,68 @@ discard block |
||
28 | 28 | ), |
29 | 29 | 'size' => 'medium', |
30 | 30 | ); |
31 | - add_theme_support( 'site-logo', $args ); |
|
31 | + add_theme_support('site-logo', $args); |
|
32 | 32 | |
33 | - add_theme_support( 'custom-logo', array( |
|
33 | + add_theme_support('custom-logo', array( |
|
34 | 34 | 'height' => 50, |
35 | 35 | 'width' => 150, |
36 | 36 | 'flex-width' => true, |
37 | 37 | 'flex-height' => true, |
38 | - ) ); |
|
38 | + )); |
|
39 | 39 | |
40 | - add_theme_support( 'custom-background' ); |
|
41 | - add_theme_support( 'automatic-feed-links' ); |
|
42 | - add_theme_support( 'title-tag' ); |
|
43 | - add_theme_support( 'post-thumbnails' ); |
|
44 | - add_theme_support( 'post-formats', array('image', 'video', 'gallery', 'audio', 'link', 'quote', 'aside') ); |
|
40 | + add_theme_support('custom-background'); |
|
41 | + add_theme_support('automatic-feed-links'); |
|
42 | + add_theme_support('title-tag'); |
|
43 | + add_theme_support('post-thumbnails'); |
|
44 | + add_theme_support('post-formats', array('image', 'video', 'gallery', 'audio', 'link', 'quote', 'aside')); |
|
45 | 45 | |
46 | 46 | // This theme uses wp_nav_menu() in one location. |
47 | - register_nav_menus( array( |
|
48 | - 'primary' => esc_html__( 'Primary Menu', 'lsx' ), |
|
49 | - 'top-menu'=> esc_html__( 'Top Menu (right)' , 'lsx' ), |
|
50 | - 'top-menu-left'=> esc_html__( 'Top Menu (left)' , 'lsx' ), |
|
51 | - 'social'=> esc_html__( 'Social Menu' , 'lsx' ), |
|
52 | - 'footer'=> esc_html__( 'Footer Menu' , 'lsx' ) |
|
53 | - ) ); |
|
47 | + register_nav_menus(array( |
|
48 | + 'primary' => esc_html__('Primary Menu', 'lsx'), |
|
49 | + 'top-menu'=> esc_html__('Top Menu (right)', 'lsx'), |
|
50 | + 'top-menu-left'=> esc_html__('Top Menu (left)', 'lsx'), |
|
51 | + 'social'=> esc_html__('Social Menu', 'lsx'), |
|
52 | + 'footer'=> esc_html__('Footer Menu', 'lsx') |
|
53 | + )); |
|
54 | 54 | |
55 | 55 | //Set the content width |
56 | 56 | $content_width = 1140; |
57 | 57 | |
58 | - add_editor_style( get_template_directory_uri() . '/css/editor-style.css' ); |
|
59 | - add_theme_support( 'html5', array( 'caption' ) ); |
|
58 | + add_editor_style(get_template_directory_uri() . '/css/editor-style.css'); |
|
59 | + add_theme_support('html5', array('caption')); |
|
60 | 60 | |
61 | - add_theme_support( 'woocommerce' ); |
|
62 | - add_theme_support( 'sensei' ); |
|
61 | + add_theme_support('woocommerce'); |
|
62 | + add_theme_support('sensei'); |
|
63 | 63 | |
64 | - add_theme_support( 'starter-content', array( |
|
64 | + add_theme_support('starter-content', array( |
|
65 | 65 | 'widgets' => array( |
66 | 66 | 'sidebar-home' => array( |
67 | 67 | 'custom_widget_1' => array( |
68 | 68 | 'text', |
69 | 69 | array( |
70 | 70 | 'title' => '', |
71 | - 'text' => wp_kses_post( '<div class="lsx-full-width"><div class="row"><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p></div></div></div>' ), |
|
71 | + 'text' => wp_kses_post('<div class="lsx-full-width"><div class="row"><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p></div></div></div>'), |
|
72 | 72 | ) |
73 | 73 | ), |
74 | 74 | 'custom_widget_2' => array( |
75 | 75 | 'text', |
76 | 76 | array( |
77 | 77 | 'title' => '', |
78 | - 'text' => wp_kses_post( '<div class="row"><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p></div><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque <a href="#">volutpat mattis eros</a>.</p></div></div>' ), |
|
78 | + 'text' => wp_kses_post('<div class="row"><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p></div><div class="col-sm-6"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque <a href="#">volutpat mattis eros</a>.</p></div></div>'), |
|
79 | 79 | ) |
80 | 80 | ), |
81 | 81 | 'custom_widget_3' => array( |
82 | 82 | 'text', |
83 | 83 | array( |
84 | 84 | 'title' => '', |
85 | - 'text' => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn">Lorem ipsum</a></p></div></div></div>' ), |
|
85 | + 'text' => wp_kses_post('<div class="lsx-full-width-alt"><div class="row"><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn cta-btn">Lorem ipsum</a></p></div><div class="col-sm-6"><h3>Full Width CTA Widget</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.</p><p><a href="#" class="btn">Lorem ipsum</a></p></div></div></div>'), |
|
86 | 86 | ) |
87 | 87 | ), |
88 | 88 | 'custom_widget_4' => array( |
89 | 89 | 'text', |
90 | 90 | array( |
91 | 91 | 'title' => '', |
92 | - 'text' => wp_kses_post( '<div class="row"><div class="col-sm-12"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ), |
|
92 | + 'text' => wp_kses_post('<div class="row"><div class="col-sm-12"><h3 style="margin-top:0">Text Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>'), |
|
93 | 93 | ) |
94 | 94 | ), |
95 | 95 | ), |
@@ -98,22 +98,22 @@ discard block |
||
98 | 98 | 'custom_widget_1' => array( |
99 | 99 | 'text', |
100 | 100 | array( |
101 | - 'title' => esc_html__( 'Footer Widget', 'lsx' ), |
|
102 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx' ), |
|
101 | + 'title' => esc_html__('Footer Widget', 'lsx'), |
|
102 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx'), |
|
103 | 103 | ) |
104 | 104 | ), |
105 | 105 | 'custom_widget_2' => array( |
106 | 106 | 'text', |
107 | 107 | array( |
108 | - 'title' => esc_html__( 'Footer Widget', 'lsx' ), |
|
109 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx' ), |
|
108 | + 'title' => esc_html__('Footer Widget', 'lsx'), |
|
109 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx'), |
|
110 | 110 | ) |
111 | 111 | ), |
112 | 112 | 'custom_widget_3' => array( |
113 | 113 | 'text', |
114 | 114 | array( |
115 | - 'title' => esc_html__( 'Footer Widget', 'lsx' ), |
|
116 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx' ), |
|
115 | + 'title' => esc_html__('Footer Widget', 'lsx'), |
|
116 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ipsum nec sapien consectetur convallis eu sit amet diam. Praesent dignissim vel arcu et gravida.', 'lsx'), |
|
117 | 117 | ) |
118 | 118 | ), |
119 | 119 | ), |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | 'custom_widget_1' => array( |
123 | 123 | 'text', |
124 | 124 | array( |
125 | - 'title' => esc_html__( 'Footer Call to Action Widget', 'lsx' ), |
|
126 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ), |
|
125 | + 'title' => esc_html__('Footer Call to Action Widget', 'lsx'), |
|
126 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx'), |
|
127 | 127 | ) |
128 | 128 | ), |
129 | 129 | ), |
@@ -149,15 +149,15 @@ discard block |
||
149 | 149 | |
150 | 150 | 'attachments' => array( |
151 | 151 | 'image-banner-placeholder-01' => array( |
152 | - 'post_title' => esc_html_x( 'Banner Placeholder 01', 'Theme starter content', 'lsx' ), |
|
152 | + 'post_title' => esc_html_x('Banner Placeholder 01', 'Theme starter content', 'lsx'), |
|
153 | 153 | 'file' => 'img/banner-placeholder-01.jpg', |
154 | 154 | ), |
155 | 155 | 'image-banner-placeholder-02' => array( |
156 | - 'post_title' => esc_html_x( 'Banner Placeholder 02', 'Theme starter content', 'lsx' ), |
|
156 | + 'post_title' => esc_html_x('Banner Placeholder 02', 'Theme starter content', 'lsx'), |
|
157 | 157 | 'file' => 'img/banner-placeholder-02.jpg', |
158 | 158 | ), |
159 | 159 | 'image-banner-placeholder-03' => array( |
160 | - 'post_title' => esc_html_x( 'Banner Placeholder 03', 'Theme starter content', 'lsx' ), |
|
160 | + 'post_title' => esc_html_x('Banner Placeholder 03', 'Theme starter content', 'lsx'), |
|
161 | 161 | 'file' => 'img/banner-placeholder-03.jpg', |
162 | 162 | ), |
163 | 163 | ), |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | 'nav_menus' => array( |
172 | 172 | 'primary' => array( |
173 | - 'name' => esc_html__( 'Primary Menu', 'lsx' ), |
|
173 | + 'name' => esc_html__('Primary Menu', 'lsx'), |
|
174 | 174 | 'items' => array( |
175 | 175 | 'page_home', |
176 | 176 | 'page_about', |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | ), |
180 | 180 | ), |
181 | 181 | 'top-menu' => array( |
182 | - 'name' => esc_html__( 'Top Menu', 'lsx' ), |
|
182 | + 'name' => esc_html__('Top Menu', 'lsx'), |
|
183 | 183 | 'items' => array( |
184 | 184 | 'custom_link_1' => array( |
185 | 185 | 'title' => 'View Map', |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | ), |
203 | 203 | ), |
204 | 204 | 'social' => array( |
205 | - 'name' => esc_html__( 'Social Menu', 'lsx' ), |
|
205 | + 'name' => esc_html__('Social Menu', 'lsx'), |
|
206 | 206 | 'items' => array( |
207 | 207 | 'link_facebook', |
208 | 208 | 'link_foursquare', |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ), |
216 | 216 | ), |
217 | 217 | 'footer' => array( |
218 | - 'name' => esc_html__( 'Footer Menu', 'lsx' ), |
|
218 | + 'name' => esc_html__('Footer Menu', 'lsx'), |
|
219 | 219 | 'items' => array( |
220 | 220 | 'page_about', |
221 | 221 | 'page_contact', |
@@ -228,21 +228,21 @@ discard block |
||
228 | 228 | 'lsx_header_search' => '1', |
229 | 229 | 'lsx_layout' => '1c', |
230 | 230 | ), |
231 | - ) ); |
|
231 | + )); |
|
232 | 232 | } |
233 | 233 | endif; // lsx_setup |
234 | -add_action( 'after_setup_theme', 'lsx_setup' ); |
|
234 | +add_action('after_setup_theme', 'lsx_setup'); |
|
235 | 235 | |
236 | 236 | /** |
237 | 237 | * Removes the "Custom Fields" meta box. |
238 | 238 | */ |
239 | 239 | function lsx_remove_meta_boxes() { |
240 | 240 | $post_types = get_post_types(); |
241 | - foreach($post_types as $post_type){ |
|
242 | - remove_meta_box( 'postcustom' , $post_type , 'normal' ); |
|
241 | + foreach ($post_types as $post_type) { |
|
242 | + remove_meta_box('postcustom', $post_type, 'normal'); |
|
243 | 243 | } |
244 | 244 | } |
245 | -add_action( 'admin_menu' , 'lsx_remove_meta_boxes' ); |
|
245 | +add_action('admin_menu', 'lsx_remove_meta_boxes'); |
|
246 | 246 | |
247 | 247 | /** |
248 | 248 | * Overwrite the $content_width var, based on the layout of the page. |
@@ -254,33 +254,33 @@ discard block |
||
254 | 254 | function lsx_process_content_width() { |
255 | 255 | global $content_width; |
256 | 256 | |
257 | - if( |
|
257 | + if ( |
|
258 | 258 | is_page_template('page-templates/template-portfolio.php') || |
259 | 259 | is_page_template('page-templates/template-front-page.php') || |
260 | 260 | is_page_template('page-templates/template-full-width.php') || |
261 | 261 | is_post_type_archive('jetpack-portfolio') || |
262 | - is_tax(array('jetpack-portfolio-type','jetpack-portfolio-tag')) || |
|
262 | + is_tax(array('jetpack-portfolio-type', 'jetpack-portfolio-tag')) || |
|
263 | 263 | is_singular('jetpack-portfolio') |
264 | - ){ |
|
264 | + ) { |
|
265 | 265 | $content_width = 1140; |
266 | 266 | } |
267 | 267 | } |
268 | -add_action('wp_head','lsx_process_content_width'); |
|
268 | +add_action('wp_head', 'lsx_process_content_width'); |
|
269 | 269 | |
270 | 270 | /** |
271 | 271 | * Disable the comments form by default for the page post type. |
272 | 272 | * @package lsx |
273 | 273 | * @subpackage config |
274 | 274 | */ |
275 | -function lsx_page_comments_off( $data ) { |
|
276 | - if ( 'page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__( 'Auto Draft', 'lsx' ) == $data['post_title'] ) { |
|
275 | +function lsx_page_comments_off($data) { |
|
276 | + if ('page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__('Auto Draft', 'lsx') == $data['post_title']) { |
|
277 | 277 | $data['comment_status'] = 0; |
278 | 278 | $data['ping_status'] = 0; |
279 | 279 | } |
280 | 280 | |
281 | 281 | return $data; |
282 | 282 | } |
283 | -add_filter( 'wp_insert_post_data', 'lsx_page_comments_off' ); |
|
283 | +add_filter('wp_insert_post_data', 'lsx_page_comments_off'); |
|
284 | 284 | |
285 | 285 | /** |
286 | 286 | * Disable the comments form by default for the page post type. |
@@ -288,14 +288,14 @@ discard block |
||
288 | 288 | * @subpackage config |
289 | 289 | */ |
290 | 290 | function lsx_is_legacy($data) { |
291 | - if ( 'page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__( 'Auto Draft', 'lsx' ) == $data['post_title'] ) { |
|
291 | + if ('page' == $data['post_type'] && 'auto-draft' == $data['post_status'] && esc_html__('Auto Draft', 'lsx') == $data['post_title']) { |
|
292 | 292 | $data['comment_status'] = 0; |
293 | 293 | $data['ping_status'] = 0; |
294 | 294 | } |
295 | 295 | |
296 | 296 | return $data; |
297 | 297 | } |
298 | -add_filter( 'wp_insert_post_data', 'lsx_page_comments_off' ); |
|
298 | +add_filter('wp_insert_post_data', 'lsx_page_comments_off'); |
|
299 | 299 | |
300 | 300 | /** |
301 | 301 | * Run the init command |
@@ -303,11 +303,11 @@ discard block |
||
303 | 303 | * @subpackage config |
304 | 304 | */ |
305 | 305 | function lsx_init() { |
306 | - if(class_exists('WooCommerce')){ |
|
307 | - remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); |
|
306 | + if (class_exists('WooCommerce')) { |
|
307 | + remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0); |
|
308 | 308 | } |
309 | 309 | } |
310 | -add_action( 'init', 'lsx_init',100 ); |
|
310 | +add_action('init', 'lsx_init', 100); |
|
311 | 311 | |
312 | 312 | /** |
313 | 313 | * Run on the wp_head |
@@ -316,11 +316,11 @@ discard block |
||
316 | 316 | */ |
317 | 317 | function lsx_wp_head() { |
318 | 318 | |
319 | - $layout = get_theme_mod('lsx_layout','2cr'); |
|
320 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
319 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
320 | + $layout = apply_filters('lsx_layout', $layout); |
|
321 | 321 | |
322 | - if('1c' === $layout && (is_author() || is_search() || (is_post_type_archive(array('post','page','jetpack-portfolio')) && !is_post_type_archive('tribe_events')) || is_tag() || is_category() || is_date() || is_tax('post_format')) ){ |
|
323 | - remove_action('lsx_content_top', 'lsx_breadcrumbs', 100 ); |
|
322 | + if ('1c' === $layout && (is_author() || is_search() || (is_post_type_archive(array('post', 'page', 'jetpack-portfolio')) && ! is_post_type_archive('tribe_events')) || is_tag() || is_category() || is_date() || is_tax('post_format'))) { |
|
323 | + remove_action('lsx_content_top', 'lsx_breadcrumbs', 100); |
|
324 | 324 | } |
325 | 325 | } |
326 | -add_action( 'wp_head', 'lsx_wp_head',100 ); |
|
326 | +add_action('wp_head', 'lsx_wp_head', 100); |
@@ -1,5 +1,8 @@ |
||
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 | /** |
5 | 8 | * LSX_Customize_Font_Control Class |
@@ -1,42 +1,42 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * LSX_Customize_Font_Control Class |
6 | 6 | **/ |
7 | -if( !class_exists( 'WP_Customize_Control' ) ){ |
|
7 | +if ( ! class_exists('WP_Customize_Control')) { |
|
8 | 8 | return; |
9 | 9 | } |
10 | -class LSX_Customize_Font_Control extends WP_Customize_Control{ |
|
10 | +class LSX_Customize_Font_Control extends WP_Customize_Control { |
|
11 | 11 | public $fonts; |
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Enqueue the styles and scripts |
15 | 15 | **/ |
16 | - public function enqueue(){ |
|
16 | + public function enqueue() { |
|
17 | 17 | // styles |
18 | - wp_enqueue_style( 'lsx-font-picker-custom-control', get_template_directory_uri() .'/css/customizer-font.css', array(), LSX_VERSION ); |
|
18 | + wp_enqueue_style('lsx-font-picker-custom-control', get_template_directory_uri() . '/css/customizer-font.css', array(), LSX_VERSION); |
|
19 | 19 | |
20 | 20 | // scripts |
21 | - wp_enqueue_script( 'lsx-font-picker-custom-control', get_template_directory_uri() .'/js/customizer-font.js', array(), LSX_VERSION ); |
|
21 | + wp_enqueue_script('lsx-font-picker-custom-control', get_template_directory_uri() . '/js/customizer-font.js', array(), LSX_VERSION); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Render the content on the theme customizer page |
26 | 26 | **/ |
27 | - public function render_content(){ |
|
28 | - if ( empty( $this->choices ) ){ |
|
27 | + public function render_content() { |
|
28 | + if (empty($this->choices)) { |
|
29 | 29 | // if there are no choices then don't print anything |
30 | 30 | return; |
31 | 31 | } |
32 | 32 | $fonts = array(); |
33 | - foreach( $this->choices as $slug=>$font ){ |
|
33 | + foreach ($this->choices as $slug=>$font) { |
|
34 | 34 | $fonts[] = $font['header']; |
35 | 35 | $fonts[] = $font['body']; |
36 | 36 | $this->choices[$slug] = $font; |
37 | 37 | } |
38 | 38 | |
39 | - $this->fonts = new LSX_Google_Font_Collection( $fonts ); |
|
39 | + $this->fonts = new LSX_Google_Font_Collection($fonts); |
|
40 | 40 | |
41 | 41 | $fonts = $this->fonts->get_font_family_name_array(); |
42 | 42 | //print links to css files |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | <div class="fontPickerCustomControl"> |
52 | 52 | <select <?php $this->link(); ?>> |
53 | 53 | <?php |
54 | - foreach ( $this->choices as $value => $conf ){ |
|
55 | - echo '<option value="' . esc_attr( $value ) . '">' . esc_html( $value ) . '</option>'; |
|
54 | + foreach ($this->choices as $value => $conf) { |
|
55 | + echo '<option value="' . esc_attr($value) . '">' . esc_html($value) . '</option>'; |
|
56 | 56 | } |
57 | 57 | ?> |
58 | 58 | </select> |
@@ -60,16 +60,16 @@ discard block |
||
60 | 60 | <ul> |
61 | 61 | <?php |
62 | 62 | //$cssClassArray = $this->fonts->get_css_class_array(); |
63 | - foreach ($this->choices as $key => $font){ |
|
63 | + foreach ($this->choices as $key => $font) { |
|
64 | 64 | $class = null; |
65 | - if( $key == $set_value ){ |
|
65 | + if ($key == $set_value) { |
|
66 | 66 | $class = ' selected'; |
67 | 67 | } |
68 | 68 | |
69 | 69 | ?> |
70 | - <li class="font-choice <?php echo esc_attr( $class ); ?>"> |
|
71 | - <div class="<?php echo esc_attr( $font['header']['cssClass'] ); ?>"><?php echo esc_html( $font['header']['title'] ); ?></div> |
|
72 | - <small class="<?php echo esc_attr( $font['body']['cssClass'] ); ?>"><?php echo esc_html( $font['body']['title'] ); ?></small> |
|
70 | + <li class="font-choice <?php echo esc_attr($class); ?>"> |
|
71 | + <div class="<?php echo esc_attr($font['header']['cssClass']); ?>"><?php echo esc_html($font['header']['title']); ?></div> |
|
72 | + <small class="<?php echo esc_attr($font['body']['cssClass']); ?>"><?php echo esc_html($font['body']['title']); ?></small> |
|
73 | 73 | </li> |
74 | 74 | <?php |
75 | 75 | } |
@@ -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', array(), LSX_VERSION ); |
@@ -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 |
@@ -1,5 +1,8 @@ |
||
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 | /** |
5 | 8 | * Customize Swatch Control Class |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Customize Swatch Control Class |
6 | 6 | * |
7 | 7 | * @since 1.0.0 |
8 | 8 | */ |
9 | -if( !class_exists( 'WP_Customize_Control' ) ){ |
|
9 | +if ( ! class_exists('WP_Customize_Control')) { |
|
10 | 10 | return; |
11 | 11 | } |
12 | 12 | class LSX_Customize_Core_Control extends WP_Customize_Control { |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | public function render_content() { |
23 | 23 | ?> |
24 | 24 | <label> |
25 | - <?php if ( ! empty( $this->label ) ) { ?> |
|
26 | - <span class="customize-control-title"><?php echo esc_html( $this->label ) ?></span> |
|
25 | + <?php if ( ! empty($this->label)) { ?> |
|
26 | + <span class="customize-control-title"><?php echo esc_html($this->label) ?></span> |
|
27 | 27 | <?php } |
28 | - if ( ! empty( $this->description ) ) { ?> |
|
29 | - <span class="description customize-control-description"><?php echo esc_html( $this->description ) ?></span> |
|
28 | + if ( ! empty($this->description)) { ?> |
|
29 | + <span class="description customize-control-description"><?php echo esc_html($this->description) ?></span> |
|
30 | 30 | <?php } ?> |
31 | - <input <?php $this->link() ?> type="checkbox" value="<?php echo esc_attr( $this->value() ) ?>" <?php $this->input_attrs() ?>> |
|
31 | + <input <?php $this->link() ?> type="checkbox" value="<?php echo esc_attr($this->value()) ?>" <?php $this->input_attrs() ?>> |
|
32 | 32 | </label> |
33 | 33 | <?php |
34 | 34 | } |
@@ -19,10 +19,10 @@ |
||
19 | 19 | */ |
20 | 20 | function lsx_buddypress_page_columns($layout) { |
21 | 21 | |
22 | - if(bp_is_profile_component()|| bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component() |
|
23 | - || bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()){ |
|
22 | + if (bp_is_profile_component() || bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component() |
|
23 | + || bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()) { |
|
24 | 24 | $layout = '1c'; |
25 | 25 | } |
26 | 26 | return $layout; |
27 | 27 | } |
28 | - add_filter( 'lsx_layout', 'lsx_buddypress_page_columns' , 1 , 100 ); |
|
29 | 28 | \ No newline at end of file |
29 | + add_filter('lsx_layout', 'lsx_buddypress_page_columns', 1, 100); |
|
30 | 30 | \ No newline at end of file |
@@ -1,5 +1,8 @@ |
||
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 | /** |
5 | 8 | * Customizer Header Fixed Class |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Customizer Header Fixed Class |
6 | 6 | * |
7 | 7 | * @since 1.0.0 |
8 | 8 | */ |
9 | -if( !class_exists( 'WP_Customize_Control' ) ){ |
|
9 | +if ( ! class_exists('WP_Customize_Control')) { |
|
10 | 10 | return; |
11 | 11 | } |
12 | 12 | class LSX_Customize_Header_Fixed_Control extends WP_Customize_Control { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | * @param string $id |
39 | 39 | * @param array $args |
40 | 40 | */ |
41 | - public function __construct( $manager, $id, $args = array() ) { |
|
42 | - parent::__construct( $manager, $id, $args ); |
|
43 | - if( !empty( $args['choices'] ) ){ |
|
41 | + public function __construct($manager, $id, $args = array()) { |
|
42 | + parent::__construct($manager, $id, $args); |
|
43 | + if ( ! empty($args['choices'])) { |
|
44 | 44 | $this->layouts = $args['choices']; |
45 | 45 | } |
46 | 46 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function enqueue() { |
54 | 54 | // |
55 | - wp_enqueue_script( 'lsx-header-fixed-control', get_template_directory_uri() .'/js/customizer-header-fixed.js', array('jquery'), LSX_VERSION, true ); |
|
55 | + wp_enqueue_script('lsx-header-fixed-control', get_template_directory_uri() . '/js/customizer-header-fixed.js', array('jquery'), LSX_VERSION, true); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -62,21 +62,21 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function render_content() { |
64 | 64 | |
65 | - $post_id = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) ); |
|
65 | + $post_id = 'customize-control-' . str_replace('[', '-', str_replace(']', '', $this->id)); |
|
66 | 66 | $class = 'customize-control customize-control-' . $this->type; |
67 | 67 | $value = $this->value(); |
68 | 68 | |
69 | 69 | ?> |
70 | 70 | <label> |
71 | - <?php if ( ! empty( $this->label ) ) { ?> |
|
72 | - <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
|
71 | + <?php if ( ! empty($this->label)) { ?> |
|
72 | + <span class="customize-control-title"><?php echo esc_html($this->label); ?></span> |
|
73 | 73 | <?php } |
74 | - if ( ! empty( $this->description ) ) { ?> |
|
75 | - <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> |
|
74 | + if ( ! empty($this->description)) { ?> |
|
75 | + <span class="description customize-control-description"><?php echo esc_html($this->description); ?></span> |
|
76 | 76 | <?php } ?> |
77 | 77 | <div class="header-fixed"> |
78 | 78 | <label> |
79 | - <input <?php $this->link(); ?> type="checkbox" id="<?php echo esc_attr( $post_id ); ?>" class="header-fixed <?php echo esc_attr( $class ); ?>" value="<?php echo esc_attr($value); ?>" <?php $this->input_attrs(); ?>> Uncheck for standard header |
|
79 | + <input <?php $this->link(); ?> type="checkbox" id="<?php echo esc_attr($post_id); ?>" class="header-fixed <?php echo esc_attr($class); ?>" value="<?php echo esc_attr($value); ?>" <?php $this->input_attrs(); ?>> Uncheck for standard header |
|
80 | 80 | </label> |
81 | 81 | </div> |
82 | 82 | </label> |
@@ -1,5 +1,8 @@ |
||
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 | /** |
5 | 8 | * Cleaner walker for wp_nav_menu() |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
2 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Cleaner walker for wp_nav_menu() |
@@ -25,17 +25,17 @@ discard block |
||
25 | 25 | $item_html = ''; |
26 | 26 | |
27 | 27 | //If there is no menu set, dont use the pages, the objects are not the same as whats supposed to be used. |
28 | - if(isset($item->title)){ |
|
28 | + if (isset($item->title)) { |
|
29 | 29 | |
30 | 30 | parent::start_el($item_html, $item, $depth, $args); |
31 | 31 | |
32 | - if ( $item->is_dropdown && ( 0 === $depth ) ) { |
|
32 | + if ($item->is_dropdown && (0 === $depth)) { |
|
33 | 33 | $item_html = str_replace('<a', '<a class="dropdown-toggle" data-target="#"', $item_html); |
34 | 34 | $item_html = str_replace('</a>', ' <b class="caret"></b></a>', $item_html); |
35 | - } elseif ( stristr( $item_html, 'li class="divider"' ) ) { |
|
35 | + } elseif (stristr($item_html, 'li class="divider"')) { |
|
36 | 36 | $item_html = preg_replace('/<a[^>]*>.*?<\/a>/iU', '', $item_html); |
37 | - } elseif ( stristr( $item_html, 'li class="dropdown-header"' ) ) { |
|
38 | - $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html ); |
|
37 | + } elseif (stristr($item_html, 'li class="dropdown-header"')) { |
|
38 | + $item_html = preg_replace('/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $item_html = apply_filters('lsx_wp_nav_menu_item', $item_html); |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) { |
48 | - $element->is_dropdown = ( ( ! empty( $children_elements[$element->ID] ) && ( ( $depth + 1 ) < $max_depth || ( 0 === $max_depth ) ) ) ); |
|
48 | + $element->is_dropdown = (( ! empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth || (0 === $max_depth)))); |
|
49 | 49 | |
50 | - if ( $element->is_dropdown ) { |
|
51 | - if ( $depth > 0 ) { |
|
50 | + if ($element->is_dropdown) { |
|
51 | + if ($depth > 0) { |
|
52 | 52 | $element->classes[] = 'dropdown-submenu'; |
53 | 53 | } else { |
54 | 54 | $element->classes[] = 'dropdown'; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes); |
69 | 69 | $classes = preg_replace('/^((menu|page)[-_\w+]+)+/', '', $classes); |
70 | 70 | |
71 | - $classes[] = 'menu-'.$slug; |
|
71 | + $classes[] = 'menu-' . $slug; |
|
72 | 72 | |
73 | 73 | $classes = array_unique($classes); |
74 | 74 | |
@@ -86,15 +86,15 @@ discard block |
||
86 | 86 | function lsx_nav_menu_args($args = '') { |
87 | 87 | $roots_nav_menu_args['container'] = false; |
88 | 88 | |
89 | - if (!$args['items_wrap']) { |
|
89 | + if ( ! $args['items_wrap']) { |
|
90 | 90 | $roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>'; |
91 | 91 | } |
92 | 92 | |
93 | - if (current_theme_supports('bootstrap-top-navbar') && !$args['depth']) { |
|
93 | + if (current_theme_supports('bootstrap-top-navbar') && ! $args['depth']) { |
|
94 | 94 | $roots_nav_menu_args['depth'] = 2; |
95 | 95 | } |
96 | 96 | |
97 | - if (!$args['walker']) { |
|
97 | + if ( ! $args['walker']) { |
|
98 | 98 | $roots_nav_menu_args['walker'] = new LSX_Nav_Walker(); |
99 | 99 | } |
100 | 100 |