Passed
Push — master ( e51c9a...41921a )
by Chris
04:16
created

partials/content-widget-review.php (5 issues)

1
<?php
2
/**
3
 * Template used to display widget review.
4
 *
5
 * @package lsx
6
 */
7
8
if ( ! defined( 'ABSPATH' ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
9
	exit;
10
}
0 ignored issues
show
No blank line found after control structure
Loading history...
11
global $comment, $stored_comment, $_product, $rating;
12
$the_comment = $comment;
13
if ( null !== $stored_comment ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
14
	$the_comment = $stored_comment;
15
}
16
?>
17
<div class="lsx-woocommerce-review-slot">
18
	<div class="lsx-woocommerce-review-flex">
19
		<a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>">
20
			<figure class="lsx-woocommerce-avatar">
21
				<?php echo wp_kses_post( $_product->get_image( 'lsx-thumbnail-square' ) ); ?>
22
			</figure>
23
		</a>
24
25
		<div class="lsx-woocommerce-review-box">
26
			<div class="lsx-woocommerce-rating">
27
				<?php echo wp_kses_post( wc_get_rating_html( $rating ) ); ?>
28
			</div>
29
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>
32
			</h5>
33
34
			<p class="lsx-woocommerce-reviewer">
35
				<?php
36
					/* translators: %s: review author */
37
					echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) );
38
				?>
39
			</p>
40
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_html_e( 'View more', 'lsx' ); ?></a></p>
44
			</div>
45
		</div>
46
	</div>
47
</div>
48