Passed
Push — master ( 158865...7b75c8 )
by Warwick
02:20
created
includes/classes/class-lsx-schema-utils.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	 *
19 19
 	 * @return bool True if it has schema, false if not.
20 20
 	 */
21
-	public static function is_type( $post_type = null, $comparison_type = null ) {
22
-		if ( is_null( $comparison_type ) ) {
21
+	public static function is_type($post_type = null, $comparison_type = null) {
22
+		if (is_null($comparison_type)) {
23 23
 			return false;
24 24
 		}
25
-		if ( is_null( $post_type ) ) {
25
+		if (is_null($post_type)) {
26 26
 			$post_type = get_post_type();
27 27
 		}
28 28
 		/**
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 		 *
31 31
 		 * @api string[] $post_types The post types for which we output Review.
32 32
 		 */
33
-		$post_types = apply_filters( 'wpseo_schema_' . $comparison_type . '_post_types', array( $comparison_type ) );
34
-		return in_array( $post_type, $post_types );
33
+		$post_types = apply_filters('wpseo_schema_' . $comparison_type . '_post_types', array($comparison_type));
34
+		return in_array($post_type, $post_types);
35 35
 	}
36 36
 	/**
37 37
 	 * Retrieve a users Schema ID.
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 	 *
43 43
 	 * @return string The user's schema ID.
44 44
 	 */
45
-	public static function get_places_schema_id( $place_id, $type, $context ) {
46
-		$url = $context->site_url . '#/schema/' . strtolower( $type ) . '/' . wp_hash( $place_id . get_the_title( $place_id ) );
47
-		return trailingslashit( $url );
45
+	public static function get_places_schema_id($place_id, $type, $context) {
46
+		$url = $context->site_url . '#/schema/' . strtolower($type) . '/' . wp_hash($place_id . get_the_title($place_id));
47
+		return trailingslashit($url);
48 48
 	}
49 49
 	/**
50 50
 	 * Retrieve a users Schema ID.
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @return string The user's schema ID.
56 56
 	 */
57
-	public static function get_subtrip_schema_id( $name, $context ) {
58
-		$url = $context->site_url . '#/subtrip/' . wp_hash( $name . $context->id );
59
-		return trailingslashit( $url );
57
+	public static function get_subtrip_schema_id($name, $context) {
58
+		$url = $context->site_url . '#/subtrip/' . wp_hash($name . $context->id);
59
+		return trailingslashit($url);
60 60
 	}
61 61
 	/**
62 62
 	 * Retrieve an offer Schema ID.
@@ -67,15 +67,15 @@  discard block
 block discarded – undo
67 67
 	 *
68 68
 	 * @return string The user's schema ID.
69 69
 	 */
70
-	public static function get_offer_schema_id( $id, $context, $local = false ) {
71
-		if ( false === $local ) {
70
+	public static function get_offer_schema_id($id, $context, $local = false) {
71
+		if (false === $local) {
72 72
 			$url = $context->site_url;
73 73
 		} else {
74
-			$url = get_permalink( $context->id );
74
+			$url = get_permalink($context->id);
75 75
 		}
76 76
 		$url .= '#/schema/offer/';
77
-		$url .= wp_hash( $id . get_the_title( $id ) );
78
-		return trailingslashit( $url );
77
+		$url .= wp_hash($id . get_the_title($id));
78
+		return trailingslashit($url);
79 79
 	}
80 80
 	/**
81 81
 	 * Retrieve an review Schema ID.
@@ -86,15 +86,15 @@  discard block
 block discarded – undo
86 86
 	 *
87 87
 	 * @return string The user's schema ID.
88 88
 	 */
89
-	public static function get_review_schema_id( $id, $context, $local = false ) {
90
-		if ( false === $local ) {
89
+	public static function get_review_schema_id($id, $context, $local = false) {
90
+		if (false === $local) {
91 91
 			$url = $context->site_url;
92 92
 		} else {
93
-			$url = get_permalink( $context->id );
93
+			$url = get_permalink($context->id);
94 94
 		}
95 95
 		$url .= '#/schema/review/';
96
-		$url .= wp_hash( $id . get_the_title( $id ) );
97
-		return trailingslashit( $url );
96
+		$url .= wp_hash($id . get_the_title($id));
97
+		return trailingslashit($url);
98 98
 	}
99 99
 	/**
100 100
 	 * Retrieve an Article Schema ID.
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 	 *
106 106
 	 * @return string The user's schema ID.
107 107
 	 */
108
-	public static function get_article_schema_id( $id, $context, $local = false ) {
109
-		if ( false === $local ) {
110
-			$url = get_permalink( $id ) . \WPSEO_Schema_IDs::ARTICLE_HASH;
108
+	public static function get_article_schema_id($id, $context, $local = false) {
109
+		if (false === $local) {
110
+			$url = get_permalink($id) . \WPSEO_Schema_IDs::ARTICLE_HASH;
111 111
 		} else {
112
-			$url = get_permalink( $context->id ) . '#/schema/article/' . wp_hash( $id . get_the_title( $id ) );
112
+			$url = get_permalink($context->id) . '#/schema/article/' . wp_hash($id . get_the_title($id));
113 113
 		}
114
-		return trailingslashit( $url );
114
+		return trailingslashit($url);
115 115
 	}
116 116
 	/**
117 117
 	 * Retrieve a users Schema ID.
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 	 *
122 122
 	 * @return string The user's schema ID.
123 123
 	 */
124
-	public static function get_author_schema_id( $name, $email, $context ) {
125
-		return $context->site_url . \WPSEO_Schema_IDs::PERSON_HASH . wp_hash( $name . $email );
124
+	public static function get_author_schema_id($name, $email, $context) {
125
+		return $context->site_url . \WPSEO_Schema_IDs::PERSON_HASH . wp_hash($name . $email);
126 126
 	}
127 127
 	/**
128 128
 	 * Generates the place graph piece for the subtrip / Itinerary arrays.
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 	 *
136 136
 	 * @return mixed array $data Place data.
137 137
 	 */
138
-	public static function add_place( $data, $type, $post_id, $context, $contained_in = false ) {
139
-		$at_id = self::get_places_schema_id( $post_id, $type, $context );
138
+	public static function add_place($data, $type, $post_id, $context, $contained_in = false) {
139
+		$at_id = self::get_places_schema_id($post_id, $type, $context);
140 140
 		$place = array(
141 141
 			'@type'       => $type,
142 142
 			'@id'         => $at_id,
143
-			'name'        => get_the_title( $post_id ),
144
-			'description' => get_the_excerpt( $post_id ),
145
-			'url'         => get_permalink( $post_id ),
143
+			'name'        => get_the_title($post_id),
144
+			'description' => get_the_excerpt($post_id),
145
+			'url'         => get_permalink($post_id),
146 146
 		);
147
-		if ( false !== $contained_in ) {
147
+		if (false !== $contained_in) {
148 148
 			$place['containedInPlace'] = array(
149 149
 				'@type' => 'Country',
150 150
 				'@id'   => $contained_in,
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 	 *
162 162
 	 * @return array $data The Review data.
163 163
 	 */
164
-	public static function add_image( $data, $context ) {
165
-		if ( $context->has_image ) {
164
+	public static function add_image($data, $context) {
165
+		if ($context->has_image) {
166 166
 			$data['image'] = array(
167 167
 				'@id' => $context->canonical . \WPSEO_Schema_IDs::PRIMARY_IMAGE_HASH,
168 168
 			);
@@ -176,18 +176,18 @@  discard block
 block discarded – undo
176 176
 	 * @param  string $type The schema type.
177 177
 	 * @return array $schema An array of the schema markup.
178 178
 	 */
179
-	public static function get_item_reviewed( $items = array(), $type = '' ) {
179
+	public static function get_item_reviewed($items = array(), $type = '') {
180 180
 		$schema = array();
181
-		if ( false !== $items && ! empty( $items ) && '' !== $type ) {
182
-			array_unique( $items );
183
-			foreach ( $items as $item ) {
184
-				$title = get_the_title( $item );
185
-				if ( '' !== $title ) {
181
+		if (false !== $items && ! empty($items) && '' !== $type) {
182
+			array_unique($items);
183
+			foreach ($items as $item) {
184
+				$title = get_the_title($item);
185
+				if ('' !== $title) {
186 186
 					$item_schema = array(
187 187
 						'@type' => $type,
188 188
 						'name'  => $title,
189 189
 					);
190
-					$schema[]    = $item_schema;
190
+					$schema[] = $item_schema;
191 191
 				}
192 192
 			}
193 193
 		}
@@ -203,18 +203,18 @@  discard block
 block discarded – undo
203 203
 	 *
204 204
 	 * @return mixed array $data Review data.
205 205
 	 */
206
-	public static function add_terms( $data, $post_id, $key, $taxonomy ) {
207
-		$terms = get_the_terms( $post_id, $taxonomy );
208
-		if ( is_array( $terms ) ) {
206
+	public static function add_terms($data, $post_id, $key, $taxonomy) {
207
+		$terms = get_the_terms($post_id, $taxonomy);
208
+		if (is_array($terms)) {
209 209
 			$keywords = array();
210
-			foreach ( $terms as $term ) {
210
+			foreach ($terms as $term) {
211 211
 				// We are checking against the WordPress internal translation.
212 212
 				// @codingStandardsIgnoreLine
213
-				if ( __( 'Uncategorized', 'lsx' ) !== $term->name ) {
213
+				if (__('Uncategorized', 'lsx') !== $term->name) {
214 214
 					$keywords[] = $term->name;
215 215
 				}
216 216
 			}
217
-			$data[ $key ] = implode( ',', $keywords );
217
+			$data[$key] = implode(',', $keywords);
218 218
 		}
219 219
 		return $data;
220 220
 	}
Please login to merge, or discard this patch.
single.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 	<?php lsx_content_before(); ?>
15 15
 
@@ -17,18 +17,18 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<?php lsx_content_top(); ?>
19 19
 
20
-		<?php if ( have_posts() ) : ?>
20
+		<?php if (have_posts()) : ?>
21 21
 
22 22
 			<?php
23
-			while ( have_posts() ) :
23
+			while (have_posts()) :
24 24
 				the_post();
25 25
 			?>
26 26
 
27 27
 				<?php
28
-				if ( is_singular( 'post' ) ) {
29
-					get_template_part( 'partials/content', 'post' );
28
+				if (is_singular('post')) {
29
+					get_template_part('partials/content', 'post');
30 30
 				} else {
31
-					get_template_part( 'partials/content', 'custom' );
31
+					get_template_part('partials/content', 'custom');
32 32
 				}
33 33
 				?>
34 34
 
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	<?php lsx_content_after(); ?>
44 44
 
45 45
 	<?php
46
-	if ( is_singular( 'post' ) ) {
46
+	if (is_singular('post')) {
47 47
 		lsx_post_nav();
48 48
 	}
49 49
 	?>
50 50
 
51 51
 	<?php
52
-	if ( comments_open() ) {
52
+	if (comments_open()) {
53 53
 		comments_template();
54 54
 	}
55 55
 	?>
Please login to merge, or discard this patch.
page-templates/template-full-width-no-margins.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<?php lsx_content_top(); ?>
22 22
 
23
-		<?php if ( have_posts() ) : ?>
23
+		<?php if (have_posts()) : ?>
24 24
 
25 25
 			<?php
26
-			while ( have_posts() ) :
26
+			while (have_posts()) :
27 27
 				the_post();
28 28
 				?>
29 29
 
30
-				<?php get_template_part( 'partials/content', 'page' ); ?>
30
+				<?php get_template_part('partials/content', 'page'); ?>
31 31
 
32 32
 			<?php endwhile; ?>
33 33
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		<?php lsx_content_bottom(); ?>
37 37
 
38 38
 		<?php
39
-		if ( comments_open() ) {
39
+		if (comments_open()) {
40 40
 			comments_template();
41 41
 		}
42 42
 		?>
Please login to merge, or discard this patch.
page-templates/template-sitemap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 <?php lsx_content_wrap_before(); ?>
14 14
 
15
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
15
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
16 16
 
17 17
 	<?php lsx_content_before(); ?>
18 18
 
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<?php lsx_content_top(); ?>
22 22
 
23
-		<?php if ( have_posts() ) : ?>
23
+		<?php if (have_posts()) : ?>
24 24
 
25 25
 			<?php
26
-			while ( have_posts() ) :
26
+			while (have_posts()) :
27 27
 				the_post();
28 28
 				?>
29 29
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 <?php lsx_content_wrap_after(); ?>
59 59
 
60
-<?php get_sidebar( 'sitemap' ); ?>
60
+<?php get_sidebar('sitemap'); ?>
61 61
 
62 62
 <?php
63 63
 get_footer();
Please login to merge, or discard this patch.
page-templates/template-front-page.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<?php lsx_content_top(); ?>
22 22
 
23
-		<?php if ( ( have_posts() && ! class_exists( 'LSX_Banners' ) || ( function_exists( 'has_blocks' ) && has_blocks() ) ) ) : ?>
23
+		<?php if ((have_posts() && ! class_exists('LSX_Banners') || (function_exists('has_blocks') && has_blocks()))) : ?>
24 24
 
25 25
 			<?php
26
-			while ( have_posts() ) :
26
+			while (have_posts()) :
27 27
 				the_post();
28 28
 				?>
29 29
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 						<?php
38 38
 							wp_link_pages(
39 39
 								array(
40
-									'before' => '<nav class="page-nav"><p>' . esc_html__( 'Pages:', 'lsx' ),
40
+									'before' => '<nav class="page-nav"><p>' . esc_html__('Pages:', 'lsx'),
41 41
 									'after'  => '</p></nav>',
42 42
 								)
43 43
 							);
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 
53 53
 		<?php endif; ?>
54 54
 
55
-		<?php if ( is_active_sidebar( 'sidebar-home' ) ) : ?>
55
+		<?php if (is_active_sidebar('sidebar-home')) : ?>
56 56
 
57 57
 			<div id="home-widgets">
58 58
 
59
-				<?php dynamic_sidebar( 'sidebar-home' ); ?>
59
+				<?php dynamic_sidebar('sidebar-home'); ?>
60 60
 
61 61
 			</div>
62 62
 
Please login to merge, or discard this patch.
page-templates/template-archives.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 <?php lsx_content_wrap_before(); ?>
14 14
 
15
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
15
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
16 16
 
17 17
 	<?php lsx_content_before(); ?>
18 18
 
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<?php lsx_content_top(); ?>
22 22
 
23
-		<?php if ( have_posts() ) : ?>
23
+		<?php if (have_posts()) : ?>
24 24
 
25 25
 			<?php
26
-			while ( have_posts() ) :
26
+			while (have_posts()) :
27 27
 				the_post();
28 28
 				?>
29 29
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 					<?php lsx_entry_top(); ?>
35 35
 
36 36
 					<div class="entry-content">
37
-						<h2><?php esc_html_e( 'The Last 30 Posts', 'lsx' ); ?></h2>
37
+						<h2><?php esc_html_e('The Last 30 Posts', 'lsx'); ?></h2>
38 38
 
39 39
 						<ul>
40 40
 							<?php
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
 								);
46 46
 							?>
47 47
 
48
-							<?php if ( $loop->have_posts() ) : ?>
48
+							<?php if ($loop->have_posts()) : ?>
49 49
 
50
-								<?php while ( $loop->have_posts() ) : ?>
50
+								<?php while ($loop->have_posts()) : ?>
51 51
 
52 52
 									<?php
53 53
 										$loop->the_post();
54 54
 										$loop->is_home = false;
55 55
 									?>
56 56
 
57
-									<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time( get_option( 'date_format' ) ); ?> - <?php echo esc_html( $post->comment_count ); ?> <?php esc_html_e( 'comments', 'lsx' ); ?></li>
57
+									<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time(get_option('date_format')); ?> - <?php echo esc_html($post->comment_count); ?> <?php esc_html_e('comments', 'lsx'); ?></li>
58 58
 
59 59
 								<?php endwhile; ?>
60 60
 
@@ -63,16 +63,16 @@  discard block
 block discarded – undo
63 63
 							<?php wp_reset_postdata(); ?>
64 64
 						</ul>
65 65
 
66
-						<h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2>
66
+						<h2><?php esc_html_e('Categories', 'lsx'); ?></h2>
67 67
 
68 68
 						<ul>
69
-							<?php wp_list_categories( 'title_li=&hierarchical=0&show_count=1' ); ?>
69
+							<?php wp_list_categories('title_li=&hierarchical=0&show_count=1'); ?>
70 70
 						</ul>
71 71
 
72
-						<h2><?php esc_html_e( 'Monthly Archives', 'lsx' ); ?></h2>
72
+						<h2><?php esc_html_e('Monthly Archives', 'lsx'); ?></h2>
73 73
 
74 74
 						<ul>
75
-							<?php wp_get_archives( 'type=monthly&show_post_count=1' ); ?>
75
+							<?php wp_get_archives('type=monthly&show_post_count=1'); ?>
76 76
 						</ul>
77 77
 					</div><!-- .entry-content -->
78 78
 
Please login to merge, or discard this patch.
partials/content-post.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,31 +17,31 @@
 block discarded – undo
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
 				?>
Please login to merge, or discard this patch.
partials/content-widget-review.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,42 +5,42 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
partials/content-widget-product.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,42 +15,42 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.