@@ -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 } ?> |
@@ -12,20 +12,20 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | <?php |
| 14 | 14 | $format = get_post_format(); |
| 15 | - if ( false === $format ) { |
|
| 15 | + if (false === $format) { |
|
| 16 | 16 | $format = 'standard'; |
| 17 | 17 | } |
| 18 | 18 | $format_link = get_post_format_link($format); |
| 19 | 19 | $format = lsx_translate_format_to_fontawesome($format); |
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | - <?php if ( ! is_single() ) { ?> |
|
| 22 | + <?php if ( ! is_single()) { ?> |
|
| 23 | 23 | <header class="entry-header"> |
| 24 | 24 | <h1 class="entry-title"> |
| 25 | - <?php if ( has_post_thumbnail() ) { ?> |
|
| 26 | - <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 25 | + <?php if (has_post_thumbnail()) { ?> |
|
| 26 | + <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 27 | 27 | <?php } else { ?> |
| 28 | - <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 28 | + <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 29 | 29 | <?php } ?> |
| 30 | 30 | |
| 31 | 31 | <span><?php the_title(); ?></span> |
@@ -39,37 +39,37 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | <div class="entry-content"> |
| 41 | 41 | <?php |
| 42 | - if ( ! is_singular() ) { |
|
| 42 | + if ( ! is_singular()) { |
|
| 43 | 43 | the_excerpt(); |
| 44 | 44 | } else { |
| 45 | 45 | the_content(); |
| 46 | 46 | |
| 47 | - wp_link_pages( array( |
|
| 47 | + wp_link_pages(array( |
|
| 48 | 48 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 49 | 49 | 'after' => '</div></div>', |
| 50 | 50 | 'link_before' => '<span>', |
| 51 | 51 | 'link_after' => '</span>' |
| 52 | - ) ); |
|
| 52 | + )); |
|
| 53 | 53 | } ?> |
| 54 | 54 | </div><!-- .entry-content --> |
| 55 | 55 | |
| 56 | 56 | <footer class="footer-meta"> |
| 57 | - <?php if ( has_tag() || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
| 57 | + <?php if (has_tag() || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
| 58 | 58 | <div class="post-tags-wrapper"> |
| 59 | - <?php if ( has_tag() ) : ?> |
|
| 59 | + <?php if (has_tag()) : ?> |
|
| 60 | 60 | <div class="post-tags"> |
| 61 | - <span><?php esc_html_e('Tagged as:','lsx'); ?></span> <?php echo wp_kses_post( get_the_tag_list('') ); ?> |
|
| 61 | + <span><?php esc_html_e('Tagged as:', 'lsx'); ?></span> <?php echo wp_kses_post(get_the_tag_list('')); ?> |
|
| 62 | 62 | </div> |
| 63 | 63 | <?php endif ?> |
| 64 | 64 | |
| 65 | 65 | <?php |
| 66 | - if ( function_exists( 'sharing_display' ) ) { |
|
| 67 | - sharing_display( '', true ); |
|
| 66 | + if (function_exists('sharing_display')) { |
|
| 67 | + sharing_display('', true); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 70 | + if (class_exists('Jetpack_Likes')) { |
|
| 71 | 71 | $custom_likes = new Jetpack_Likes; |
| 72 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
| 72 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
| 73 | 73 | } |
| 74 | 74 | ?> |
| 75 | 75 | </div> |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | <?php |
| 79 | 79 | // If comments are open or we have at least one comment, load up the comment template |
| 80 | - if ( comments_open() || '0' != get_comments_number() ) : ?> |
|
| 81 | - <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html( get_comments_number() ) ?></strong> <?php esc_html_e('Comments','lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
|
| 80 | + if (comments_open() || '0' != get_comments_number()) : ?> |
|
| 81 | + <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html(get_comments_number()) ?></strong> <?php esc_html_e('Comments', 'lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
|
| 82 | 82 | |
| 83 | 83 | <div class="collapse" id="comments-collapse"> |
| 84 | 84 | <?php |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | <?php endif; ?> |
| 89 | 89 | </footer><!-- .footer-meta --> |
| 90 | 90 | |
| 91 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
| 91 | + <?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
| 92 | 92 | |
| 93 | 93 | <?php lsx_portfolio_related_posts(); ?> |
| 94 | 94 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | <?php lsx_entry_before(); ?> |
| 8 | 8 | |
| 9 | 9 | <?php |
| 10 | - if ( has_post_thumbnail() ) { |
|
| 10 | + if (has_post_thumbnail()) { |
|
| 11 | 11 | $thumb_class = 'has-thumb'; |
| 12 | 12 | } else { |
| 13 | 13 | $thumb_class = 'no-thumb'; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | <?php lsx_entry_top(); ?> |
| 19 | 19 | |
| 20 | 20 | <header class="entry-header"> |
| 21 | - <?php if ( has_post_thumbnail() ) { ?> |
|
| 21 | + <?php if (has_post_thumbnail()) { ?> |
|
| 22 | 22 | <div class="entry-image"> |
| 23 | 23 | <a class="thumbnail" href="<?php the_permalink(); ?>"> |
| 24 | 24 | <?php lsx_thumbnail('lsx-single-thumbnail'); ?> |
@@ -28,35 +28,35 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | <?php |
| 30 | 30 | $format = get_post_format(); |
| 31 | - if ( false === $format ) { |
|
| 31 | + if (false === $format) { |
|
| 32 | 32 | $format = 'standard'; |
| 33 | - $show_on_front = get_option('show_on_front','posts'); |
|
| 34 | - if('page' == $show_on_front){ |
|
| 33 | + $show_on_front = get_option('show_on_front', 'posts'); |
|
| 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); |
| 43 | 43 | ?> |
| 44 | 44 | |
| 45 | 45 | <h1 class="entry-title"> |
| 46 | - <?php if ( has_post_thumbnail() ) { ?> |
|
| 47 | - <a href="<?php echo esc_url($archive_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 46 | + <?php if (has_post_thumbnail()) { ?> |
|
| 47 | + <a href="<?php echo esc_url($archive_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 48 | 48 | <?php } else { ?> |
| 49 | - <a href="<?php echo esc_url($archive_link) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 49 | + <a href="<?php echo esc_url($archive_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 50 | 50 | <?php } ?> |
| 51 | 51 | |
| 52 | - <?php if ( has_post_format( array('link') ) ) { ?> |
|
| 53 | - <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 52 | + <?php if (has_post_format(array('link'))) { ?> |
|
| 53 | + <a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 54 | 54 | <?php } else { ?> |
| 55 | 55 | <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
| 56 | 56 | <?php } ?> |
| 57 | 57 | |
| 58 | - <?php if ( is_sticky() ) { ?> |
|
| 59 | - <span class="label label-default label-sticky"><?php esc_html_e('Featured','lsx'); ?></span> |
|
| 58 | + <?php if (is_sticky()) { ?> |
|
| 59 | + <span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
| 60 | 60 | <?php } ?> |
| 61 | 61 | </h1> |
| 62 | 62 | |
@@ -65,41 +65,41 @@ discard block |
||
| 65 | 65 | </div><!-- .entry-meta --> |
| 66 | 66 | </header><!-- .entry-header --> |
| 67 | 67 | |
| 68 | - <?php if ( !is_singular() && !has_post_format( array('video', 'audio', 'quote', 'link') ) ) : // Only display Excerpts for Search and Archives ?> |
|
| 68 | + <?php if ( ! is_singular() && ! has_post_format(array('video', 'audio', 'quote', 'link'))) : // Only display Excerpts for Search and Archives ?> |
|
| 69 | 69 | <div class="entry-summary"> |
| 70 | 70 | <?php the_excerpt(); ?> |
| 71 | 71 | </div><!-- .entry-summary --> |
| 72 | - <?php elseif ( has_post_format( array('link') ) ) : ?> |
|
| 72 | + <?php elseif (has_post_format(array('link'))) : ?> |
|
| 73 | 73 | |
| 74 | 74 | <?php else : ?> |
| 75 | 75 | <div class="entry-content"> |
| 76 | 76 | <?php |
| 77 | 77 | the_content(); |
| 78 | 78 | |
| 79 | - wp_link_pages( array( |
|
| 79 | + wp_link_pages(array( |
|
| 80 | 80 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 81 | 81 | 'after' => '</div></div>', |
| 82 | 82 | 'link_before' => '<span>', |
| 83 | 83 | 'link_after' => '</span>' |
| 84 | - ) ); |
|
| 84 | + )); |
|
| 85 | 85 | ?> |
| 86 | 86 | </div><!-- .entry-content --> |
| 87 | 87 | <?php endif; ?> |
| 88 | 88 | |
| 89 | - <?php if ( has_tag() || ( comments_open() && ! empty( get_comments_number() ) ) ) : ?> |
|
| 89 | + <?php if (has_tag() || (comments_open() && ! empty(get_comments_number()))) : ?> |
|
| 90 | 90 | <div class="post-tags-wrapper"> |
| 91 | - <?php if ( has_tag() ) : ?> |
|
| 91 | + <?php if (has_tag()) : ?> |
|
| 92 | 92 | <div class="post-tags"> |
| 93 | - <span><?php esc_html_e('Tagged as:','lsx'); ?></span> <?php echo wp_kses_post( get_the_tag_list('') ); ?> |
|
| 93 | + <span><?php esc_html_e('Tagged as:', 'lsx'); ?></span> <?php echo wp_kses_post(get_the_tag_list('')); ?> |
|
| 94 | 94 | </div> |
| 95 | 95 | <?php endif ?> |
| 96 | 96 | |
| 97 | - <?php if ( comments_open() && ! empty( get_comments_number() ) ) : ?> |
|
| 97 | + <?php if (comments_open() && ! empty(get_comments_number())) : ?> |
|
| 98 | 98 | <div class="post-comments"> |
| 99 | 99 | <a href="<?php the_permalink() ?>#comments"> |
| 100 | 100 | <?php |
| 101 | 101 | $count = get_comments_number(); |
| 102 | - printf( esc_html( _n( 'One Comment', '%1$s Comments', $count, 'lsx' ) ), esc_html( number_format_i18n( $count ) ) ); |
|
| 102 | + printf(esc_html(_n('One Comment', '%1$s Comments', $count, 'lsx')), esc_html(number_format_i18n($count))); |
|
| 103 | 103 | ?> |
| 104 | 104 | </a> |
| 105 | 105 | </div> |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | <div class="clearfix"></div> |
| 114 | 114 | |
| 115 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 115 | + <?php edit_post_link(__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?> |
|
| 116 | 116 | |
| 117 | - <?php if ( !is_singular() && !is_single() ) { // Display full-width divider on Archives ?> |
|
| 117 | + <?php if ( ! is_singular() && ! is_single()) { // Display full-width divider on Archives ?> |
|
| 118 | 118 | <div class="lsx-breaker"></div> |
| 119 | 119 | <?php } ?> |
| 120 | 120 | </article><!-- #post-## --> |
@@ -12,20 +12,20 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | <?php |
| 14 | 14 | $format = get_post_format(); |
| 15 | - if ( false === $format ) { |
|
| 15 | + if (false === $format) { |
|
| 16 | 16 | $format = 'standard'; |
| 17 | 17 | } |
| 18 | 18 | $format_link = get_post_format_link($format); |
| 19 | 19 | $format = lsx_translate_format_to_fontawesome($format); |
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | - <?php if ( ! is_single() ) { ?> |
|
| 22 | + <?php if ( ! is_single()) { ?> |
|
| 23 | 23 | <header class="entry-header"> |
| 24 | 24 | <h1 class="entry-title"> |
| 25 | - <?php if ( has_post_thumbnail() ) { ?> |
|
| 26 | - <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 25 | + <?php if (has_post_thumbnail()) { ?> |
|
| 26 | + <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 27 | 27 | <?php } else { ?> |
| 28 | - <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 28 | + <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 29 | 29 | <?php } ?> |
| 30 | 30 | |
| 31 | 31 | <span><?php the_title(); ?></span> |
@@ -39,37 +39,37 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | <div class="entry-content"> |
| 41 | 41 | <?php |
| 42 | - if ( ! is_singular() ) { |
|
| 42 | + if ( ! is_singular()) { |
|
| 43 | 43 | the_excerpt(); |
| 44 | 44 | } else { |
| 45 | 45 | the_content(); |
| 46 | 46 | |
| 47 | - wp_link_pages( array( |
|
| 47 | + wp_link_pages(array( |
|
| 48 | 48 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 49 | 49 | 'after' => '</div></div>', |
| 50 | 50 | 'link_before' => '<span>', |
| 51 | 51 | 'link_after' => '</span>' |
| 52 | - ) ); |
|
| 52 | + )); |
|
| 53 | 53 | } ?> |
| 54 | 54 | </div><!-- .entry-content --> |
| 55 | 55 | |
| 56 | 56 | <footer class="footer-meta"> |
| 57 | - <?php if ( has_tag() || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
| 57 | + <?php if (has_tag() || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
| 58 | 58 | <div class="post-tags-wrapper"> |
| 59 | - <?php if ( has_tag() ) : ?> |
|
| 59 | + <?php if (has_tag()) : ?> |
|
| 60 | 60 | <div class="post-tags"> |
| 61 | - <span><?php esc_html_e('Tagged as:','lsx'); ?></span> <?php echo wp_kses_post( get_the_tag_list('') ); ?> |
|
| 61 | + <span><?php esc_html_e('Tagged as:', 'lsx'); ?></span> <?php echo wp_kses_post(get_the_tag_list('')); ?> |
|
| 62 | 62 | </div> |
| 63 | 63 | <?php endif ?> |
| 64 | 64 | |
| 65 | 65 | <?php |
| 66 | - if ( function_exists( 'sharing_display' ) ) { |
|
| 67 | - sharing_display( '', true ); |
|
| 66 | + if (function_exists('sharing_display')) { |
|
| 67 | + sharing_display('', true); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 70 | + if (class_exists('Jetpack_Likes')) { |
|
| 71 | 71 | $custom_likes = new Jetpack_Likes; |
| 72 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
| 72 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
| 73 | 73 | } |
| 74 | 74 | ?> |
| 75 | 75 | </div> |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | <?php |
| 79 | 79 | // If comments are open or we have at least one comment, load up the comment template |
| 80 | - if ( comments_open() || '0' != get_comments_number() ) : ?> |
|
| 81 | - <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html( get_comments_number() ) ?></strong> <?php esc_html_e('Comments','lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
|
| 80 | + if (comments_open() || '0' != get_comments_number()) : ?> |
|
| 81 | + <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html(get_comments_number()) ?></strong> <?php esc_html_e('Comments', 'lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
|
| 82 | 82 | |
| 83 | 83 | <div class="collapse" id="comments-collapse"> |
| 84 | 84 | <?php |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | <?php endif; ?> |
| 89 | 89 | </footer><!-- .footer-meta --> |
| 90 | 90 | |
| 91 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
| 91 | + <?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
| 92 | 92 | |
| 93 | 93 | <?php lsx_portfolio_related_posts(); ?> |
| 94 | 94 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | -if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly |
|
| 7 | +if ( ! defined('ABSPATH')) return; // Exit if accessed directly |
|
| 8 | 8 | |
| 9 | 9 | define('LSX_VERSION', '1.7.3'); |
| 10 | 10 | |
@@ -21,22 +21,22 @@ discard block |
||
| 21 | 21 | require get_template_directory() . '/inc/comment-walker.php'; |
| 22 | 22 | require get_template_directory() . '/inc/jetpack.php'; |
| 23 | 23 | require get_template_directory() . '/inc/lazyload.php'; |
| 24 | -if(class_exists('BuddyPress')){ |
|
| 24 | +if (class_exists('BuddyPress')) { |
|
| 25 | 25 | require get_template_directory() . '/inc/buddypress.php'; |
| 26 | 26 | } |
| 27 | -if(class_exists('WooCommerce')){ |
|
| 27 | +if (class_exists('WooCommerce')) { |
|
| 28 | 28 | require get_template_directory() . '/inc/woocommerce.php'; |
| 29 | 29 | } |
| 30 | -if(class_exists('WP_Job_Manager')){ |
|
| 30 | +if (class_exists('WP_Job_Manager')) { |
|
| 31 | 31 | require get_template_directory() . '/inc/wp-job-manager.php'; |
| 32 | 32 | } |
| 33 | -if(class_exists('Tribe__Events__Main')){ |
|
| 33 | +if (class_exists('Tribe__Events__Main')) { |
|
| 34 | 34 | require get_template_directory() . '/inc/the-events-calendar.php'; |
| 35 | 35 | } |
| 36 | 36 | require get_template_directory() . '/inc/template-tags.php'; |
| 37 | 37 | require get_template_directory() . '/inc/extras.php'; |
| 38 | 38 | require get_template_directory() . '/inc/wp_bootstrap_navwalker.php'; |
| 39 | -if(class_exists('Sensei_WC')){ |
|
| 39 | +if (class_exists('Sensei_WC')) { |
|
| 40 | 40 | require get_template_directory() . '/inc/sensei.php'; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | * @category customizer |
| 49 | 49 | * @return $lsx_controls array() |
| 50 | 50 | */ |
| 51 | -function lsx_customizer_core_controls( $lsx_controls ) { |
|
| 51 | +function lsx_customizer_core_controls($lsx_controls) { |
|
| 52 | 52 | $lsx_controls['sections']['lsx-core'] = array( |
| 53 | - 'title' => esc_html__( 'Core Settings', 'lsx' ), |
|
| 54 | - 'description' => __( 'Change the core settings.', 'lsx' ), |
|
| 53 | + 'title' => esc_html__('Core Settings', 'lsx'), |
|
| 54 | + 'description' => __('Change the core settings.', 'lsx'), |
|
| 55 | 55 | 'priority' => 21 |
| 56 | 56 | ); |
| 57 | 57 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | 64 | $lsx_controls['fields']['lsx_lazyload_status'] = array( |
| 65 | - 'label' => __( 'Lazy Loading Images', 'lsx' ), |
|
| 65 | + 'label' => __('Lazy Loading Images', 'lsx'), |
|
| 66 | 66 | 'section' => 'lsx-core', |
| 67 | 67 | 'type' => 'checkbox', |
| 68 | 68 | ); |
@@ -74,14 +74,14 @@ discard block |
||
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | 76 | $lsx_controls['fields']['lsx_preloader_content_status'] = array( |
| 77 | - 'label' => __( 'Preloader Content', 'lsx' ), |
|
| 77 | + 'label' => __('Preloader Content', 'lsx'), |
|
| 78 | 78 | 'section' => 'lsx-core', |
| 79 | 79 | 'type' => 'checkbox', |
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | return $lsx_controls; |
| 83 | 83 | } |
| 84 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_core_controls' ); |
|
| 84 | +add_filter('lsx_customizer_controls', 'lsx_customizer_core_controls'); |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Returns an array of the colour scheme picker. |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @category customizer |
| 92 | 92 | * @return $lsx_controls array() |
| 93 | 93 | */ |
| 94 | -function lsx_customizer_colour_scheme_controls( $lsx_controls ) { |
|
| 94 | +function lsx_customizer_colour_scheme_controls($lsx_controls) { |
|
| 95 | 95 | global $customizer_colour_names; |
| 96 | 96 | global $customizer_colour_choices; |
| 97 | 97 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ); |
| 103 | 103 | |
| 104 | 104 | $lsx_controls['fields']['color_scheme'] = array( |
| 105 | - 'label' => esc_html__( 'Base Color Scheme', 'lsx' ), |
|
| 105 | + 'label' => esc_html__('Base Color Scheme', 'lsx'), |
|
| 106 | 106 | 'section' => 'colors', |
| 107 | 107 | 'type' => 'select', |
| 108 | 108 | 'priority' => 1, |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | $counter = 0; |
| 114 | 114 | |
| 115 | - foreach ( $customizer_colour_names as $key => $value ) { |
|
| 115 | + foreach ($customizer_colour_names as $key => $value) { |
|
| 116 | 116 | $lsx_controls['settings'][$key] = array( |
| 117 | 117 | 'default' => $customizer_colour_choices['default']['colors'][$counter], |
| 118 | 118 | 'type' => 'theme_mod', |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | return $lsx_controls; |
| 133 | 133 | } |
| 134 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_colour_scheme_controls' ); |
|
| 134 | +add_filter('lsx_customizer_controls', 'lsx_customizer_colour_scheme_controls'); |
|
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | 137 | * Returns an array of the layout panel. |
@@ -142,56 +142,56 @@ discard block |
||
| 142 | 142 | * @return $lsx_controls array() |
| 143 | 143 | */ |
| 144 | 144 | function lsx_customizer_layout_controls($lsx_controls) { |
| 145 | - $lsx_controls['settings']['lsx_header_layout'] = array( |
|
| 145 | + $lsx_controls['settings']['lsx_header_layout'] = array( |
|
| 146 | 146 | 'default' => 'inline', //Default setting/value to save |
| 147 | 147 | 'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'? |
| 148 | 148 | 'transport' => 'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? |
| 149 | 149 | ); |
| 150 | 150 | $lsx_controls['fields']['lsx_header_layout'] = array( |
| 151 | - 'label' => __('Header','lsx'), |
|
| 151 | + 'label' => __('Header', 'lsx'), |
|
| 152 | 152 | 'section' => 'lsx-layout', |
| 153 | 153 | 'control' => 'LSX_Customize_Header_Layout_Control', |
| 154 | - 'choices' => array('central','expanded','inline') |
|
| 154 | + 'choices' => array('central', 'expanded', 'inline') |
|
| 155 | 155 | ); |
| 156 | 156 | $lsx_controls['sections']['lsx-layout'] = array( |
| 157 | - 'title' => esc_html__( 'Layout', 'lsx' ), |
|
| 158 | - 'description' => __( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ), |
|
| 157 | + 'title' => esc_html__('Layout', 'lsx'), |
|
| 158 | + 'description' => __('Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx'), |
|
| 159 | 159 | 'priority' => 22 |
| 160 | 160 | ); |
| 161 | - $lsx_controls['settings']['lsx_layout'] = array( |
|
| 161 | + $lsx_controls['settings']['lsx_layout'] = array( |
|
| 162 | 162 | 'default' => '2cr', //Default setting/value to save |
| 163 | 163 | 'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'? |
| 164 | 164 | 'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? |
| 165 | 165 | ); |
| 166 | - $lsx_controls['settings']['lsx_header_fixed'] = array( |
|
| 166 | + $lsx_controls['settings']['lsx_header_fixed'] = array( |
|
| 167 | 167 | 'default' => false, //Default setting/value to save |
| 168 | 168 | 'sanitize_callback' => 'lsx_sanitize_checkbox', |
| 169 | 169 | 'transport' => 'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? |
| 170 | 170 | ); |
| 171 | 171 | $lsx_controls['fields']['lsx_header_fixed'] = array( |
| 172 | - 'label' => __('Fixed Header','lsx'), |
|
| 172 | + 'label' => __('Fixed Header', 'lsx'), |
|
| 173 | 173 | 'section' => 'lsx-layout', |
| 174 | 174 | 'type' => 'checkbox', |
| 175 | 175 | ); |
| 176 | - $lsx_controls['settings']['lsx_header_search'] = array( |
|
| 176 | + $lsx_controls['settings']['lsx_header_search'] = array( |
|
| 177 | 177 | 'default' => false, //Default setting/value to save |
| 178 | 178 | 'sanitize_callback' => 'lsx_sanitize_checkbox', |
| 179 | 179 | 'transport' => 'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? |
| 180 | 180 | ); |
| 181 | 181 | $lsx_controls['fields']['lsx_header_search'] = array( |
| 182 | - 'label' => __('Search Box in Header','lsx'), |
|
| 182 | + 'label' => __('Search Box in Header', 'lsx'), |
|
| 183 | 183 | 'section' => 'lsx-layout', |
| 184 | 184 | 'type' => 'checkbox', |
| 185 | 185 | ); |
| 186 | 186 | $lsx_controls['fields']['lsx_layout'] = array( |
| 187 | - 'label' => __('Body','lsx'), |
|
| 187 | + 'label' => __('Body', 'lsx'), |
|
| 188 | 188 | 'section' => 'lsx-layout', |
| 189 | 189 | 'control' => 'LSX_Customize_Layout_Control', |
| 190 | - 'choices' => array('1c','2cr','2cl') |
|
| 190 | + 'choices' => array('1c', '2cr', '2cl') |
|
| 191 | 191 | ); |
| 192 | 192 | return $lsx_controls; |
| 193 | 193 | } |
| 194 | -add_filter('lsx_customizer_controls','lsx_customizer_layout_controls'); |
|
| 194 | +add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls'); |
|
| 195 | 195 | |
| 196 | 196 | /** |
| 197 | 197 | * Returns an array of the font controls. |
@@ -203,11 +203,11 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | function lsx_customizer_font_controls($lsx_controls) { |
| 205 | 205 | $lsx_controls['sections']['lsx-font'] = array( |
| 206 | - 'title' => __( 'Font', 'lsx' ), |
|
| 206 | + 'title' => __('Font', 'lsx'), |
|
| 207 | 207 | 'description' => 'Change the fonts sitewide.', |
| 208 | 208 | 'priority' => 41 |
| 209 | 209 | ); |
| 210 | - $lsx_controls['settings']['lsx_font'] = array( |
|
| 210 | + $lsx_controls['settings']['lsx_font'] = array( |
|
| 211 | 211 | 'default' => 'raleway_open_sans', //Default setting/value to save |
| 212 | 212 | 'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'? |
| 213 | 213 | 'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? |
@@ -221,13 +221,13 @@ discard block |
||
| 221 | 221 | 'choices' => array( |
| 222 | 222 | 'raleway_open_sans' => array( |
| 223 | 223 | 'header' => array( |
| 224 | - "title" => __( 'Raleway', 'lsx' ), |
|
| 224 | + "title" => __('Raleway', 'lsx'), |
|
| 225 | 225 | "location" => "Raleway", |
| 226 | 226 | "cssDeclaration" => "'Raleway', sans-serif", |
| 227 | 227 | "cssClass" => "raleway", |
| 228 | 228 | ), |
| 229 | 229 | 'body' => array( |
| 230 | - "title" => __( 'Open Sans', 'lsx' ), |
|
| 230 | + "title" => __('Open Sans', 'lsx'), |
|
| 231 | 231 | "location" => "Open+Sans", |
| 232 | 232 | "cssDeclaration" => "'Open Sans', sans-serif", |
| 233 | 233 | "cssClass" => "openSans" |
@@ -235,13 +235,13 @@ discard block |
||
| 235 | 235 | ), |
| 236 | 236 | 'noto_serif_noto_sans' => array( |
| 237 | 237 | 'header' => array( |
| 238 | - "title" => __( 'Noto Serif', 'lsx' ), |
|
| 238 | + "title" => __('Noto Serif', 'lsx'), |
|
| 239 | 239 | "location" => "Noto+Serif", |
| 240 | 240 | "cssDeclaration" => "'Noto Serif', serif", |
| 241 | 241 | "cssClass" => "notoSerif", |
| 242 | 242 | ), |
| 243 | 243 | 'body' => array( |
| 244 | - "title" => __( 'Noto Sans', 'lsx' ), |
|
| 244 | + "title" => __('Noto Sans', 'lsx'), |
|
| 245 | 245 | "location" => "Noto+Sans", |
| 246 | 246 | "cssDeclaration" => "'Noto Sans', sans-serif", |
| 247 | 247 | "cssClass" => "notoSans", |
@@ -249,13 +249,13 @@ discard block |
||
| 249 | 249 | ), |
| 250 | 250 | 'noto_sans_noto_sans' => array( |
| 251 | 251 | 'header' => array( |
| 252 | - "title" => __( 'Noto Sans', 'lsx' ), |
|
| 252 | + "title" => __('Noto Sans', 'lsx'), |
|
| 253 | 253 | "location" => "Noto+Sans", |
| 254 | 254 | "cssDeclaration" => "'Noto Sans', sans-serif", |
| 255 | 255 | "cssClass" => "notoSans", |
| 256 | 256 | ), |
| 257 | 257 | 'body' => array( |
| 258 | - "title" => __( 'Noto Sans', 'lsx' ), |
|
| 258 | + "title" => __('Noto Sans', 'lsx'), |
|
| 259 | 259 | "location" => "Noto+Sans", |
| 260 | 260 | "cssDeclaration" => "'Noto Sans', sans-serif", |
| 261 | 261 | "cssClass" => "notoSans", |
@@ -263,13 +263,13 @@ discard block |
||
| 263 | 263 | ), |
| 264 | 264 | 'alegreya_open_sans' => array( |
| 265 | 265 | 'header' => array( |
| 266 | - "title" => __( 'Alegreya', 'lsx' ), |
|
| 266 | + "title" => __('Alegreya', 'lsx'), |
|
| 267 | 267 | "location" => "Alegreya", |
| 268 | 268 | "cssDeclaration" => "'Alegreya', serif", |
| 269 | 269 | "cssClass" => "alegreya", |
| 270 | 270 | ), |
| 271 | 271 | 'body' => array( |
| 272 | - "title" => __( 'Open Sans', 'lsx' ), |
|
| 272 | + "title" => __('Open Sans', 'lsx'), |
|
| 273 | 273 | "location" => "Open+Sans", |
| 274 | 274 | "cssDeclaration" => "'Open Sans', sans-serif", |
| 275 | 275 | "cssClass" => "openSans" |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | ); |
| 281 | 281 | return $lsx_controls; |
| 282 | 282 | } |
| 283 | -add_filter('lsx_customizer_controls','lsx_customizer_font_controls'); |
|
| 283 | +add_filter('lsx_customizer_controls', 'lsx_customizer_font_controls'); |
|
| 284 | 284 | |
| 285 | 285 | /** |
| 286 | 286 | * Returns an array of $controls for the customizer class to generate. |
@@ -290,12 +290,12 @@ discard block |
||
| 290 | 290 | * @category customizer |
| 291 | 291 | * @return $lsx_controls array() |
| 292 | 292 | */ |
| 293 | -function lsx_get_customizer_controls(){ |
|
| 293 | +function lsx_get_customizer_controls() { |
|
| 294 | 294 | $lsx_controls = array(); |
| 295 | 295 | $lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls); |
| 296 | 296 | return $lsx_controls; |
| 297 | 297 | } |
| 298 | -$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() ); |
|
| 298 | +$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls()); |
|
| 299 | 299 | |
| 300 | -add_image_size( 'lsx-thumbnail-wide', 350, 230, true ); |
|
| 301 | -add_image_size( 'lsx-thumbnail-single', 750, 350, true ); |
|
| 302 | 300 | \ No newline at end of file |
| 301 | +add_image_size('lsx-thumbnail-wide', 350, 230, true); |
|
| 302 | +add_image_size('lsx-thumbnail-single', 750, 350, true); |
|
| 303 | 303 | \ No newline at end of file |
@@ -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,22 +32,22 @@ discard block |
||
| 32 | 32 | <div class="entry-meta"> |
| 33 | 33 | <?php |
| 34 | 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() ), |
|
| 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 | 38 | wp_get_attachment_url(), |
| 39 | 39 | $metadata['width'], |
| 40 | 40 | $metadata['height'], |
| 41 | - get_permalink( $post->post_parent ), |
|
| 42 | - get_the_title( $post->post_parent ) |
|
| 41 | + get_permalink($post->post_parent), |
|
| 42 | + get_the_title($post->post_parent) |
|
| 43 | 43 | ); |
| 44 | 44 | ?> |
| 45 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
|
| 45 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="sep"> | </span> <span class="edit-link">', '</span>'); ?> |
|
| 46 | 46 | </div><!-- .entry-meta --> |
| 47 | 47 | |
| 48 | 48 | <nav id="image-navigation" class="site-navigation"> |
| 49 | - <span class="previous-image"><?php previous_image_link( false, '← '.esc_html__( 'Previous', 'lsx' ) ); ?></span> |
|
| 50 | - <span class="next-image"><?php next_image_link( false, esc_html__( 'Next', 'lsx' ).' →' ); ?></span> |
|
| 49 | + <span class="previous-image"><?php previous_image_link(false, '← ' . esc_html__('Previous', 'lsx')); ?></span> |
|
| 50 | + <span class="next-image"><?php next_image_link(false, esc_html__('Next', 'lsx') . ' →'); ?></span> |
|
| 51 | 51 | </nav><!-- #image-navigation --> |
| 52 | 52 | </header><!-- .entry-header --> |
| 53 | 53 | |
@@ -60,33 +60,33 @@ discard block |
||
| 60 | 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 | 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 | 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 ) |
|
| 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 | 66 | break; |
| 67 | 67 | } |
| 68 | 68 | $k++; |
| 69 | 69 | // If there is more than 1 attachment in a gallery |
| 70 | - if ( count( $attachments ) > 1 ) { |
|
| 71 | - if ( isset( $attachments[ $k ] ) ) |
|
| 70 | + if (count($attachments) > 1) { |
|
| 71 | + if (isset($attachments[$k])) |
|
| 72 | 72 | // get the URL of the next image attachment |
| 73 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
| 73 | + $next_attachment_url = get_attachment_link($attachments[$k]->ID); |
|
| 74 | 74 | else |
| 75 | 75 | // or get the URL of the first image attachment |
| 76 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
| 76 | + $next_attachment_url = get_attachment_link($attachments[0]->ID); |
|
| 77 | 77 | } else { |
| 78 | 78 | // or, if there's only 1 image, get the URL of the image |
| 79 | 79 | $next_attachment_url = wp_get_attachment_url(); |
| 80 | 80 | } |
| 81 | 81 | ?> |
| 82 | 82 | |
| 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 ); |
|
| 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 | 86 | ?></a> |
| 87 | 87 | </div><!-- .attachment --> |
| 88 | 88 | |
| 89 | - <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
|
| 89 | + <?php if ( ! empty($post->post_excerpt)) : ?> |
|
| 90 | 90 | <div class="entry-caption"> |
| 91 | 91 | <?php the_excerpt(); ?> |
| 92 | 92 | </div><!-- .entry-caption --> |
@@ -96,27 +96,27 @@ discard block |
||
| 96 | 96 | <?php |
| 97 | 97 | the_content(); |
| 98 | 98 | |
| 99 | - wp_link_pages( array( |
|
| 99 | + wp_link_pages(array( |
|
| 100 | 100 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 101 | 101 | 'after' => '</div></div>', |
| 102 | 102 | 'link_before' => '<span>', |
| 103 | 103 | 'link_after' => '</span>' |
| 104 | - ) ); |
|
| 104 | + )); |
|
| 105 | 105 | ?> |
| 106 | 106 | |
| 107 | 107 | </div><!-- .entry-content --> |
| 108 | 108 | |
| 109 | 109 | <footer class="entry-meta"> |
| 110 | 110 | |
| 111 | - <?php if ( ! is_single() ) : ?> |
|
| 111 | + <?php if ( ! is_single()) : ?> |
|
| 112 | 112 | <a class="read-more" href="<?php the_permalink(); ?>">Read More</a> |
| 113 | 113 | <?php endif ?> |
| 114 | 114 | |
| 115 | - <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> |
|
| 116 | - <span class="comments-link"><?php comments_popup_link( esc_html__( 'Leave a comment', 'lsx' ), esc_html__( '1 Comment', 'lsx' ), esc_html__( '% Comments', 'lsx' ) ); ?></span> |
|
| 115 | + <?php if ( ! post_password_required() && (comments_open() || '0' != get_comments_number())) : ?> |
|
| 116 | + <span class="comments-link"><?php comments_popup_link(esc_html__('Leave a comment', 'lsx'), esc_html__('1 Comment', 'lsx'), esc_html__('% Comments', 'lsx')); ?></span> |
|
| 117 | 117 | <?php endif; ?> |
| 118 | 118 | |
| 119 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 119 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?> |
|
| 120 | 120 | </footer><!-- .entry-meta --> |
| 121 | 121 | |
| 122 | 122 | <?php lsx_entry_bottom(); ?> |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | <?php |
| 127 | 127 | // If comments are open or we have at least one comment, load up the comment template |
| 128 | - if ( comments_open() || '0' != get_comments_number() ) : |
|
| 128 | + if (comments_open() || '0' != get_comments_number()) : |
|
| 129 | 129 | comments_template(); |
| 130 | 130 | endif; |
| 131 | 131 | ?> |