@@ -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,38 +18,38 @@ 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 | - $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' ); |
|
| 35 | + $thumbnail_id = get_post_thumbnail_id(get_the_ID()); |
|
| 36 | + $image_arr = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single'); |
|
| 37 | 37 | |
| 38 | - if ( is_array( $image_arr ) ) { |
|
| 38 | + if (is_array($image_arr)) { |
|
| 39 | 39 | $image_src = $image_arr[0]; |
| 40 | 40 | } |
| 41 | 41 | ?> |
| 42 | 42 | |
| 43 | -<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>> |
|
| 43 | +<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>> |
|
| 44 | 44 | <?php lsx_entry_top(); ?> |
| 45 | 45 | |
| 46 | 46 | <div class="entry-layout"> |
| 47 | 47 | <div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>"> |
| 48 | 48 | <header class="entry-header"> |
| 49 | - <?php if ( $has_thumb ) : ?> |
|
| 50 | - <div class="entry-image <?php echo esc_attr( $image_class ); ?>"> |
|
| 49 | + <?php if ($has_thumb) : ?> |
|
| 50 | + <div class="entry-image <?php echo esc_attr($image_class); ?>"> |
|
| 51 | 51 | <a class="thumbnail" href="<?php the_permalink(); ?>"> |
| 52 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
| 52 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
| 53 | 53 | </a> |
| 54 | 54 | </div> |
| 55 | 55 | <?php endif; ?> |
@@ -57,37 +57,37 @@ discard block |
||
| 57 | 57 | <?php |
| 58 | 58 | $format = get_post_format(); |
| 59 | 59 | |
| 60 | - if ( false === $format ) { |
|
| 60 | + if (false === $format) { |
|
| 61 | 61 | $format = 'standard'; |
| 62 | - $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
| 62 | + $show_on_front = get_option('show_on_front', 'posts'); |
|
| 63 | 63 | |
| 64 | - if ( 'page' === $show_on_front ) { |
|
| 65 | - $archive_link = get_permalink( get_option( 'page_for_posts' ) ); |
|
| 64 | + if ('page' === $show_on_front) { |
|
| 65 | + $archive_link = get_permalink(get_option('page_for_posts')); |
|
| 66 | 66 | } else { |
| 67 | 67 | $archive_link = home_url(); |
| 68 | 68 | } |
| 69 | 69 | } else { |
| 70 | - $archive_link = get_post_format_link( $format ); |
|
| 70 | + $archive_link = get_post_format_link($format); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 73 | + $format = lsx_translate_format_to_fontawesome($format); |
|
| 74 | 74 | ?> |
| 75 | 75 | |
| 76 | 76 | <h2 class="entry-title"> |
| 77 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 78 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
| 77 | + <?php if (has_post_thumbnail()) : ?> |
|
| 78 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a> |
|
| 79 | 79 | <?php else : ?> |
| 80 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
| 80 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a> |
|
| 81 | 81 | <?php endif; ?> |
| 82 | 82 | |
| 83 | - <?php if ( has_post_format( array( 'link' ) ) ) : ?> |
|
| 84 | - <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 83 | + <?php if (has_post_format(array('link'))) : ?> |
|
| 84 | + <a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 85 | 85 | <?php else : ?> |
| 86 | 86 | <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
| 87 | 87 | <?php endif; ?> |
| 88 | 88 | |
| 89 | - <?php if ( is_sticky() ) : ?> |
|
| 90 | - <span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span> |
|
| 89 | + <?php if (is_sticky()) : ?> |
|
| 90 | + <span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
| 91 | 91 | <?php endif; ?> |
| 92 | 92 | </h2> |
| 93 | 93 | <div class="entry-meta"> |
@@ -98,27 +98,27 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | </header><!-- .entry-header --> |
| 100 | 100 | |
| 101 | - <?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?> |
|
| 101 | + <?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?> |
|
| 102 | 102 | |
| 103 | - <?php if ( lsx_post_format_force_content_on_list() && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 103 | + <?php if (lsx_post_format_force_content_on_list() && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 104 | 104 | |
| 105 | 105 | <div class="entry-summary"> |
| 106 | 106 | <?php |
| 107 | - if ( ! has_excerpt() ) { |
|
| 107 | + if ( ! has_excerpt()) { |
|
| 108 | 108 | |
| 109 | - $excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>'; |
|
| 110 | - $content = wp_trim_words( get_the_content(), 50 ); |
|
| 109 | + $excerpt_more = '<p><a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('Read More', 'lsx') . '</a></p>'; |
|
| 110 | + $content = wp_trim_words(get_the_content(), 50); |
|
| 111 | 111 | $content = '<p>' . $content . '</p>' . $excerpt_more; |
| 112 | - echo wp_kses_post( $content ); |
|
| 112 | + echo wp_kses_post($content); |
|
| 113 | 113 | } else { |
| 114 | 114 | the_excerpt(); |
| 115 | 115 | } |
| 116 | 116 | ?> |
| 117 | 117 | </div><!-- .entry-summary --> |
| 118 | 118 | |
| 119 | - <?php elseif ( has_post_format( array( 'link' ) ) ) : ?> |
|
| 119 | + <?php elseif (has_post_format(array('link'))) : ?> |
|
| 120 | 120 | |
| 121 | - <?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 121 | + <?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 122 | 122 | |
| 123 | 123 | <div class="entry-content"> |
| 124 | 124 | <?php the_content(); ?> |
@@ -130,12 +130,12 @@ discard block |
||
| 130 | 130 | <?php |
| 131 | 131 | the_content(); |
| 132 | 132 | |
| 133 | - wp_link_pages( array( |
|
| 133 | + wp_link_pages(array( |
|
| 134 | 134 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 135 | 135 | 'after' => '</div></div>', |
| 136 | 136 | 'link_before' => '<span>', |
| 137 | 137 | 'link_after' => '</span>', |
| 138 | - ) ); |
|
| 138 | + )); |
|
| 139 | 139 | ?> |
| 140 | 140 | </div><!-- .entry-content --> |
| 141 | 141 | |
@@ -151,23 +151,23 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | <?php lsx_content_post_tags(); ?> |
| 153 | 153 | |
| 154 | - <?php if ( comments_open() && ! empty( $comments_number ) ) : ?> |
|
| 154 | + <?php if (comments_open() && ! empty($comments_number)) : ?> |
|
| 155 | 155 | <div class="post-comments"> |
| 156 | 156 | <a href="<?php the_permalink(); ?>#comments"> |
| 157 | 157 | <?php |
| 158 | - if ( '1' === $comments_number ) { |
|
| 159 | - echo esc_html_x( 'One Comment', 'content.php', 'lsx' ); |
|
| 158 | + if ('1' === $comments_number) { |
|
| 159 | + echo esc_html_x('One Comment', 'content.php', 'lsx'); |
|
| 160 | 160 | } else { |
| 161 | 161 | printf( |
| 162 | 162 | /* Translators: %s: number of comments */ |
| 163 | - esc_html( _nx( |
|
| 163 | + esc_html(_nx( |
|
| 164 | 164 | '%s Comment', |
| 165 | 165 | '%s Comments', |
| 166 | 166 | $comments_number, |
| 167 | 167 | 'content.php', |
| 168 | 168 | 'lsx' |
| 169 | - ) ), |
|
| 170 | - esc_html( number_format_i18n( $comments_number ) ) |
|
| 169 | + )), |
|
| 170 | + esc_html(number_format_i18n($comments_number)) |
|
| 171 | 171 | ); |
| 172 | 172 | } |
| 173 | 173 | ?> |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | </div> |
| 178 | 178 | </div> |
| 179 | 179 | |
| 180 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 180 | + <?php if (has_post_thumbnail()) : ?> |
|
| 181 | 181 | |
| 182 | 182 | <div class="entry-image hidden-xs"> |
| 183 | - <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);"> |
|
| 184 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
| 183 | + <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);"> |
|
| 184 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
| 185 | 185 | </a> |
| 186 | 186 | </div> |
| 187 | 187 | |
@@ -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,38 +18,38 @@ 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 | - $image_arr = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' ); |
|
| 35 | + $thumbnail_id = get_post_thumbnail_id(get_the_ID()); |
|
| 36 | + $image_arr = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single'); |
|
| 37 | 37 | |
| 38 | - if ( is_array( $image_arr ) ) { |
|
| 38 | + if (is_array($image_arr)) { |
|
| 39 | 39 | $image_src = $image_arr[0]; |
| 40 | 40 | } |
| 41 | 41 | ?> |
| 42 | 42 | |
| 43 | -<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>> |
|
| 43 | +<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>> |
|
| 44 | 44 | <?php lsx_entry_top(); ?> |
| 45 | 45 | |
| 46 | 46 | <div class="entry-layout"> |
| 47 | 47 | <div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>"> |
| 48 | 48 | <header class="entry-header"> |
| 49 | - <?php if ( $has_thumb ) : ?> |
|
| 50 | - <div class="entry-image <?php echo esc_attr( $image_class ); ?>"> |
|
| 49 | + <?php if ($has_thumb) : ?> |
|
| 50 | + <div class="entry-image <?php echo esc_attr($image_class); ?>"> |
|
| 51 | 51 | <a class="thumbnail" href="<?php the_permalink(); ?>"> |
| 52 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
| 52 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
| 53 | 53 | </a> |
| 54 | 54 | </div> |
| 55 | 55 | <?php endif; ?> |
@@ -57,37 +57,37 @@ discard block |
||
| 57 | 57 | <?php |
| 58 | 58 | $format = get_post_format(); |
| 59 | 59 | |
| 60 | - if ( false === $format ) { |
|
| 60 | + if (false === $format) { |
|
| 61 | 61 | $format = 'standard'; |
| 62 | - $show_on_front = get_option( 'show_on_front', 'posts' ); |
|
| 62 | + $show_on_front = get_option('show_on_front', 'posts'); |
|
| 63 | 63 | |
| 64 | - if ( 'page' === $show_on_front ) { |
|
| 65 | - $archive_link = get_permalink( get_option( 'page_for_posts' ) ); |
|
| 64 | + if ('page' === $show_on_front) { |
|
| 65 | + $archive_link = get_permalink(get_option('page_for_posts')); |
|
| 66 | 66 | } else { |
| 67 | 67 | $archive_link = home_url(); |
| 68 | 68 | } |
| 69 | 69 | } else { |
| 70 | - $archive_link = get_post_format_link( $format ); |
|
| 70 | + $archive_link = get_post_format_link($format); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
| 73 | + $format = lsx_translate_format_to_fontawesome($format); |
|
| 74 | 74 | ?> |
| 75 | 75 | |
| 76 | 76 | <h1 class="entry-title"> |
| 77 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 78 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
| 77 | + <?php if (has_post_thumbnail()) : ?> |
|
| 78 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a> |
|
| 79 | 79 | <?php else : ?> |
| 80 | - <a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a> |
|
| 80 | + <a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a> |
|
| 81 | 81 | <?php endif; ?> |
| 82 | 82 | |
| 83 | - <?php if ( has_post_format( array( 'link' ) ) ) : ?> |
|
| 84 | - <a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 83 | + <?php if (has_post_format(array('link'))) : ?> |
|
| 84 | + <a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a> |
|
| 85 | 85 | <?php else : ?> |
| 86 | 86 | <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
| 87 | 87 | <?php endif; ?> |
| 88 | 88 | |
| 89 | - <?php if ( is_sticky() ) : ?> |
|
| 90 | - <span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span> |
|
| 89 | + <?php if (is_sticky()) : ?> |
|
| 90 | + <span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span> |
|
| 91 | 91 | <?php endif; ?> |
| 92 | 92 | </h1> |
| 93 | 93 | |
@@ -99,18 +99,18 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | </header><!-- .entry-header --> |
| 101 | 101 | |
| 102 | - <?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?> |
|
| 102 | + <?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?> |
|
| 103 | 103 | |
| 104 | - <?php if ( lsx_post_format_force_content_on_list() && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 104 | + <?php if (lsx_post_format_force_content_on_list() && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 105 | 105 | |
| 106 | 106 | <div class="entry-summary"> |
| 107 | 107 | <?php |
| 108 | - if ( ! has_excerpt() ) { |
|
| 108 | + if ( ! has_excerpt()) { |
|
| 109 | 109 | |
| 110 | - $excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>'; |
|
| 111 | - $content = wp_trim_words( get_the_content(), 30 ); |
|
| 110 | + $excerpt_more = '<p><a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('Read More', 'lsx') . '</a></p>'; |
|
| 111 | + $content = wp_trim_words(get_the_content(), 30); |
|
| 112 | 112 | $content = '<p>' . $content . '</p>' . $excerpt_more; |
| 113 | - echo wp_kses_post( $content ); |
|
| 113 | + echo wp_kses_post($content); |
|
| 114 | 114 | } else { |
| 115 | 115 | the_excerpt(); |
| 116 | 116 | } |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | </div><!-- .entry-summary --> |
| 120 | 120 | |
| 121 | - <?php elseif ( has_post_format( array( 'link' ) ) ) : ?> |
|
| 121 | + <?php elseif (has_post_format(array('link'))) : ?> |
|
| 122 | 122 | |
| 123 | - <?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?> |
|
| 123 | + <?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?> |
|
| 124 | 124 | |
| 125 | 125 | <div class="entry-content"> |
| 126 | 126 | <?php the_content(); ?> |
@@ -132,12 +132,12 @@ discard block |
||
| 132 | 132 | <?php |
| 133 | 133 | the_content(); |
| 134 | 134 | |
| 135 | - wp_link_pages( array( |
|
| 135 | + wp_link_pages(array( |
|
| 136 | 136 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 137 | 137 | 'after' => '</div></div>', |
| 138 | 138 | 'link_before' => '<span>', |
| 139 | 139 | 'link_after' => '</span>', |
| 140 | - ) ); |
|
| 140 | + )); |
|
| 141 | 141 | ?> |
| 142 | 142 | </div><!-- .entry-content --> |
| 143 | 143 | |
@@ -149,28 +149,28 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | <?php $comments_number = get_comments_number(); ?> |
| 151 | 151 | |
| 152 | - <?php if ( has_tag() || ! empty( $comments_number ) ) { ?> |
|
| 152 | + <?php if (has_tag() || ! empty($comments_number)) { ?> |
|
| 153 | 153 | <div class="post-tags-wrapper"> |
| 154 | 154 | |
| 155 | 155 | <?php lsx_content_post_tags(); ?> |
| 156 | 156 | |
| 157 | - <?php if ( comments_open() && ! empty( $comments_number ) ) : ?> |
|
| 157 | + <?php if (comments_open() && ! empty($comments_number)) : ?> |
|
| 158 | 158 | <div class="post-comments"> |
| 159 | 159 | <a href="<?php the_permalink(); ?>#comments"> |
| 160 | 160 | <?php |
| 161 | - if ( '1' === $comments_number ) { |
|
| 162 | - echo esc_html_x( 'One Comment', 'content.php', 'lsx' ); |
|
| 161 | + if ('1' === $comments_number) { |
|
| 162 | + echo esc_html_x('One Comment', 'content.php', 'lsx'); |
|
| 163 | 163 | } else { |
| 164 | 164 | printf( |
| 165 | 165 | /* Translators: %s: number of comments */ |
| 166 | - esc_html( _nx( |
|
| 166 | + esc_html(_nx( |
|
| 167 | 167 | '%s Comment', |
| 168 | 168 | '%s Comments', |
| 169 | 169 | $comments_number, |
| 170 | 170 | 'content.php', |
| 171 | 171 | 'lsx' |
| 172 | - ) ), |
|
| 173 | - esc_html( number_format_i18n( $comments_number ) ) |
|
| 172 | + )), |
|
| 173 | + esc_html(number_format_i18n($comments_number)) |
|
| 174 | 174 | ); |
| 175 | 175 | } |
| 176 | 176 | ?> |
@@ -181,11 +181,11 @@ discard block |
||
| 181 | 181 | <?php } ?> |
| 182 | 182 | </div> |
| 183 | 183 | |
| 184 | - <?php if ( has_post_thumbnail() ) : ?> |
|
| 184 | + <?php if (has_post_thumbnail()) : ?> |
|
| 185 | 185 | |
| 186 | 186 | <div class="entry-image hidden-xs"> |
| 187 | - <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);"> |
|
| 188 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
| 187 | + <a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);"> |
|
| 188 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
| 189 | 189 | </a> |
| 190 | 190 | </div> |
| 191 | 191 | |
@@ -17,31 +17,31 @@ |
||
| 17 | 17 | <?php |
| 18 | 18 | the_content(); |
| 19 | 19 | |
| 20 | - wp_link_pages( array( |
|
| 20 | + wp_link_pages(array( |
|
| 21 | 21 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
| 22 | 22 | 'after' => '</div></div>', |
| 23 | 23 | 'link_before' => '<span>', |
| 24 | 24 | 'link_after' => '</span>', |
| 25 | - ) ); |
|
| 25 | + )); |
|
| 26 | 26 | ?> |
| 27 | 27 | </div><!-- .entry-content --> |
| 28 | 28 | |
| 29 | 29 | <footer class="footer-meta clearfix"> |
| 30 | - <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
| 30 | + <?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
| 31 | 31 | <div class="post-tags-wrapper"> |
| 32 | 32 | <?php lsx_content_post_tags(); ?> |
| 33 | 33 | |
| 34 | 34 | <?php |
| 35 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
| 35 | + if (class_exists('LSX_Sharing')) { |
|
| 36 | 36 | lsx_content_sharing(); |
| 37 | 37 | } else { |
| 38 | - if ( function_exists( 'sharing_display' ) ) { |
|
| 39 | - sharing_display( '', true ); |
|
| 38 | + if (function_exists('sharing_display')) { |
|
| 39 | + sharing_display('', true); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 42 | + if (class_exists('Jetpack_Likes')) { |
|
| 43 | 43 | $custom_likes = new Jetpack_Likes(); |
| 44 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
| 44 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | ?> |
@@ -5,42 +5,42 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 8 | +if ( ! defined('ABSPATH')) { |
|
| 9 | 9 | exit; |
| 10 | 10 | } |
| 11 | 11 | global $comment, $stored_comment, $_product, $rating; |
| 12 | 12 | $the_comment = $comment; |
| 13 | -if ( null !== $stored_comment ) { |
|
| 13 | +if (null !== $stored_comment) { |
|
| 14 | 14 | $the_comment = $stored_comment; |
| 15 | 15 | } |
| 16 | 16 | ?> |
| 17 | 17 | <div class="lsx-woocommerce-review-slot"> |
| 18 | 18 | <div class="lsx-woocommerce-review-flex"> |
| 19 | - <a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"> |
|
| 19 | + <a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"> |
|
| 20 | 20 | <figure class="lsx-woocommerce-avatar"> |
| 21 | - <?php echo wp_kses_post( $_product->get_image( 'lsx-thumbnail-square' ) ); ?> |
|
| 21 | + <?php echo wp_kses_post($_product->get_image('lsx-thumbnail-square')); ?> |
|
| 22 | 22 | </figure> |
| 23 | 23 | </a> |
| 24 | 24 | |
| 25 | 25 | <div class="lsx-woocommerce-review-box"> |
| 26 | 26 | <div class="lsx-woocommerce-rating"> |
| 27 | - <?php echo wp_kses_post( wc_get_rating_html( $rating ) ); ?> |
|
| 27 | + <?php echo wp_kses_post(wc_get_rating_html($rating)); ?> |
|
| 28 | 28 | </div> |
| 29 | 29 | |
| 30 | 30 | <h5 class="lsx-woocommerce-title"> |
| 31 | - <a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"><?php echo wp_kses_post( $_product->get_name() ); ?></a> |
|
| 31 | + <a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"><?php echo wp_kses_post($_product->get_name()); ?></a> |
|
| 32 | 32 | </h5> |
| 33 | 33 | |
| 34 | 34 | <p class="lsx-woocommerce-reviewer"> |
| 35 | 35 | <?php |
| 36 | 36 | /* translators: %s: review author */ |
| 37 | - echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
| 37 | + echo wp_kses_post(esc_html__('by ', 'lsx') . get_comment_author($the_comment->comment_ID)); |
|
| 38 | 38 | ?> |
| 39 | 39 | </p> |
| 40 | 40 | |
| 41 | 41 | <div class="lsx-woocommerce-content"> |
| 42 | - <p><?php echo wp_kses_post( $the_comment->comment_content ); ?></p> |
|
| 43 | - <p><a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>" class="moretag"><?php esc_attr_e( 'View more', 'lsx' ); ?></a></p> |
|
| 42 | + <p><?php echo wp_kses_post($the_comment->comment_content); ?></p> |
|
| 43 | + <p><a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>" class="moretag"><?php esc_attr_e('View more', 'lsx'); ?></a></p> |
|
| 44 | 44 | </div> |
| 45 | 45 | </div> |
| 46 | 46 | </div> |
@@ -15,42 +15,42 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | // Exit if accessed directly. |
| 18 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 18 | +if ( ! defined('ABSPATH')) { |
|
| 19 | 19 | exit; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | global $product; |
| 23 | 23 | |
| 24 | -if ( ! is_a( $product, 'WC_Product' ) ) { |
|
| 24 | +if ( ! is_a($product, 'WC_Product')) { |
|
| 25 | 25 | return; |
| 26 | 26 | } ?> |
| 27 | 27 | |
| 28 | 28 | <div class="lsx-woocommerce-slot"> |
| 29 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"> |
|
| 29 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"> |
|
| 30 | 30 | <figure class="lsx-woocommerce-avatar"> |
| 31 | - <?php echo wp_kses_post( $product->get_image( 'lsx-thumbnail-square' ) ); ?> |
|
| 31 | + <?php echo wp_kses_post($product->get_image('lsx-thumbnail-square')); ?> |
|
| 32 | 32 | </figure> |
| 33 | 33 | </a> |
| 34 | 34 | |
| 35 | 35 | <h5 class="lsx-woocommerce-title"> |
| 36 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"><?php echo wp_kses_post( $product->get_name() ); ?></a> |
|
| 36 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"><?php echo wp_kses_post($product->get_name()); ?></a> |
|
| 37 | 37 | </h5> |
| 38 | 38 | |
| 39 | - <?php if ( ! empty( $show_rating ) ) : ?> |
|
| 39 | + <?php if ( ! empty($show_rating)) : ?> |
|
| 40 | 40 | <div class="lsx-woocommerce-rating"> |
| 41 | - <?php echo wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) ); ?> |
|
| 41 | + <?php echo wp_kses_post(wc_get_rating_html($product->get_average_rating())); ?> |
|
| 42 | 42 | </div> |
| 43 | 43 | <?php endif; ?> |
| 44 | 44 | |
| 45 | 45 | <?php |
| 46 | 46 | $price_html = $product->get_price_html(); |
| 47 | - if ( $price_html ) : ?> |
|
| 47 | + if ($price_html) : ?> |
|
| 48 | 48 | <div class="lsx-woocommerce-price"> |
| 49 | - <?php echo wp_kses_post( $price_html ); ?> |
|
| 49 | + <?php echo wp_kses_post($price_html); ?> |
|
| 50 | 50 | </div> |
| 51 | 51 | <?php endif; ?> |
| 52 | 52 | |
| 53 | 53 | <div class="lsx-woocommerce-content"> |
| 54 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="moretag"><?php esc_attr_e( 'View more', 'lsx' ); ?></a> |
|
| 54 | + <a href="<?php echo esc_url($product->get_permalink()); ?>" class="moretag"><?php esc_attr_e('View more', 'lsx'); ?></a> |
|
| 55 | 55 | </div> |
| 56 | 56 | </div> |