@@ -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 ?> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | <?php lsx_entry_before(); ?> |
11 | 11 | |
12 | 12 | <?php |
13 | - $no_thumb_post_types = array( |
|
13 | + $no_thumb_post_types = array( |
|
14 | 14 | 'audio' => 'audio', |
15 | 15 | 'gallery' => 'gallery', |
16 | 16 | 'image' => 'image', |
@@ -18,42 +18,42 @@ discard block |
||
18 | 18 | 'quote' => 'quote', |
19 | 19 | 'video' => 'video', |
20 | 20 | ); |
21 | - $no_thumb_post_formats = apply_filters( 'lsx_no_thumb_post_formats', $no_thumb_post_types ); |
|
21 | + $no_thumb_post_formats = apply_filters('lsx_no_thumb_post_formats', $no_thumb_post_types); |
|
22 | 22 | |
23 | - $has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats ); |
|
23 | + $has_thumb = has_post_thumbnail() && ! has_post_format($no_thumb_post_formats); |
|
24 | 24 | |
25 | - if ( $has_thumb ) { |
|
25 | + if ($has_thumb) { |
|
26 | 26 | $thumb_class = 'has-thumb'; |
27 | 27 | } else { |
28 | 28 | $thumb_class = 'no-thumb'; |
29 | 29 | } |
30 | 30 | |
31 | - $blog_layout = apply_filters( 'lsx_blog_layout', 'default' ); |
|
31 | + $blog_layout = apply_filters('lsx_blog_layout', 'default'); |
|
32 | 32 | |
33 | 33 | $image_class = ''; |
34 | 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() ); |
|
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 | 38 | } |
39 | - $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' ); |
|
39 | + $image_arr = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single'); |
|
40 | 40 | $image_src = ''; |
41 | 41 | |
42 | - if ( is_array( $image_arr ) ) { |
|
42 | + if (is_array($image_arr)) { |
|
43 | 43 | $image_src = $image_arr[0]; |
44 | 44 | } |
45 | 45 | ?> |
46 | 46 | |
47 | -<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>> |
|
47 | +<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>> |
|
48 | 48 | <?php lsx_entry_top(); ?> |
49 | 49 | |
50 | 50 | <div class="entry-layout"> |
51 | 51 | <div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>"> |
52 | 52 | <header class="entry-header"> |
53 | - <?php if ( $has_thumb ) : ?> |
|
54 | - <div class="entry-image <?php echo esc_attr( $image_class ); ?>"> |
|
53 | + <?php if ($has_thumb) : ?> |
|
54 | + <div class="entry-image <?php echo esc_attr($image_class); ?>"> |
|
55 | 55 | <a class="thumbnail" href="<?php the_permalink(); ?>"> |
56 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
56 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
57 | 57 | </a> |
58 | 58 | </div> |
59 | 59 | <?php endif; ?> |
@@ -61,37 +61,37 @@ discard block |
||
61 | 61 | <?php |
62 | 62 | $format = get_post_format(); |
63 | 63 | |
64 | - if ( false === $format ) { |
|
64 | + if (false === $format) { |
|
65 | 65 | $format = 'standard'; |
66 | - $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
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' ) ); |
|
68 | + if ('page' === $show_on_front) { |
|
69 | + $archive_link = get_permalink(get_option('page_for_posts')); |
|
70 | 70 | } else { |
71 | 71 | $archive_link = home_url(); |
72 | 72 | } |
73 | 73 | } else { |
74 | - $archive_link = get_post_format_link( $format ); |
|
74 | + $archive_link = get_post_format_link($format); |
|
75 | 75 | } |
76 | 76 | |
77 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
77 | + $format = lsx_translate_format_to_fontawesome($format); |
|
78 | 78 | ?> |
79 | 79 | |
80 | 80 | <h1 class="entry-title"> |
81 | - <?php if ( has_post_thumbnail() ) : ?> |
|
82 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
81 | + <?php if (has_post_thumbnail()) : ?> |
|
82 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a> |
|
83 | 83 | <?php else : ?> |
84 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
84 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a> |
|
85 | 85 | <?php endif; ?> |
86 | 86 | |
87 | - <?php if ( has_post_format( array( 'link' ) ) ) : ?> |
|
88 | - <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
87 | + <?php if (has_post_format(array('link'))) : ?> |
|
88 | + <a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
89 | 89 | <?php else : ?> |
90 | 90 | <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
91 | 91 | <?php endif; ?> |
92 | 92 | |
93 | - <?php if ( is_sticky() ) : ?> |
|
94 | - <span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span> |
|
93 | + <?php if (is_sticky()) : ?> |
|
94 | + <span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
95 | 95 | <?php endif; ?> |
96 | 96 | </h1> |
97 | 97 | |
@@ -103,32 +103,32 @@ discard block |
||
103 | 103 | |
104 | 104 | </header><!-- .entry-header --> |
105 | 105 | |
106 | - <?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?> |
|
106 | + <?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?> |
|
107 | 107 | |
108 | - <?php if ( lsx_post_format_force_content_on_list() && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
108 | + <?php if (lsx_post_format_force_content_on_list() && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
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 ); |
|
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 | 116 | $content = '<p>' . $content . '</p>' . $excerpt_more; |
117 | - echo wp_kses_post( $content ); |
|
117 | + echo wp_kses_post($content); |
|
118 | 118 | } else { |
119 | 119 | the_excerpt(); |
120 | 120 | } |
121 | 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 ); |
|
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 | 124 | } |
125 | 125 | ?> |
126 | 126 | |
127 | 127 | </div><!-- .entry-summary --> |
128 | 128 | |
129 | - <?php elseif ( has_post_format( array( 'link' ) ) ) : ?> |
|
129 | + <?php elseif (has_post_format(array('link'))) : ?> |
|
130 | 130 | |
131 | - <?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
131 | + <?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
132 | 132 | |
133 | 133 | <div class="entry-content"> |
134 | 134 | <?php the_content(); ?> |
@@ -140,12 +140,12 @@ discard block |
||
140 | 140 | <?php |
141 | 141 | the_content(); |
142 | 142 | |
143 | - wp_link_pages( array( |
|
143 | + wp_link_pages(array( |
|
144 | 144 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
145 | 145 | 'after' => '</div></div>', |
146 | 146 | 'link_before' => '<span>', |
147 | 147 | 'link_after' => '</span>', |
148 | - ) ); |
|
148 | + )); |
|
149 | 149 | ?> |
150 | 150 | </div><!-- .entry-content --> |
151 | 151 | |
@@ -157,28 +157,28 @@ discard block |
||
157 | 157 | |
158 | 158 | <?php $comments_number = get_comments_number(); ?> |
159 | 159 | |
160 | - <?php if ( has_tag() || ! empty( $comments_number ) ) { ?> |
|
160 | + <?php if (has_tag() || ! empty($comments_number)) { ?> |
|
161 | 161 | <div class="post-tags-wrapper"> |
162 | 162 | |
163 | 163 | <?php lsx_content_post_tags(); ?> |
164 | 164 | |
165 | - <?php if ( comments_open() && ! empty( $comments_number ) ) : ?> |
|
165 | + <?php if (comments_open() && ! empty($comments_number)) : ?> |
|
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' ); |
|
169 | + if ('1' === $comments_number) { |
|
170 | + echo esc_html_x('One Comment', 'content.php', 'lsx'); |
|
171 | 171 | } else { |
172 | 172 | printf( |
173 | 173 | /* Translators: %s: number of comments */ |
174 | - esc_html( _nx( |
|
174 | + esc_html(_nx( |
|
175 | 175 | '%s Comment', |
176 | 176 | '%s Comments', |
177 | 177 | $comments_number, |
178 | 178 | 'content.php', |
179 | 179 | 'lsx' |
180 | - ) ), |
|
181 | - esc_html( number_format_i18n( $comments_number ) ) |
|
180 | + )), |
|
181 | + esc_html(number_format_i18n($comments_number)) |
|
182 | 182 | ); |
183 | 183 | } |
184 | 184 | ?> |
@@ -189,11 +189,11 @@ discard block |
||
189 | 189 | <?php } ?> |
190 | 190 | </div> |
191 | 191 | |
192 | - <?php if ( has_post_thumbnail() ) : ?> |
|
192 | + <?php if (has_post_thumbnail()) : ?> |
|
193 | 193 | |
194 | 194 | <div class="entry-image hidden-xs"> |
195 | - <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);"> |
|
196 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
195 | + <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);"> |
|
196 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
197 | 197 | </a> |
198 | 198 | </div> |
199 | 199 |