Passed
Pull Request — master (#325)
by Virginia
01:56
created
footer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 					<div class="col-sm-12">
21 21
 						<?php lsx_footer_top(); ?>
22 22
 
23
-						<p class="credit <?php if ( has_nav_menu( 'social' ) || has_nav_menu( 'footer' ) ) echo 'credit-float'; ?>">
23
+						<p class="credit <?php if (has_nav_menu('social') || has_nav_menu('footer')) echo 'credit-float'; ?>">
24 24
 							<?php
25 25
 								printf(
26 26
 									/* Translators: 1: current year, 2: blog name */
27
-									esc_html__( '&#169; %1$s %2$s All Rights Reserved', 'lsx' ),
28
-									esc_html( date_i18n( 'Y' ) ),
29
-									esc_html( get_bloginfo( 'name' ) )
27
+									esc_html__('&#169; %1$s %2$s All Rights Reserved', 'lsx'),
28
+									esc_html(date_i18n('Y')),
29
+									esc_html(get_bloginfo('name'))
30 30
 								);
31 31
 								?>
32 32
 
33
-							<?php if ( apply_filters( 'lsx_credit_link', true ) ) : ?>
33
+							<?php if (apply_filters('lsx_credit_link', true)) : ?>
34 34
 								<?php
35 35
 									printf(
36 36
 										/* Translators: 1: theme name, 2: author name and link */
37
-										esc_html__( ' | %1$s is a WordPress theme developed by %2$s.', 'lsx' ),
37
+										esc_html__(' | %1$s is a WordPress theme developed by %2$s.', 'lsx'),
38 38
 										'LSX',
39 39
 										'<a href="https://www.lsdev.biz/" rel="nofollow noreferrer noopener" title="LightSpeed WordPress Development - Unlocking the full value of your business, online" rel="author nofollow noopener noreferrer" >LightSpeed</a>'
40 40
 									);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 							<?php endif; ?>
43 43
 						</p>
44 44
 
45
-						<?php if ( has_nav_menu( 'social' ) ) : ?>
45
+						<?php if (has_nav_menu('social')) : ?>
46 46
 							<nav id="social-navigation" class="social-navigation">
47 47
 								<?php
48 48
 									wp_nav_menu(
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 							</nav><!-- .social-navigation -->
56 56
 						<?php endif; ?>
57 57
 
58
-						<?php if ( has_nav_menu( 'footer' ) ) : ?>
58
+						<?php if (has_nav_menu('footer')) : ?>
59 59
 							<nav id="footer-navigation" class="footer-navigation">
60 60
 								<?php
61 61
 									wp_nav_menu(
Please login to merge, or discard this patch.
includes/hooks.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage hooks
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 function lsx_body_top() {
20
-	do_action( 'lsx_body_top' );
20
+	do_action('lsx_body_top');
21 21
 }
22 22
 
23 23
 function lsx_body_bottom() {
24
-	do_action( 'lsx_body_bottom' );
24
+	do_action('lsx_body_bottom');
25 25
 }
26 26
 
27 27
 /**
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
  */
32 32
 
33 33
 function lsx_head_top() {
34
-	do_action( 'lsx_head_top' );
34
+	do_action('lsx_head_top');
35 35
 }
36 36
 
37 37
 function lsx_head_bottom() {
38
-	do_action( 'lsx_head_bottom' );
38
+	do_action('lsx_head_bottom');
39 39
 }
40 40
 
41 41
 /**
@@ -45,27 +45,27 @@  discard block
 block discarded – undo
45 45
  */
46 46
 
47 47
 function lsx_header_before() {
48
-	do_action( 'lsx_header_before' );
48
+	do_action('lsx_header_before');
49 49
 }
50 50
 
51 51
 function lsx_header_after() {
52
-	do_action( 'lsx_header_after' );
52
+	do_action('lsx_header_after');
53 53
 }
54 54
 
55 55
 function lsx_header_top() {
56
-	do_action( 'lsx_header_top' );
56
+	do_action('lsx_header_top');
57 57
 }
58 58
 
59 59
 function lsx_header_bottom() {
60
-	do_action( 'lsx_header_bottom' );
60
+	do_action('lsx_header_bottom');
61 61
 }
62 62
 
63 63
 function lsx_nav_before() {
64
-	do_action( 'lsx_nav_before' );
64
+	do_action('lsx_nav_before');
65 65
 }
66 66
 
67 67
 function lsx_nav_after() {
68
-	do_action( 'lsx_nav_after' );
68
+	do_action('lsx_nav_after');
69 69
 }
70 70
 
71 71
 /**
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
  */
76 76
 
77 77
 function lsx_banner_content() {
78
-	do_action( 'lsx_banner_content' );
78
+	do_action('lsx_banner_content');
79 79
 }
80 80
 
81 81
 function lsx_banner_inner_top() {
82
-	do_action( 'lsx_banner_inner_top' );
82
+	do_action('lsx_banner_inner_top');
83 83
 }
84 84
 
85 85
 function lsx_banner_inner_bottom() {
86
-	do_action( 'lsx_banner_inner_bottom' );
86
+	do_action('lsx_banner_inner_bottom');
87 87
 }
88 88
 
89 89
 /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
  */
94 94
 
95 95
 function lsx_global_header_inner_bottom() {
96
-	do_action( 'lsx_global_header_inner_bottom' );
96
+	do_action('lsx_global_header_inner_bottom');
97 97
 }
98 98
 
99 99
 /**
@@ -103,35 +103,35 @@  discard block
 block discarded – undo
103 103
  */
104 104
 
105 105
 function lsx_content_wrap_before() {
106
-	do_action( 'lsx_content_wrap_before' );
106
+	do_action('lsx_content_wrap_before');
107 107
 }
108 108
 
109 109
 function lsx_content_wrap_after() {
110
-	do_action( 'lsx_content_wrap_after' );
110
+	do_action('lsx_content_wrap_after');
111 111
 }
112 112
 
113 113
 function lsx_content_before() {
114
-	do_action( 'lsx_content_before' );
114
+	do_action('lsx_content_before');
115 115
 }
116 116
 
117 117
 function lsx_content_after() {
118
-	do_action( 'lsx_content_after' );
118
+	do_action('lsx_content_after');
119 119
 }
120 120
 
121 121
 function lsx_content_top() {
122
-	do_action( 'lsx_content_top' );
122
+	do_action('lsx_content_top');
123 123
 }
124 124
 
125 125
 function lsx_content_bottom() {
126
-	do_action( 'lsx_content_bottom' );
126
+	do_action('lsx_content_bottom');
127 127
 }
128 128
 
129 129
 function lsx_content_post_tags() {
130
-	do_action( 'lsx_content_post_tags' );
130
+	do_action('lsx_content_post_tags');
131 131
 }
132 132
 
133 133
 function lsx_content_sharing() {
134
-	do_action( 'lsx_content_sharing' );
134
+	do_action('lsx_content_sharing');
135 135
 }
136 136
 
137 137
 /**
@@ -141,19 +141,19 @@  discard block
 block discarded – undo
141 141
  */
142 142
 
143 143
 function lsx_entry_before() {
144
-	do_action( 'lsx_entry_before' );
144
+	do_action('lsx_entry_before');
145 145
 }
146 146
 
147 147
 function lsx_entry_after() {
148
-	do_action( 'lsx_entry_after' );
148
+	do_action('lsx_entry_after');
149 149
 }
150 150
 
151 151
 function lsx_entry_top() {
152
-	do_action( 'lsx_entry_top' );
152
+	do_action('lsx_entry_top');
153 153
 }
154 154
 
155 155
 function lsx_entry_bottom() {
156
-	do_action( 'lsx_entry_bottom' );
156
+	do_action('lsx_entry_bottom');
157 157
 }
158 158
 
159 159
 /**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
  */
162 162
 
163 163
 function lsx_post_meta_top() {
164
-	do_action( 'lsx_post_meta_top' );
164
+	do_action('lsx_post_meta_top');
165 165
 }
166 166
 
167 167
 /**
@@ -171,27 +171,27 @@  discard block
 block discarded – undo
171 171
  */
172 172
 
173 173
 function lsx_widget_entry_before() {
174
-	do_action( 'lsx_widget_entry_before' );
174
+	do_action('lsx_widget_entry_before');
175 175
 }
176 176
 
177 177
 function lsx_widget_entry_after() {
178
-	do_action( 'lsx_widget_entry_after' );
178
+	do_action('lsx_widget_entry_after');
179 179
 }
180 180
 
181 181
 function lsx_widget_entry_top() {
182
-	do_action( 'lsx_widget_entry_top' );
182
+	do_action('lsx_widget_entry_top');
183 183
 }
184 184
 
185 185
 function lsx_widget_entry_bottom() {
186
-	do_action( 'lsx_widget_entry_bottom' );
186
+	do_action('lsx_widget_entry_bottom');
187 187
 }
188 188
 
189 189
 function lsx_widget_entry_content_top() {
190
-	do_action( 'lsx_widget_entry_content_top' );
190
+	do_action('lsx_widget_entry_content_top');
191 191
 }
192 192
 
193 193
 function lsx_widget_entry_content_bottom() {
194
-	do_action( 'lsx_widget_entry_content_bottom' );
194
+	do_action('lsx_widget_entry_content_bottom');
195 195
 }
196 196
 
197 197
 /**
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
  */
202 202
 
203 203
 function lsx_comments_before() {
204
-	do_action( 'lsx_comments_before' );
204
+	do_action('lsx_comments_before');
205 205
 }
206 206
 
207 207
 function lsx_comments_after() {
208
-	do_action( 'lsx_comments_after' );
208
+	do_action('lsx_comments_after');
209 209
 }
210 210
 
211 211
 /**
@@ -215,19 +215,19 @@  discard block
 block discarded – undo
215 215
  */
216 216
 
217 217
 function lsx_sidebars_before() {
218
-	do_action( 'lsx_sidebars_before' );
218
+	do_action('lsx_sidebars_before');
219 219
 }
220 220
 
221 221
 function lsx_sidebars_after() {
222
-	do_action( 'lsx_sidebars_after' );
222
+	do_action('lsx_sidebars_after');
223 223
 }
224 224
 
225 225
 function lsx_sidebar_top() {
226
-	do_action( 'lsx_sidebar_top' );
226
+	do_action('lsx_sidebar_top');
227 227
 }
228 228
 
229 229
 function lsx_sidebar_bottom() {
230
-	do_action( 'lsx_sidebar_bottom' );
230
+	do_action('lsx_sidebar_bottom');
231 231
 }
232 232
 
233 233
 /**
@@ -237,17 +237,17 @@  discard block
 block discarded – undo
237 237
  */
238 238
 
239 239
 function lsx_footer_before() {
240
-	do_action( 'lsx_footer_before' );
240
+	do_action('lsx_footer_before');
241 241
 }
242 242
 
243 243
 function lsx_footer_after() {
244
-	do_action( 'lsx_footer_after' );
244
+	do_action('lsx_footer_after');
245 245
 }
246 246
 
247 247
 function lsx_footer_top() {
248
-	do_action( 'lsx_footer_top' );
248
+	do_action('lsx_footer_top');
249 249
 }
250 250
 
251 251
 function lsx_footer_bottom() {
252
-	do_action( 'lsx_footer_bottom' );
252
+	do_action('lsx_footer_bottom');
253 253
 }
Please login to merge, or discard this patch.
partials/content-none.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,25 +8,25 @@
 block discarded – undo
8 8
 
9 9
 <section class="no-results not-found">
10 10
 	<header class="page-header">
11
-		<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' ); ?></h1>
11
+		<h1 class="page-title"><?php esc_html_e('Nothing Found', 'lsx'); ?></h1>
12 12
 	</header><!-- .page-header -->
13 13
 
14 14
 	<div class="page-content">
15 15
 
16
-		<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
16
+		<?php if (is_home() && current_user_can('publish_posts')) : ?>
17 17
 
18
-			<p><?php esc_html_e( 'Ready to publish your first post?', 'lsx' ); ?> <a href="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>"><?php esc_html_e( 'Get started here', 'lsx' ); ?></a></p>
18
+			<p><?php esc_html_e('Ready to publish your first post?', 'lsx'); ?> <a href="<?php echo esc_url(admin_url('post-new.php')); ?>"><?php esc_html_e('Get started here', 'lsx'); ?></a></p>
19 19
 
20
-		<?php elseif ( is_search() ) : ?>
20
+		<?php elseif (is_search()) : ?>
21 21
 
22
-			<p><?php esc_html_e( 'Your search for "', 'lsx' ); ?><?php echo get_search_query(); ?><?php esc_html_e( '" didn’t return any results… ', 'lsx' ); ?><br><?php esc_html_e( 'Please try another keyword', 'lsx' ); ?></p>
22
+			<p><?php esc_html_e('Your search for "', 'lsx'); ?><?php echo get_search_query(); ?><?php esc_html_e('" didn’t return any results… ', 'lsx'); ?><br><?php esc_html_e('Please try another keyword', 'lsx'); ?></p>
23 23
 
24
-			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
24
+			<?php echo wp_kses_post(apply_filters('lsx_404_search_form', get_search_form())); ?>
25 25
 
26 26
 		<?php else : ?>
27 27
 
28
-			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
29
-			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
28
+			<p><?php esc_html_e('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx'); ?></p>
29
+			<?php echo wp_kses_post(apply_filters('lsx_404_search_form', get_search_form())); ?>
30 30
 
31 31
 		<?php endif; ?>
32 32
 
Please login to merge, or discard this patch.
includes/classes/class-lsx-nav-walker.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-if ( ! class_exists( 'Walker_Nav_Menu' ) ) {
14
+if ( ! class_exists('Walker_Nav_Menu')) {
15 15
 	return;
16 16
 }
17 17
 
18
-if ( ! class_exists( 'LSX_Nav_Walker' ) ) :
18
+if ( ! class_exists('LSX_Nav_Walker')) :
19 19
 
20 20
 	/**
21 21
 	 * Cleaner walker for wp_nav_menu()
@@ -34,46 +34,46 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	class LSX_Nav_Walker extends Walker_Nav_Menu {
36 36
 
37
-		function check_current( $classes ) {
38
-			return preg_match( '/^(current[-_])|active|dropdown$/', $classes );
37
+		function check_current($classes) {
38
+			return preg_match('/^(current[-_])|active|dropdown$/', $classes);
39 39
 		}
40 40
 
41
-		function start_lvl( &$output, $depth = 0, $args = array() ) {
41
+		function start_lvl(&$output, $depth = 0, $args = array()) {
42 42
 			$output .= "\n<ul class=\"dropdown-menu\">\n";
43 43
 		}
44 44
 
45
-		function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
45
+		function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) {
46 46
 			$item_html = '';
47 47
 
48
-			if ( isset( $item->title ) ) {
49
-				parent::start_el( $item_html, $item, $depth, $args );
48
+			if (isset($item->title)) {
49
+				parent::start_el($item_html, $item, $depth, $args);
50 50
 
51
-				if ( $item->is_dropdown && ( 0 === $depth ) ) {
52
-					$item_html = str_replace( '<a', '<a class="dropdown-toggle" data-target="#"', $item_html );
53
-					$item_html = str_replace( '</a>', ' <b class="caret"></b></a>', $item_html );
54
-				} elseif ( stristr( $item_html, 'li class="divider"' ) ) {
55
-					$item_html = preg_replace( '/<a[^>]*>.*?<\/a>/iU', '', $item_html );
56
-				} elseif ( stristr( $item_html, 'li class="dropdown-header"' ) ) {
57
-					$item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html );
51
+				if ($item->is_dropdown && (0 === $depth)) {
52
+					$item_html = str_replace('<a', '<a class="dropdown-toggle" data-target="#"', $item_html);
53
+					$item_html = str_replace('</a>', ' <b class="caret"></b></a>', $item_html);
54
+				} elseif (stristr($item_html, 'li class="divider"')) {
55
+					$item_html = preg_replace('/<a[^>]*>.*?<\/a>/iU', '', $item_html);
56
+				} elseif (stristr($item_html, 'li class="dropdown-header"')) {
57
+					$item_html = preg_replace('/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html);
58 58
 				}
59 59
 
60
-				$item_html = apply_filters( 'lsx_wp_nav_menu_item', $item_html );
60
+				$item_html = apply_filters('lsx_wp_nav_menu_item', $item_html);
61 61
 				$output   .= $item_html;
62 62
 			}
63 63
 		}
64 64
 
65
-		function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
66
-			$element->is_dropdown = ( ( ! empty( $children_elements[ $element->ID ] ) && ( ( $depth + 1 ) < $max_depth || ( 0 === $max_depth ) ) ) );
65
+		function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {
66
+			$element->is_dropdown = (( ! empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth || (0 === $max_depth))));
67 67
 
68
-			if ( $element->is_dropdown ) {
69
-				if ( $depth > 0 ) {
68
+			if ($element->is_dropdown) {
69
+				if ($depth > 0) {
70 70
 					$element->classes[] = 'dropdown-submenu';
71 71
 				} else {
72 72
 					$element->classes[] = 'dropdown';
73 73
 				}
74 74
 			}
75 75
 
76
-			parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
76
+			parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
77 77
 		}
78 78
 
79 79
 	}
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
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if ( ! defined('ABSPATH')) {
3 3
 	exit;
4 4
 }
5 5
 
6 6
 global $comment, $stored_comment, $_product, $rating;
7 7
 $the_comment = $comment;
8
-if ( null !== $stored_comment ) {
8
+if (null !== $stored_comment) {
9 9
 	$the_comment = $stored_comment;
10 10
 }
11 11
 ?>
12 12
 
13 13
 <div class="lsx-woocommerce-review-slot">
14 14
 	<div class="lsx-woocommerce-review-flex">
15
-		<a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>">
15
+		<a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>">
16 16
 			<figure class="lsx-woocommerce-avatar">
17
-				<?php echo wp_kses_post( $_product->get_image( 'lsx-thumbnail-square' ) ); ?>
17
+				<?php echo wp_kses_post($_product->get_image('lsx-thumbnail-square')); ?>
18 18
 			</figure>
19 19
 		</a>
20 20
 
21 21
 		<div class="lsx-woocommerce-review-box">
22 22
 			<div class="lsx-woocommerce-rating">
23
-				<?php echo wp_kses_post( wc_get_rating_html( $rating ) ); ?>
23
+				<?php echo wp_kses_post(wc_get_rating_html($rating)); ?>
24 24
 			</div>
25 25
 
26 26
 			<h5 class="lsx-woocommerce-title">
27
-				<a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"><?php echo wp_kses_post( $_product->get_name() ); ?></a>
27
+				<a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"><?php echo wp_kses_post($_product->get_name()); ?></a>
28 28
 			</h5>
29 29
 
30 30
 			<p class="lsx-woocommerce-reviewer">
31 31
 				<?php
32 32
 					/* translators: %s: review author */
33
-					echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) );
33
+					echo wp_kses_post(esc_html__('by ', 'lsx') . get_comment_author($the_comment->comment_ID));
34 34
 				?>
35 35
 			</p>
36 36
 
37 37
 			<div class="lsx-woocommerce-content">
38
-				<p><?php echo wp_kses_post( $the_comment->comment_content ); ?></p>
39
-				<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>
38
+				<p><?php echo wp_kses_post($the_comment->comment_content); ?></p>
39
+				<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>
40 40
 			</div>
41 41
 		</div>
42 42
 	</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.
partials/content-related.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -17,38 +17,38 @@  discard block
 block discarded – undo
17 17
 			'quote' => 'quote',
18 18
 			'video' => 'video',
19 19
 		);
20
-	$no_thumb_post_formats = apply_filters( 'lsx_no_thumb_post_formats', $no_thumb_post_types );
20
+	$no_thumb_post_formats = apply_filters('lsx_no_thumb_post_formats', $no_thumb_post_types);
21 21
 
22
-	$has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats );
22
+	$has_thumb = has_post_thumbnail() && ! has_post_format($no_thumb_post_formats);
23 23
 
