@@ -7,42 +7,42 @@ 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'; |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - if ( ! is_singular() ) { |
|
| 17 | - $blog_layout = apply_filters( 'lsx_blog_layout', 'default' ); |
|
| 16 | + if ( ! is_singular()) { |
|
| 17 | + $blog_layout = apply_filters('lsx_blog_layout', 'default'); |
|
| 18 | 18 | } else { |
| 19 | 19 | $blog_layout = 'default'; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - if ( 'list' === $blog_layout ) { |
|
| 22 | + if ('list' === $blog_layout) { |
|
| 23 | 23 | $image_class = 'hidden-sm hidden-md hidden-ls'; |
| 24 | 24 | } else { |
| 25 | 25 | $image_class = ''; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - $thumbnail_id = get_post_thumbnail_id( get_the_ID() ); |
|
| 29 | - $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-single-thumbnail' ); |
|
| 28 | + $thumbnail_id = get_post_thumbnail_id(get_the_ID()); |
|
| 29 | + $image_arr = wp_get_attachment_image_src($thumbnail_id, 'lsx-single-thumbnail'); |
|
| 30 | 30 | |
| 31 | - if ( is_array( $image_arr ) ) { |
|
| 31 | + if (is_array($image_arr)) { |
|
| 32 | 32 | $image_src = $image_arr[0]; |
| 33 | 33 | } |
| 34 | 34 | ?> |
| 35 | 35 | |
| 36 | -<article id="post-<?php the_ID(); ?>" <?php post_class( $thumb_class ); ?>> |
|
| 36 | +<article id="post-<?php the_ID(); ?>" <?php post_class($thumb_class); ?>> |
|
| 37 | 37 | <?php lsx_entry_top(); ?> |
| 38 | 38 | |
| 39 | 39 | <div class="entry-layout"> |
| 40 | 40 | <div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>"> |
| 41 | 41 | <header class="entry-header"> |
| 42 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 43 | - <div class="entry-image <?php echo esc_attr( $image_class ); ?>"> |
|
| 42 | + <?php if (has_post_thumbnail()) : ?> |
|
| 43 | + <div class="entry-image <?php echo esc_attr($image_class); ?>"> |
|
| 44 | 44 | <a class="thumbnail" href="<?php the_permalink(); ?>"> |
| 45 | - <?php lsx_thumbnail( 'lsx-single-thumbnail' ); ?> |
|
| 45 | + <?php lsx_thumbnail('lsx-single-thumbnail'); ?> |
|
| 46 | 46 | </a> |
| 47 | 47 | </div> |
| 48 | 48 | <?php endif; ?> |
@@ -50,37 +50,37 @@ discard block |
||
| 50 | 50 | <?php |
| 51 | 51 | $format = get_post_format(); |
| 52 | 52 | |
| 53 | - if ( false === $format ) { |
|
| 53 | + if (false === $format) { |
|
| 54 | 54 | $format = 'standard'; |
| 55 | - $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
| 55 | + $show_on_front = get_option('show_on_front', 'posts'); |
|
| 56 | 56 | |
| 57 | - if ( 'page' == $show_on_front ) { |
|
| 58 | - $archive_link = get_permalink( get_option( 'page_for_posts' ) ); |
|
| 57 | + if ('page' == $show_on_front) { |
|
| 58 | + $archive_link = get_permalink(get_option('page_for_posts')); |
|
| 59 | 59 | } else { |
| 60 | 60 | $archive_link = home_url(); |
| 61 | 61 | } |
| 62 | 62 | } else { |
| 63 | - $archive_link = get_post_format_link( $format ); |
|
| 63 | + $archive_link = get_post_format_link($format); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 66 | + $format = lsx_translate_format_to_fontawesome($format); |
|
| 67 | 67 | ?> |
| 68 | 68 | |
| 69 | 69 | <h1 class="entry-title"> |
| 70 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 71 | - <a href="<?php echo esc_url( $archive_link ) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 70 | + <?php if (has_post_thumbnail()) : ?> |
|
| 71 | + <a href="<?php echo esc_url($archive_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 72 | 72 | <?php else : ?> |
| 73 | - <a href="<?php echo esc_url( $archive_link ) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a> |
|
| 73 | + <a href="<?php echo esc_url($archive_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a> |
|
| 74 | 74 | <?php endif; ?> |
| 75 | 75 | |
| 76 | - <?php if ( has_post_format( array('link') ) ) : ?> |
|
| 77 | - <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 76 | + <?php if (has_post_format(array('link'))) : ?> |
|
| 77 | + <a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 78 | 78 | <?php else : ?> |
| 79 | 79 | <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
| 80 | 80 | <?php endif; ?> |
| 81 | 81 | |
| 82 | - <?php if ( is_sticky() ) : ?> |
|
| 83 | - <span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span> |
|
| 82 | + <?php if (is_sticky()) : ?> |
|
| 83 | + <span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
| 84 | 84 | <?php endif; ?> |
| 85 | 85 | </h1> |
| 86 | 86 | |
@@ -89,13 +89,13 @@ discard block |
||
| 89 | 89 | </div><!-- .entry-meta --> |
| 90 | 90 | </header><!-- .entry-header --> |
| 91 | 91 | |
| 92 | - <?php if ( ! is_singular() && ! has_post_format( array( 'video', 'audio', 'quote', 'link' ) ) && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : // Only display Excerpts for Search and Archives ?> |
|
| 92 | + <?php if ( ! is_singular() && ! has_post_format(array('video', 'audio', 'quote', 'link')) && ! apply_filters('lsx_blog_force_content_on_list', false)) : // Only display Excerpts for Search and Archives ?> |
|
| 93 | 93 | <div class="entry-summary"> |
| 94 | 94 | <?php the_excerpt(); ?> |
| 95 | 95 | </div><!-- .entry-summary --> |
| 96 | - <?php elseif ( has_post_format( array('link') ) ) : ?> |
|
| 96 | + <?php elseif (has_post_format(array('link'))) : ?> |
|
| 97 | 97 | |
| 98 | - <?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 98 | + <?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 99 | 99 | <div class="entry-content"> |
| 100 | 100 | <?php the_content(); ?> |
| 101 | 101 | </div><!-- .entry-content --> |
@@ -104,12 +104,12 @@ discard block |
||
| 104 | 104 | <?php |
| 105 | 105 | the_content(); |
| 106 | 106 | |
| 107 | - wp_link_pages( array( |
|
| 107 | + wp_link_pages(array( |
|
| 108 | 108 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 109 | 109 | 'after' => '</div></div>', |
| 110 | 110 | 'link_before' => '<span>', |
| 111 | 111 | 'link_after' => '</span>' |
| 112 | - ) ); |
|
| 112 | + )); |
|
| 113 | 113 | ?> |
| 114 | 114 | </div><!-- .entry-content --> |
| 115 | 115 | <?php endif; ?> |
@@ -119,19 +119,19 @@ discard block |
||
| 119 | 119 | <?php |
| 120 | 120 | $comments_number = get_comments_number(); |
| 121 | 121 | |
| 122 | - if ( has_tag() || ( comments_open() && ! empty( $comments_number ) ) ) : |
|
| 122 | + if (has_tag() || (comments_open() && ! empty($comments_number))) : |
|
| 123 | 123 | ?> |
| 124 | 124 | |
| 125 | 125 | <div class="post-tags-wrapper"> |
| 126 | 126 | <?php lsx_content_post_tags(); ?> |
| 127 | 127 | |
| 128 | - <?php if ( comments_open() && ! empty( $comments_number ) ) : ?> |
|
| 128 | + <?php if (comments_open() && ! empty($comments_number)) : ?> |
|
| 129 | 129 | <div class="post-comments"> |
| 130 | 130 | <a href="<?php the_permalink() ?>#comments"> |
| 131 | 131 | <?php |
| 132 | 132 | printf( |
| 133 | - esc_html( _n( 'One Comment', '%1$s Comments', $comments_number, 'lsx' ) ), |
|
| 134 | - esc_html( number_format_i18n( $comments_number ) ) |
|
| 133 | + esc_html(_n('One Comment', '%1$s Comments', $comments_number, 'lsx')), |
|
| 134 | + esc_html(number_format_i18n($comments_number)) |
|
| 135 | 135 | ); |
| 136 | 136 | ?> |
| 137 | 137 | </a> |
@@ -144,10 +144,10 @@ discard block |
||
| 144 | 144 | ?> |
| 145 | 145 | </div> |
| 146 | 146 | |
| 147 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 147 | + <?php if (has_post_thumbnail()) : ?> |
|
| 148 | 148 | <div class="entry-image hidden hidden-xs"> |
| 149 | - <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);"> |
|
| 150 | - <?php lsx_thumbnail( 'lsx-single-thumbnail' ); ?> |
|
| 149 | + <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);"> |
|
| 150 | + <?php lsx_thumbnail('lsx-single-thumbnail'); ?> |
|
| 151 | 151 | </a> |
| 152 | 152 | </div> |
| 153 | 153 | <?php endif; ?> |
@@ -157,9 +157,9 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | <div class="clearfix"></div> |
| 159 | 159 | |
| 160 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 160 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?> |
|
| 161 | 161 | |
| 162 | - <?php if ( ! is_singular() && ! is_single() ) : // Display full-width divider on Archives ?> |
|
| 162 | + <?php if ( ! is_singular() && ! is_single()) : // Display full-width divider on Archives ?> |
|
| 163 | 163 | <div class="lsx-breaker"></div> |
| 164 | 164 | <?php endif; ?> |
| 165 | 165 | </article> |
@@ -69,14 +69,20 @@ discard block |
||
| 69 | 69 | <h1 class="entry-title"> |
| 70 | 70 | <?php if ( has_post_thumbnail() ) : ?> |
| 71 | 71 | <a href="<?php echo esc_url( $archive_link ) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a> |
| 72 | - <?php else : ?> |
|
| 72 | + <?php else { |
|
| 73 | + : ?> |
|
| 73 | 74 | <a href="<?php echo esc_url( $archive_link ) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a> |
| 74 | - <?php endif; ?> |
|
| 75 | + <?php endif; |
|
| 76 | +} |
|
| 77 | +?> |
|
| 75 | 78 | |
| 76 | 79 | <?php if ( has_post_format( array('link') ) ) : ?> |
| 77 | 80 | <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
| 78 | - <?php else : ?> |
|
| 79 | - <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
|
| 81 | + <?php else { |
|
| 82 | + : ?> |
|
| 83 | + <a href="<?php the_permalink(); |
|
| 84 | +} |
|
| 85 | +?>" rel="bookmark"><?php the_title(); ?></a> |
|
| 80 | 86 | <?php endif; ?> |
| 81 | 87 | |
| 82 | 88 | <?php if ( is_sticky() ) : ?> |
@@ -99,10 +105,12 @@ discard block |
||
| 99 | 105 | <div class="entry-content"> |
| 100 | 106 | <?php the_content(); ?> |
| 101 | 107 | </div><!-- .entry-content --> |
| 102 | - <?php else : ?> |
|
| 108 | + <?php else { |
|
| 109 | + : ?> |
|
| 103 | 110 | <div class="entry-content"> |
| 104 | 111 | <?php |
| 105 | 112 | the_content(); |
| 113 | +} |
|
| 106 | 114 | |
| 107 | 115 | wp_link_pages( array( |
| 108 | 116 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |