@@ -10,38 +10,38 @@ discard block |
||
| 10 | 10 | <?php lsx_entry_before(); ?> |
| 11 | 11 | |
| 12 | 12 | <?php |
| 13 | - $no_thumb_post_types = array( |
|
| 14 | - 'audio' => 'audio', |
|
| 15 | - 'gallery' => 'gallery', |
|
| 16 | - 'image' => 'image', |
|
| 17 | - 'link' => 'link', |
|
| 18 | - 'quote' => 'quote', |
|
| 19 | - 'video' => 'video', |
|
| 20 | - ); |
|
| 21 | - $no_thumb_post_formats = apply_filters( 'lsx_no_thumb_post_formats', $no_thumb_post_types ); |
|
| 22 | - |
|
| 23 | - $has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats ); |
|
| 24 | - |
|
| 25 | - if ( $has_thumb ) { |
|
| 26 | - $thumb_class = 'has-thumb'; |
|
| 27 | - } else { |
|
| 28 | - $thumb_class = 'no-thumb'; |
|
| 29 | - } |
|
| 30 | - |
|
| 31 | - $blog_layout = apply_filters( 'lsx_blog_layout', 'default' ); |
|
| 32 | - |
|
| 33 | - $image_class = ''; |
|
| 34 | - |
|
| 35 | - $thumbnail_id = get_post_thumbnail_id( get_the_ID() ); |
|
| 36 | - if ( empty( $thumbnail_id ) ) { |
|
| 37 | - $thumbnail_id = apply_filters( 'lsx_get_thumbnail_post_placeholder_id', $thumbnail_id, get_the_ID() ); |
|
| 38 | - } |
|
| 39 | - $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' ); |
|
| 40 | - $image_src = ''; |
|
| 41 | - |
|
| 42 | - if ( is_array( $image_arr ) ) { |
|
| 43 | - $image_src = $image_arr[0]; |
|
| 44 | - } |
|
| 13 | + $no_thumb_post_types = array( |
|
| 14 | + 'audio' => 'audio', |
|
| 15 | + 'gallery' => 'gallery', |
|
| 16 | + 'image' => 'image', |
|
| 17 | + 'link' => 'link', |
|
| 18 | + 'quote' => 'quote', |
|
| 19 | + 'video' => 'video', |
|
| 20 | + ); |
|
| 21 | + $no_thumb_post_formats = apply_filters( 'lsx_no_thumb_post_formats', $no_thumb_post_types ); |
|
| 22 | + |
|
| 23 | + $has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats ); |
|
| 24 | + |
|
| 25 | + if ( $has_thumb ) { |
|
| 26 | + $thumb_class = 'has-thumb'; |
|
| 27 | + } else { |
|
| 28 | + $thumb_class = 'no-thumb'; |
|
| 29 | + } |
|
| 30 | + |
|
| 31 | + $blog_layout = apply_filters( 'lsx_blog_layout', 'default' ); |
|
| 32 | + |
|
| 33 | + $image_class = ''; |
|
| 34 | + |
|
| 35 | + $thumbnail_id = get_post_thumbnail_id( get_the_ID() ); |
|
| 36 | + if ( empty( $thumbnail_id ) ) { |
|
| 37 | + $thumbnail_id = apply_filters( 'lsx_get_thumbnail_post_placeholder_id', $thumbnail_id, get_the_ID() ); |
|
| 38 | + } |
|
| 39 | + $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' ); |
|
| 40 | + $image_src = ''; |
|
| 41 | + |
|
| 42 | + if ( is_array( $image_arr ) ) { |
|
| 43 | + $image_src = $image_arr[0]; |
|
| 44 | + } |
|
| 45 | 45 | ?> |
| 46 | 46 | |
| 47 | 47 | <article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>> |
@@ -59,23 +59,23 @@ discard block |
||
| 59 | 59 | <?php endif; ?> |
| 60 | 60 | |
| 61 | 61 | <?php |
| 62 | - $format = get_post_format(); |
|
| 62 | + $format = get_post_format(); |
|
| 63 | 63 | |
| 64 | - if ( false === $format ) { |
|
| 65 | - $format = 'standard'; |
|
| 66 | - $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
| 64 | + if ( false === $format ) { |
|
| 65 | + $format = 'standard'; |
|
| 66 | + $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
| 67 | 67 | |
| 68 | - if ( 'page' === $show_on_front ) { |
|
| 69 | - $archive_link = get_permalink( get_option( 'page_for_posts' ) ); |
|
| 70 | - } else { |
|
| 71 | - $archive_link = home_url(); |
|
| 72 | - } |
|
| 73 | - } else { |
|
| 74 | - $archive_link = get_post_format_link( $format ); |
|
| 75 | - } |
|
| 68 | + if ( 'page' === $show_on_front ) { |
|
| 69 | + $archive_link = get_permalink( get_option( 'page_for_posts' ) ); |
|
| 70 | + } else { |
|
| 71 | + $archive_link = home_url(); |
|
| 72 | + } |
|
| 73 | + } else { |
|
| 74 | + $archive_link = get_post_format_link( $format ); |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 78 | - ?> |
|
| 77 | + $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 78 | + ?> |
|
| 79 | 79 | |
| 80 | 80 | <h1 class="entry-title"> |
| 81 | 81 | <?php if ( has_post_thumbnail() ) : ?> |
@@ -109,20 +109,20 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | <div class="entry-summary"> |
| 111 | 111 | <?php |
| 112 | - if ( false === apply_filters( 'lsx_disable_content_excerpt', false ) ) { |
|
| 113 | - if ( ! has_excerpt() ) { |
|
| 114 | - $excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>'; |
|
| 115 | - $content = wp_trim_words( strip_shortcodes( get_the_content() ), 30 ); |
|
| 116 | - $content = '<p>' . $content . '</p>' . $excerpt_more; |
|
| 117 | - echo wp_kses_post( $content ); |
|
| 118 | - } else { |
|
| 119 | - the_excerpt(); |
|
| 120 | - } |
|
| 121 | - } else { |
|
| 122 | - $excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>'; |
|
| 123 | - echo wp_kses_post( $excerpt_more ); |
|
| 124 | - } |
|
| 125 | - ?> |
|
| 112 | + if ( false === apply_filters( 'lsx_disable_content_excerpt', false ) ) { |
|
| 113 | + if ( ! has_excerpt() ) { |
|
| 114 | + $excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>'; |
|
| 115 | + $content = wp_trim_words( strip_shortcodes( get_the_content() ), 30 ); |
|
| 116 | + $content = '<p>' . $content . '</p>' . $excerpt_more; |
|
| 117 | + echo wp_kses_post( $content ); |
|
| 118 | + } else { |
|
| 119 | + the_excerpt(); |
|
| 120 | + } |
|
| 121 | + } else { |
|
| 122 | + $excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>'; |
|
| 123 | + echo wp_kses_post( $excerpt_more ); |
|
| 124 | + } |
|
| 125 | + ?> |
|
| 126 | 126 | |
| 127 | 127 | </div><!-- .entry-summary --> |
| 128 | 128 | |
@@ -138,15 +138,15 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | <div class="entry-content"> |
| 140 | 140 | <?php |
| 141 | - the_content(); |
|
| 142 | - |
|
| 143 | - wp_link_pages( array( |
|
| 144 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
| 145 | - 'after' => '</div></div>', |
|
| 146 | - 'link_before' => '<span>', |
|
| 147 | - 'link_after' => '</span>', |
|
| 148 | - ) ); |
|
| 149 | - ?> |
|
| 141 | + the_content(); |
|
| 142 | + |
|
| 143 | + wp_link_pages( array( |
|
| 144 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
| 145 | + 'after' => '</div></div>', |
|
| 146 | + 'link_before' => '<span>', |
|
| 147 | + 'link_after' => '</span>', |
|
| 148 | + ) ); |
|
| 149 | + ?> |
|
| 150 | 150 | </div><!-- .entry-content --> |
| 151 | 151 | |
| 152 | 152 | <?php endif; ?> |
@@ -166,22 +166,22 @@ discard block |
||
| 166 | 166 | <div class="post-comments"> |
| 167 | 167 | <a href="<?php the_permalink(); ?>#comments"> |
| 168 | 168 | <?php |
| 169 | - if ( '1' === $comments_number ) { |
|
| 170 | - echo esc_html_x( 'One Comment', 'content.php', 'lsx' ); |
|
| 171 | - } else { |
|
| 172 | - printf( |
|
| 173 | - /* Translators: %s: number of comments */ |
|
| 174 | - esc_html( _nx( |
|
| 175 | - '%s Comment', |
|
| 176 | - '%s Comments', |
|
| 177 | - $comments_number, |
|
| 178 | - 'content.php', |
|
| 179 | - 'lsx' |
|
| 180 | - ) ), |
|
| 181 | - esc_html( number_format_i18n( $comments_number ) ) |
|
| 182 | - ); |
|
| 183 | - } |
|
| 184 | - ?> |
|
| 169 | + if ( '1' === $comments_number ) { |
|
| 170 | + echo esc_html_x( 'One Comment', 'content.php', 'lsx' ); |
|
| 171 | + } else { |
|
| 172 | + printf( |
|
| 173 | + /* Translators: %s: number of comments */ |
|
| 174 | + esc_html( _nx( |
|
| 175 | + '%s Comment', |
|
| 176 | + '%s Comments', |
|
| 177 | + $comments_number, |
|
| 178 | + 'content.php', |
|
| 179 | + 'lsx' |
|
| 180 | + ) ), |
|
| 181 | + esc_html( number_format_i18n( $comments_number ) ) |
|
| 182 | + ); |
|
| 183 | + } |
|
| 184 | + ?> |
|
| 185 | 185 | </a> |
| 186 | 186 | </div> |
| 187 | 187 | <?php endif ?> |