24
-	if ( $has_thumb ) {
24
+	if ($has_thumb) {
25 25
 		$thumb_class = 'has-thumb';
26 26
 	} else {
27 27
 		$thumb_class = 'no-thumb';
28 28
 	}
29 29
 
30
-	$blog_layout = apply_filters( 'lsx_blog_layout', 'default' );
30
+	$blog_layout = apply_filters('lsx_blog_layout', 'default');
31 31
 
32 32
 	$image_class = '';
33 33
 
34
-	$thumbnail_id = get_post_thumbnail_id( get_the_ID() );
35
-	$image_arr    = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' );
34
+	$thumbnail_id = get_post_thumbnail_id(get_the_ID());
35
+	$image_arr    = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single');
36 36
 
37
-	if ( is_array( $image_arr ) ) {
37
+	if (is_array($image_arr)) {
38 38
 		$image_src = $image_arr[0];
39 39
 	}
40 40
 ?>
41 41
 
42
-<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>>
42
+<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>>
43 43
 	<?php lsx_entry_top(); ?>
44 44
 
45 45
 	<div class="entry-layout">
46 46
 		<div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>">
47 47
 			<header class="entry-header">
48
-				<?php if ( $has_thumb ) : ?>
49
-					<div class="entry-image <?php echo esc_attr( $image_class ); ?>">
48
+				<?php if ($has_thumb) : ?>
49
+					<div class="entry-image <?php echo esc_attr($image_class); ?>">
50 50
 						<a class="thumbnail" href="<?php the_permalink(); ?>">
51
-							<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
51
+							<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
52 52
 						</a>
53 53
 					</div>
54 54
 				<?php endif; ?>
@@ -56,37 +56,37 @@  discard block
 block discarded – undo
56 56
 				<?php
57 57
 					$format = get_post_format();
58 58
 
59
-					if ( false === $format ) {
59
+					if (false === $format) {
60 60
 						$format = 'standard';
61
-						$show_on_front = get_option( 'show_on_front', 'posts' );
61
+						$show_on_front = get_option('show_on_front', 'posts');
62 62
 
63
-						if ( 'page' === $show_on_front ) {
64
-							$archive_link = get_permalink( get_option( 'page_for_posts' ) );
63
+						if ('page' === $show_on_front) {
64
+							$archive_link = get_permalink(get_option('page_for_posts'));
65 65
 						} else {
66 66
 							$archive_link = home_url();
67 67
 						}
68 68
 					} else {
69
-						$archive_link = get_post_format_link( $format );
69
+						$archive_link = get_post_format_link($format);
70 70
 					}
71 71
 
72
-					$format = lsx_translate_format_to_fontawesome( $format );
72
+					$format = lsx_translate_format_to_fontawesome($format);
73 73
 				?>
74 74
 
75 75
 				<h2 class="entry-title">
76
-					<?php if ( has_post_thumbnail() ) : ?>
77
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a>
76
+					<?php if (has_post_thumbnail()) : ?>
77
+						<a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a>
78 78
 					<?php else : ?>
79
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a>
79
+						<a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a>
80 80
 					<?php endif; ?>
81 81
 
82
-					<?php if ( has_post_format( array( 'link' ) ) ) : ?>
83
-						<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
82
+					<?php if (has_post_format(array('link'))) : ?>
83
+						<a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
84 84
 					<?php else : ?>
85 85
 						<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
86 86
 					<?php endif; ?>
87 87
 
88
-					<?php if ( is_sticky() ) : ?>
89
-						<span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span>
88
+					<?php if (is_sticky()) : ?>
89
+						<span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span>
90 90
 					<?php endif; ?>
91 91
 				</h2>
92 92
 				<div class="entry-meta">
@@ -97,27 +97,27 @@  discard block
 block discarded – undo
97 97
 
98 98
 			</header><!-- .entry-header -->
99 99
 
100
-			<?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?>
100
+			<?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?>
101 101
 
102
-				<?php if ( lsx_post_format_force_content_on_list() && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
102
+				<?php if (lsx_post_format_force_content_on_list() && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?>
103 103
 
104 104
 					<div class="entry-summary">
105 105
 					<?php
106
-					if ( ! has_excerpt() ) {
106
+					if ( ! has_excerpt()) {
107 107
 
108
-						$excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>';
109
-						$content      = wp_trim_words( get_the_content(), 50 );
108
+						$excerpt_more = '<p><a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('Read More', 'lsx') . '</a></p>';
109
+						$content      = wp_trim_words(get_the_content(), 50);
110 110
 						$content      = '<p>' . $content . '</p>' . $excerpt_more;
111
-						echo wp_kses_post( $content );
111
+						echo wp_kses_post($content);
112 112
 					} else {
113 113
 						the_excerpt();
114 114
 					}
115 115
 					?>
116 116
 					</div><!-- .entry-summary -->
117 117
 
118
-				<?php elseif ( has_post_format( array( 'link' ) ) ) : ?>
118
+				<?php elseif (has_post_format(array('link'))) : ?>
119 119
 
120
-				<?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
120
+				<?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?>
121 121
 
122 122
 					<div class="entry-content">
123 123
 						<?php the_content(); ?>
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
 						<?php
130 130
 							the_content();
131 131
 
132
-							wp_link_pages( array(
132
+							wp_link_pages(array(
133 133
 								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
134 134
 								'after'       => '</div></div>',
135 135
 								'link_before' => '<span>',
136 136
 								'link_after'  => '</span>',
137
-							) );
137
+							));
138 138
 						?>
139 139
 					</div><!-- .entry-content -->
140 140
 
@@ -150,23 +150,23 @@  discard block
 block discarded – undo
150 150
 
151 151
 				<?php lsx_content_post_tags(); ?>
152 152
 
153
-				<?php if ( comments_open() && ! empty( $comments_number ) ) : ?>
153
+				<?php if (comments_open() && ! empty($comments_number)) : ?>
154 154
 					<div class="post-comments">
155 155
 						<a href="<?php the_permalink(); ?>#comments">
156 156
 							<?php
157
-								if ( '1' === $comments_number ) {
158
-									echo esc_html_x( 'One Comment', 'content.php', 'lsx' );
157
+								if ('1' === $comments_number) {
158
+									echo esc_html_x('One Comment', 'content.php', 'lsx');
159 159
 								} else {
160 160
 									printf(
161 161
 										/* Translators: %s: number of comments */
162
-										esc_html( _nx(
162
+										esc_html(_nx(
163 163
 											'%s Comment',
164 164
 											'%s Comments',
165 165
 											$comments_number,
166 166
 											'content.php',
167 167
 											'lsx'
168
-										) ),
169
-										esc_html( number_format_i18n( $comments_number ) )
168
+										)),
169
+										esc_html(number_format_i18n($comments_number))
170 170
 									);
171 171
 								}
172 172
 							?>
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
 			</div>
177 177
 		</div>
178 178
 
179
-		<?php if ( has_post_thumbnail() ) : ?>
179
+		<?php if (has_post_thumbnail()) : ?>
180 180
 
181 181
 			<div class="entry-image hidden-xs">
182
-				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);">
183
-					<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
182
+				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);">
183
+					<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
184 184
 				</a>
185 185
 			</div>
186 186
 
Please login to merge, or discard this patch.
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 ( $term->name !== __( 'Uncategorized' ) ) {
213
+				if ($term->name !== __('Uncategorized')) {
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.
includes/deprecated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @subpackage deprecated
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
Please login to merge, or discard this patch.