@@ -9,37 +9,37 @@ discard block |
||
| 9 | 9 | <?php lsx_entry_before(); ?> |
| 10 | 10 | |
| 11 | 11 | <?php |
| 12 | - $no_thumb_post_formats = array( 'audio', 'gallery', 'image', 'link', 'quote', 'video' ); |
|
| 13 | - $has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats ); |
|
| 12 | + $no_thumb_post_formats = array('audio', 'gallery', 'image', 'link', 'quote', 'video'); |
|
| 13 | + $has_thumb = has_post_thumbnail() && ! has_post_format($no_thumb_post_formats); |
|
| 14 | 14 | |
| 15 | - if ( $has_thumb ) { |
|
| 15 | + if ($has_thumb) { |
|
| 16 | 16 | $thumb_class = 'has-thumb'; |
| 17 | 17 | } else { |
| 18 | 18 | $thumb_class = 'no-thumb'; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - $blog_layout = apply_filters( 'lsx_blog_layout', 'default' ); |
|
| 21 | + $blog_layout = apply_filters('lsx_blog_layout', 'default'); |
|
| 22 | 22 | |
| 23 | 23 | $image_class = ''; |
| 24 | 24 | |
| 25 | - $thumbnail_id = get_post_thumbnail_id( get_the_ID() ); |
|
| 26 | - $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' ); |
|
| 25 | + $thumbnail_id = get_post_thumbnail_id(get_the_ID()); |
|
| 26 | + $image_arr = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single'); |
|
| 27 | 27 | |
| 28 | - if ( is_array( $image_arr ) ) { |
|
| 28 | + if (is_array($image_arr)) { |
|
| 29 | 29 | $image_src = $image_arr[0]; |
| 30 | 30 | } |
| 31 | 31 | ?> |
| 32 | 32 | |
| 33 | -<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>> |
|
| 33 | +<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>> |
|
| 34 | 34 | <?php lsx_entry_top(); ?> |
| 35 | 35 | |
| 36 | 36 | <div class="entry-layout"> |
| 37 | 37 | <div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>"> |
| 38 | 38 | <header class="entry-header"> |
| 39 | - <?php if ( $has_thumb ) : ?> |
|
| 40 | - <div class="entry-image <?php echo esc_attr( $image_class ); ?>"> |
|
| 39 | + <?php if ($has_thumb) : ?> |
|
| 40 | + <div class="entry-image <?php echo esc_attr($image_class); ?>"> |
|
| 41 | 41 | <a class="thumbnail" href="<?php the_permalink(); ?>"> |
| 42 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
| 42 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
| 43 | 43 | </a> |
| 44 | 44 | </div> |
| 45 | 45 | <?php endif; ?> |
@@ -51,53 +51,53 @@ discard block |
||
| 51 | 51 | <?php |
| 52 | 52 | $format = get_post_format(); |
| 53 | 53 | |
| 54 | - if ( false === $format ) { |
|
| 54 | + if (false === $format) { |
|
| 55 | 55 | $format = 'standard'; |
| 56 | - $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
| 56 | + $show_on_front = get_option('show_on_front', 'posts'); |
|
| 57 | 57 | |
| 58 | - if ( 'page' === $show_on_front ) { |
|
| 59 | - $archive_link = get_permalink( get_option( 'page_for_posts' ) ); |
|
| 58 | + if ('page' === $show_on_front) { |
|
| 59 | + $archive_link = get_permalink(get_option('page_for_posts')); |
|
| 60 | 60 | } else { |
| 61 | 61 | $archive_link = home_url(); |
| 62 | 62 | } |
| 63 | 63 | } else { |
| 64 | - $archive_link = get_post_format_link( $format ); |
|
| 64 | + $archive_link = get_post_format_link($format); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 67 | + $format = lsx_translate_format_to_fontawesome($format); |
|
| 68 | 68 | ?> |
| 69 | 69 | |
| 70 | 70 | <h1 class="entry-title"> |
| 71 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 72 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
| 71 | + <?php if (has_post_thumbnail()) : ?> |
|
| 72 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a> |
|
| 73 | 73 | <?php else : ?> |
| 74 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
| 74 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a> |
|
| 75 | 75 | <?php endif; ?> |
| 76 | 76 | |
| 77 | - <?php if ( has_post_format( array( 'link' ) ) ) : ?> |
|
| 78 | - <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 77 | + <?php if (has_post_format(array('link'))) : ?> |
|
| 78 | + <a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 79 | 79 | <?php else : ?> |
| 80 | 80 | <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
| 81 | 81 | <?php endif; ?> |
| 82 | 82 | |
| 83 | - <?php if ( is_sticky() ) : ?> |
|
| 84 | - <span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span> |
|
| 83 | + <?php if (is_sticky()) : ?> |
|
| 84 | + <span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
| 85 | 85 | <?php endif; ?> |
| 86 | 86 | </h1> |
| 87 | 87 | </header><!-- .entry-header --> |
| 88 | 88 | |
| 89 | - <?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?> |
|
| 89 | + <?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?> |
|
| 90 | 90 | |
| 91 | - <?php if ( ! has_post_format( array( 'video', 'audio', 'quote', 'link' ) ) && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 91 | + <?php if ( ! has_post_format(array('video', 'audio', 'quote', 'link')) && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 92 | 92 | |
| 93 | 93 | <div class="entry-summary"> |
| 94 | 94 | <?php the_excerpt(); ?> |
| 95 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<p class="edit-link">', '</p>' ); ?> |
|
| 95 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<p class="edit-link">', '</p>'); ?> |
|
| 96 | 96 | </div><!-- .entry-summary --> |
| 97 | 97 | |
| 98 | - <?php elseif ( has_post_format( array( 'link' ) ) ) : ?> |
|
| 98 | + <?php elseif (has_post_format(array('link'))) : ?> |
|
| 99 | 99 | |
| 100 | - <?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 100 | + <?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 101 | 101 | |
| 102 | 102 | <div class="entry-content"> |
| 103 | 103 | <?php the_content(); ?> |
@@ -109,12 +109,12 @@ discard block |
||
| 109 | 109 | <?php |
| 110 | 110 | the_content(); |
| 111 | 111 | |
| 112 | - wp_link_pages( array( |
|
| 112 | + wp_link_pages(array( |
|
| 113 | 113 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 114 | 114 | 'after' => '</div></div>', |
| 115 | 115 | 'link_before' => '<span>', |
| 116 | 116 | 'link_after' => '</span>', |
| 117 | - ) ); |
|
| 117 | + )); |
|
| 118 | 118 | ?> |
| 119 | 119 | </div><!-- .entry-content --> |
| 120 | 120 | |
@@ -131,23 +131,23 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | <?php lsx_content_post_tags(); ?> |
| 133 | 133 | |
| 134 | - <?php if ( comments_open() && ! empty( $comments_number ) ) : ?> |
|
| 134 | + <?php if (comments_open() && ! empty($comments_number)) : ?> |
|
| 135 | 135 | <div class="post-comments"> |
| 136 | 136 | <a href="<?php the_permalink(); ?>#comments"> |
| 137 | 137 | <?php |
| 138 | - if ( '1' === $comments_number ) { |
|
| 139 | - echo esc_html_x( 'One Comment', 'content.php', 'lsx' ); |
|
| 138 | + if ('1' === $comments_number) { |
|
| 139 | + echo esc_html_x('One Comment', 'content.php', 'lsx'); |
|
| 140 | 140 | } else { |
| 141 | 141 | printf( |
| 142 | 142 | /* Translators: %s: number of comments */ |
| 143 | - esc_html( _nx( |
|
| 143 | + esc_html(_nx( |
|
| 144 | 144 | '%s Comment', |
| 145 | 145 | '%s Comments', |
| 146 | 146 | $comments_number, |
| 147 | 147 | 'content.php', |
| 148 | 148 | 'lsx' |
| 149 | - ) ), |
|
| 150 | - esc_html( number_format_i18n( $comments_number ) ) |
|
| 149 | + )), |
|
| 150 | + esc_html(number_format_i18n($comments_number)) |
|
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | ?> |
@@ -157,11 +157,11 @@ discard block |
||
| 157 | 157 | </div> |
| 158 | 158 | </div> |
| 159 | 159 | |
| 160 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 160 | + <?php if (has_post_thumbnail()) : ?> |
|
| 161 | 161 | |
| 162 | 162 | <div class="entry-image hidden-xs"> |
| 163 | - <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);"> |
|
| 164 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
| 163 | + <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);"> |
|
| 164 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
| 165 | 165 | </a> |
| 166 | 166 | </div> |
| 167 | 167 | |