@@ -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> |