Passed
Pull Request — master (#312)
by Warwick
02:11
created
page-templates/template-full-width.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.
includes/layout.php 1 patch
Spacing   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@  discard block
 block discarded – undo
6 6
  * @subpackage layout
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_layout_selector' ) ) :
13
+if ( ! function_exists('lsx_layout_selector')) :
14 14
 	/**
15 15
 	 * Layout selector.
16 16
 	 *
17 17
 	 * @package    lsx
18 18
 	 * @subpackage layout
19 19
 	 */
20
-	function lsx_layout_selector( $class, $area = 'site' ) {
20
+	function lsx_layout_selector($class, $area = 'site') {
21 21
 		$return_class = '';
22
-		$layout       = get_theme_mod( 'lsx_layout', '1c' );
23
-		$layout       = apply_filters( 'lsx_layout', $layout );
22
+		$layout       = get_theme_mod('lsx_layout', '1c');
23
+		$layout       = apply_filters('lsx_layout', $layout);
24 24
 		$default_size = 'sm';
25
-		$size         = apply_filters( 'lsx_bootstrap_column_size', $default_size );
25
+		$size         = apply_filters('lsx_bootstrap_column_size', $default_size);
26 26
 
27
-		switch ( $layout ) {
27
+		switch ($layout) {
28 28
 			case '1c':
29 29
 				$main_class    = 'col-' . $size . '-12';
30 30
 				$sidebar_class = 'col-' . $size . '-12';
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
 				break;
44 44
 		}
45 45
 
46
-		if ( 'main' === $class ) {
47
-			$return_class = apply_filters( 'lsx_layout_selector', $main_class, $class, $layout, $size );
46
+		if ('main' === $class) {
47
+			$return_class = apply_filters('lsx_layout_selector', $main_class, $class, $layout, $size);
48 48
 		}
49 49
 
50
-		if ( 'sidebar' === $class ) {
51
-			$return_class = apply_filters( 'lsx_layout_selector', $sidebar_class, $class, $layout, $size );
50
+		if ('sidebar' === $class) {
51
+			$return_class = apply_filters('lsx_layout_selector', $sidebar_class, $class, $layout, $size);
52 52
 		}
53 53
 
54 54
 		return $return_class;
55 55
 	}
56 56
 endif;
57 57
 
58
-if ( ! function_exists( 'lsx_main_class' ) ) :
58
+if ( ! function_exists('lsx_main_class')) :
59 59
 	/**
60 60
 	 * .main classes.
61 61
 	 *
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 	 * @subpackage layout
64 64
 	 */
65 65
 	function lsx_main_class() {
66
-		return lsx_layout_selector( 'main' );
66
+		return lsx_layout_selector('main');
67 67
 	}
68 68
 endif;
69 69
 
70
-if ( ! function_exists( 'lsx_sidebar_class' ) ) :
70
+if ( ! function_exists('lsx_sidebar_class')) :
71 71
 	/**
72 72
 	 * .sidebar classes.
73 73
 	 *
@@ -75,47 +75,47 @@  discard block
 block discarded – undo
75 75
 	 * @subpackage layout
76 76
 	 */
77 77
 	function lsx_sidebar_class() {
78
-		return lsx_layout_selector( 'sidebar' );
78
+		return lsx_layout_selector('sidebar');
79 79
 	}
80 80
 endif;
81 81
 
82
-if ( ! function_exists( 'lsx_header_classes' ) ) :
82
+if ( ! function_exists('lsx_header_classes')) :
83 83
 	/**
84 84
 	 * Output the classes for the header.
85 85
 	 *
86 86
 	 * @package    lsx
87 87
 	 * @subpackage layout
88 88
 	 */
89
-	function lsx_header_classes( $additional = false ) {
89
+	function lsx_header_classes($additional = false) {
90 90
 		$classes = 'banner navbar navbar-default';
91 91
 
92
-		if ( false !== $additional ) {
92
+		if (false !== $additional) {
93 93
 			$classes .= ' ' . $additional;
94 94
 		}
95 95
 
96
-		echo esc_attr( $classes );
96
+		echo esc_attr($classes);
97 97
 	}
98 98
 endif;
99 99
 
100
-if ( ! function_exists( 'lsx_top_menu_classes' ) ) :
100
+if ( ! function_exists('lsx_top_menu_classes')) :
101 101
 	/**
102 102
 	 * Output the classes for the top-menu.
103 103
 	 *
104 104
 	 * @package    lsx
105 105
 	 * @subpackage layout
106 106
 	 */
107
-	function lsx_top_menu_classes( $additional = false ) {
107
+	function lsx_top_menu_classes($additional = false) {
108 108
 		$classes = 'top-menu-default';
109 109
 
110
-		if ( false !== $additional ) {
110
+		if (false !== $additional) {
111 111
 			$classes .= ' ' . $additional;
112 112
 		}
113 113
 
114
-		echo esc_attr( $classes );
114
+		echo esc_attr($classes);
115 115
 	}
116 116
 endif;
117 117
 
118
-if ( ! function_exists( 'lsx_add_footer_sidebar_area' ) ) :
118
+if ( ! function_exists('lsx_add_footer_sidebar_area')) :
119 119
 	/**
120 120
 	 * Output the Footer CTA and/pr Footer Widgets.
121 121
 	 *
@@ -123,33 +123,33 @@  discard block
 block discarded – undo
123 123
 	 * @subpackage layout
124 124
 	 */
125 125
 	function lsx_add_footer_sidebar_area() {
126
-		if ( is_active_sidebar( 'sidebar-footer-cta' ) ) : ?>
126
+		if (is_active_sidebar('sidebar-footer-cta')) : ?>
127 127
 			<div id="footer-cta">
128 128
 				<div class="container">
129 129
 					<div class="lsx-full-width">
130 130
 						<div class="lsx-hero-unit">
131
-							<?php dynamic_sidebar( 'sidebar-footer-cta' ); ?>
131
+							<?php dynamic_sidebar('sidebar-footer-cta'); ?>
132 132
 						</div>
133 133
 					</div>
134 134
 				</div>
135 135
 			</div>
136 136
 		<?php endif; ?>
137 137
 
138
-		<?php if ( is_active_sidebar( 'sidebar-footer' ) ) : ?>
138
+		<?php if (is_active_sidebar('sidebar-footer')) : ?>
139 139
 			<div id="footer-widgets">
140 140
 				<div class="container">
141 141
 					<div class="row">
142
-						<?php dynamic_sidebar( 'sidebar-footer' ); ?>
142
+						<?php dynamic_sidebar('sidebar-footer'); ?>
143 143
 					</div>
144 144
 				</div>
145 145
 			</div>
146 146
 			<?php
147 147
 		endif;
148 148
 	}
149
-	add_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
149
+	add_action('lsx_footer_before', 'lsx_add_footer_sidebar_area');
150 150
 endif;
151 151
 
152
-if ( ! function_exists( 'lsx_global_header' ) ) :
152
+if ( ! function_exists('lsx_global_header')) :
153 153
 	/**
154 154
 	 * Displays the global header.
155 155
 	 *
@@ -157,23 +157,23 @@  discard block
 block discarded – undo
157 157
 	 * @subpackage layout
158 158
 	 */
159 159
 	function lsx_global_header() {
160
-		$show_on_front  = get_option( 'show_on_front' );
160
+		$show_on_front  = get_option('show_on_front');
161 161
 		$queried_object = get_queried_object();
162 162
 		$default_size   = 'sm';
163
-		$size           = apply_filters( 'lsx_bootstrap_column_size', $default_size );
163
+		$size           = apply_filters('lsx_bootstrap_column_size', $default_size);
164 164
 
165 165
 		// Pages have their own banner function 'lsx_page_banner()'
166 166
 		// if ( function_exists( 'is_woocommerce' ) && ( is_woocommerce() || is_checkout() || is_cart() || is_account_page() ) ) {
167 167
 		// return;
168 168
 		// }
169 169
 		// Product pages have their own banner function 'lsx_page_banner()'.
170
-		if ( function_exists( 'is_woocommerce' ) && ( is_product() ) ) {
170
+		if (function_exists('is_woocommerce') && (is_product())) {
171 171
 			return;
172 172
 		}
173 173
 
174
-		if ( is_page() && ( 'page' !== $show_on_front || ! is_front_page() ) ) :
174
+		if (is_page() && ('page' !== $show_on_front || ! is_front_page())) :
175 175
 			?>
176
-			<div class="archive-header-wrapper banner-page col-<?php echo esc_attr( $size ); ?>-12">
176
+			<div class="archive-header-wrapper banner-page col-<?php echo esc_attr($size); ?>-12">
177 177
 				<?php lsx_global_header_inner_bottom(); ?>
178 178
 				<header class="archive-header">
179 179
 					<h1 class="archive-title"><?php the_title(); ?></h1>
@@ -181,26 +181,26 @@  discard block
 block discarded – undo
181 181
 
182 182
 			</div>
183 183
 			<?php
184
-		elseif ( is_single() && ! is_singular( 'post' ) ) :
184
+		elseif (is_single() && ! is_singular('post')) :
185 185
 			?>
186
-			<div class="archive-header-wrapper banner-single col-<?php echo esc_attr( $size ); ?>-12">
186
+			<div class="archive-header-wrapper banner-single col-<?php echo esc_attr($size); ?>-12">
187 187
 				<?php lsx_global_header_inner_bottom(); ?>
188 188
 				<header class="archive-header">
189
-					<h1 class="archive-title"><?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_title() ) ); ?></h1>
189
+					<h1 class="archive-title"><?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_title())); ?></h1>
190 190
 				</header>
191 191
 
192 192
 			</div>
193 193
 			<?php
194
-		elseif ( is_search() ) :
194
+		elseif (is_search()) :
195 195
 			?>
196
-			<div class="archive-header-wrapper banner-search col-<?php echo esc_attr( $size ); ?>-12">
196
+			<div class="archive-header-wrapper banner-search col-<?php echo esc_attr($size); ?>-12">
197 197
 				<?php lsx_global_header_inner_bottom(); ?>
198 198
 				<header class="archive-header">
199 199
 					<h1 class="archive-title">
200 200
 						<?php
201 201
 							printf(
202 202
 								/* Translators: %s: search term/query */
203
-								esc_html__( 'Search Results for: %s', 'lsx' ),
203
+								esc_html__('Search Results for: %s', 'lsx'),
204 204
 								'<span>' . get_search_query() . '</span>'
205 205
 							);
206 206
 						?>
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
 
210 210
 			</div>
211 211
 			<?php
212
-		elseif ( is_author() ) :
212
+		elseif (is_author()) :
213 213
 			$author        = get_the_author();
214
-			$author_avatar = get_avatar( get_the_author_meta( 'ID' ), 256 );
214
+			$author_avatar = get_avatar(get_the_author_meta('ID'), 256);
215 215
 			$author_bio    = get_the_archive_description();
216 216
 			?>
217
-			<div class="archive-header-wrapper banner-archive-author col-<?php echo esc_attr( $size ); ?>-12">
217
+			<div class="archive-header-wrapper banner-archive-author col-<?php echo esc_attr($size); ?>-12">
218 218
 				<?php lsx_global_header_inner_bottom(); ?>
219 219
 				<header class="archive-header">
220 220
 					<h1 class="archive-title"><?php the_archive_title(); ?></h1>
@@ -222,57 +222,57 @@  discard block
 block discarded – undo
222 222
 
223 223
 			</div>
224 224
 			<?php
225
-		elseif ( is_archive() ) :
225
+		elseif (is_archive()) :
226 226
 			?>
227
-			<div class="archive-header-wrapper banner-archive col-<?php echo esc_attr( $size ); ?>-12">
227
+			<div class="archive-header-wrapper banner-archive col-<?php echo esc_attr($size); ?>-12">
228 228
 				<?php lsx_global_header_inner_bottom(); ?>
229 229
 				<header class="archive-header">
230 230
 					<h1 class="archive-title">
231
-						<?php if ( has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax( 'post_format' ) ) { ?>
232
-							<?php the_archive_title( esc_html__( 'Type:', 'lsx' ) ); ?>
231
+						<?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?>
232
+							<?php the_archive_title(esc_html__('Type:', 'lsx')); ?>
233 233
 						<?php } else { ?>
234
-							<?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_archive_title() ) ); ?>
234
+							<?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_archive_title())); ?>
235 235
 						<?php } ?>
236 236
 					</h1>
237 237
 
238 238
 					<?php
239
-					if ( false === apply_filters( 'lsx_display_global_header_description', false ) ) {
239
+					if (false === apply_filters('lsx_display_global_header_description', false)) {
240 240
 						the_archive_description();
241 241
 					}
242 242
 					?>
243 243
 				</header>
244 244
 			</div>
245 245
 			<?php
246
-		elseif ( 'page' === $show_on_front && (int) get_option( 'page_for_posts' ) === $queried_object->ID ) :
246
+		elseif ('page' === $show_on_front && (int) get_option('page_for_posts') === $queried_object->ID) :
247 247
 			?>
248
-			<div class="archive-header-wrapper banner-page col-<?php echo esc_attr( $size ); ?>-12">
248
+			<div class="archive-header-wrapper banner-page col-<?php echo esc_attr($size); ?>-12">
249 249
 				<?php lsx_global_header_inner_bottom(); ?>
250 250
 				<header class="archive-header">
251
-					<h1 class="archive-title"><?php esc_html_e( 'Blog', 'lsx' ); ?></h1>
251
+					<h1 class="archive-title"><?php esc_html_e('Blog', 'lsx'); ?></h1>
252 252
 				</header>
253 253
 
254 254
 			</div>
255 255
 			<?php
256
-		elseif ( ! is_singular( 'post' ) ) :
256
+		elseif ( ! is_singular('post')) :
257 257
 			// Display only the breadcrumbs.
258 258
 			?>
259
-			<div class="archive-header-wrapper banner-singular col-<?php echo esc_attr( $size ); ?>-12">
259
+			<div class="archive-header-wrapper banner-singular col-<?php echo esc_attr($size); ?>-12">
260 260
 				<?php lsx_global_header_inner_bottom(); ?>
261 261
 			</div>
262 262
 			<?php
263
-		elseif ( ( true === apply_filters( 'lsx_global_header_disable', false ) ) && ( ! is_search() ) ) :
263
+		elseif ((true === apply_filters('lsx_global_header_disable', false)) && ( ! is_search())) :
264 264
 			// Display only the breadcrumbs.
265 265
 			?>
266
-			<div class="archive-header-wrapper banner-global col-<?php echo esc_attr( $size ); ?>-12">
266
+			<div class="archive-header-wrapper banner-global col-<?php echo esc_attr($size); ?>-12">
267 267
 				<?php lsx_global_header_inner_bottom(); ?>
268 268
 			</div>
269 269
 			<?php
270 270
 		endif;
271 271
 	}
272
-	add_action( 'lsx_content_wrap_before', 'lsx_global_header' );
272
+	add_action('lsx_content_wrap_before', 'lsx_global_header');
273 273
 endif;
274 274
 
275
-if ( ! function_exists( 'lsx_author_extra_info' ) ) :
275
+if ( ! function_exists('lsx_author_extra_info')) :
276 276
 	/**
277 277
 	 * Displays the author extra info.
278 278
 	 *
@@ -281,83 +281,83 @@  discard block
 block discarded – undo
281 281
 	 */
282 282
 	function lsx_author_extra_info() {
283 283
 		$default_size = 'sm';
284
-		$size         = apply_filters( 'lsx_bootstrap_column_size', $default_size );
284
+		$size         = apply_filters('lsx_bootstrap_column_size', $default_size);
285 285
 
286
-		if ( is_author() ) :
287
-			$author_id         = get_the_author_meta( 'ID' );
286
+		if (is_author()) :
287
+			$author_id         = get_the_author_meta('ID');
288 288
 			$author            = get_the_author();
289
-			$author_avatar     = get_avatar( $author_id, 400 );
289
+			$author_avatar     = get_avatar($author_id, 400);
290 290
 			$author_bio        = get_the_archive_description();
291
-			$author_url        = get_the_author_meta( 'url', $author_id );
292
-			$author_email      = get_the_author_meta( 'email', $author_id );
293
-			$author_facebook   = get_the_author_meta( 'facebook', $author_id );
294
-			$author_linkedin   = get_the_author_meta( 'linkedin', $author_id );
295
-			$author_twitter    = get_the_author_meta( 'twitter', $author_id );
296
-			$author_googleplus = get_the_author_meta( 'googleplus', $author_id );
291
+			$author_url        = get_the_author_meta('url', $author_id);
292
+			$author_email      = get_the_author_meta('email', $author_id);
293
+			$author_facebook   = get_the_author_meta('facebook', $author_id);
294
+			$author_linkedin   = get_the_author_meta('linkedin', $author_id);
295
+			$author_twitter    = get_the_author_meta('twitter', $author_id);
296
+			$author_googleplus = get_the_author_meta('googleplus', $author_id);
297 297
 			?>
298
-			<div class="col-<?php echo esc_attr( $size ); ?>-12">
298
+			<div class="col-<?php echo esc_attr($size); ?>-12">
299 299
 				<div class="archive-author-data">
300 300
 					<div class="row">
301
-						<?php if ( ! empty( $author_avatar ) ) : ?>
301
+						<?php if ( ! empty($author_avatar)) : ?>
302 302
 							<div class="col-xs-12 col-sm-4 col-md-3">
303
-							<figure class="archive-author-avatar"><?php echo wp_kses_post( $author_avatar ); ?></figure>
303
+							<figure class="archive-author-avatar"><?php echo wp_kses_post($author_avatar); ?></figure>
304 304
 							</div>
305 305
 						<?php endif; ?>
306 306
 						<div class="col-xs-12 col-sm-8 col-md-9">
307
-							<a class="back-to-blog" href="<?php echo ( esc_url( get_post_type_archive_link( 'post' ) ) ); ?>"><?php echo esc_html__( 'Back To Blog', 'lsx' ); ?></a>
307
+							<a class="back-to-blog" href="<?php echo (esc_url(get_post_type_archive_link('post'))); ?>"><?php echo esc_html__('Back To Blog', 'lsx'); ?></a>
308 308
 							<!-- Name -->
309 309
 							<h2 class="archive-author-title">
310 310
 								<?php
311
-								if ( '' !== $author ) {
312
-									echo esc_html( $author );
311
+								if ('' !== $author) {
312
+									echo esc_html($author);
313 313
 								}
314 314
 								?>
315 315
 							</h2>
316 316
 							<!-- Social -->
317
-							<?php if ( ! empty( $author_url ) || ! empty( $author_email ) || ! empty( $author_facebook ) || ! empty( $author_twitter ) || ! empty( $author_googleplus ) ) : ?>
317
+							<?php if ( ! empty($author_url) || ! empty($author_email) || ! empty($author_facebook) || ! empty($author_twitter) || ! empty($author_googleplus)) : ?>
318 318
 								<div class="archive-author-social-links">
319
-									<?php if ( ! empty( $author_url ) ) : ?>
320
-										<a href="<?php echo esc_url( $author_url ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-url"><i class="fa fa-link" aria-hidden="true"></i></a>
319
+									<?php if ( ! empty($author_url)) : ?>
320
+										<a href="<?php echo esc_url($author_url); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-url"><i class="fa fa-link" aria-hidden="true"></i></a>
321 321
 									<?php endif; ?>
322 322
 
323
-									<?php if ( ! empty( $author_email ) ) : ?>
324
-										<a href="mailto:<?php echo esc_attr( $author_email ); ?>" class="archive-author-social-link archive-author-social-link-email"><i class="fa fa-envelope" aria-hidden="true"></i></a>
323
+									<?php if ( ! empty($author_email)) : ?>
324
+										<a href="mailto:<?php echo esc_attr($author_email); ?>" class="archive-author-social-link archive-author-social-link-email"><i class="fa fa-envelope" aria-hidden="true"></i></a>
325 325
 									<?php endif; ?>
326 326
 
327
-									<?php if ( ! empty( $author_facebook ) ) : ?>
328
-										<a href="<?php echo esc_url( $author_facebook ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
327
+									<?php if ( ! empty($author_facebook)) : ?>
328
+										<a href="<?php echo esc_url($author_facebook); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
329 329
 									<?php endif; ?>
330 330
 
331
-									<?php if ( ! empty( $author_twitter ) ) : ?>
332
-										<a href="https://twitter.com/<?php echo esc_attr( $author_twitter ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
331
+									<?php if ( ! empty($author_twitter)) : ?>
332
+										<a href="https://twitter.com/<?php echo esc_attr($author_twitter); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
333 333
 									<?php endif; ?>
334 334
 
335
-									<?php if ( ! empty( $author_linkedin ) ) : ?>
336
-										<a href="<?php echo esc_url( $author_linkedin ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-linkedin"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
335
+									<?php if ( ! empty($author_linkedin)) : ?>
336
+										<a href="<?php echo esc_url($author_linkedin); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-linkedin"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
337 337
 									<?php endif; ?>
338 338
 
339
-									<?php if ( ! empty( $author_googleplus ) ) : ?>
340
-										<a href="<?php echo esc_url( $author_googleplus ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-googleplus"><i class="fa fa-google-plus" aria-hidden="true"></i></a>
339
+									<?php if ( ! empty($author_googleplus)) : ?>
340
+										<a href="<?php echo esc_url($author_googleplus); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-googleplus"><i class="fa fa-google-plus" aria-hidden="true"></i></a>
341 341
 									<?php endif; ?>
342 342
 								</div>
343 343
 							<?php endif; ?>
344 344
 
345 345
 							<!-- Bio -->
346
-							<?php if ( ! empty( $author_bio ) ) : ?>
347
-								<p class="archive-author-bio"><?php echo wp_kses_post( $author_bio ); ?></p>
346
+							<?php if ( ! empty($author_bio)) : ?>
347
+								<p class="archive-author-bio"><?php echo wp_kses_post($author_bio); ?></p>
348 348
 							<?php endif; ?>
349 349
 						</div>
350 350
 					</div>
351 351
 				</div>
352
-				<h2><?php echo esc_html__( 'Posts', 'lsx' ); ?></h2>
352
+				<h2><?php echo esc_html__('Posts', 'lsx'); ?></h2>
353 353
 			</div>
354 354
 			<?php
355 355
 		endif;
356 356
 	}
357
-	add_action( 'lsx_content_wrap_before', 'lsx_author_extra_info', 11 );
357
+	add_action('lsx_content_wrap_before', 'lsx_author_extra_info', 11);
358 358
 endif;
359 359
 
360
-if ( ! function_exists( 'lsx_post_header' ) ) :
360
+if ( ! function_exists('lsx_post_header')) :
361 361
 	/**
362 362
 	 * Displays the post header.
363 363
 	 *
@@ -366,21 +366,21 @@  discard block
 block discarded – undo
366 366
 	 */
367 367
 	function lsx_post_header() {
368 368
 		$default_size = 'sm';
369
-		$size         = apply_filters( 'lsx_bootstrap_column_size', $default_size );
369
+		$size         = apply_filters('lsx_bootstrap_column_size', $default_size);
370 370
 
371
-		if ( is_singular( 'post' ) ) :
371
+		if (is_singular('post')) :
372 372
 			$format = get_post_format();
373 373
 
374
-			if ( false === $format ) {
374
+			if (false === $format) {
375 375
 				$format = 'standard';
376 376
 			}
377 377
 
378
-			$format = lsx_translate_format_to_fontawesome( $format );
378
+			$format = lsx_translate_format_to_fontawesome($format);
379 379
 			?>
380
-			<div class="archive-header-wrapper banner-post-header col-<?php echo esc_attr( $size ); ?>-12">
380
+			<div class="archive-header-wrapper banner-post-header col-<?php echo esc_attr($size); ?>-12">
381 381
 				<header class="archive-header">
382 382
 					<h1 class="archive-title">
383
-						<i class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></i>
383
+						<i class="format-link fa fa-<?php echo esc_attr($format); ?>"></i>
384 384
 						<span><?php the_title(); ?></span>
385 385
 					</h1>
386 386
 				</header>
@@ -388,10 +388,10 @@  discard block
 block discarded – undo
388 388
 			<?php
389 389
 		endif;
390 390
 	}
391
-	add_action( 'lsx_entry_top', 'lsx_post_header' );
391
+	add_action('lsx_entry_top', 'lsx_post_header');
392 392
 endif;
393 393
 
394
-if ( ! function_exists( 'lsx_add_viewport_meta_tag' ) ) :
394
+if ( ! function_exists('lsx_add_viewport_meta_tag')) :
395 395
 	/**
396 396
 	 * Add Viewport Meta Tag to head.
397 397
 	 *
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
 		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
404 404
 		<?php
405 405
 	}
406
-	add_action( 'wp_head', 'lsx_add_viewport_meta_tag' );
406
+	add_action('wp_head', 'lsx_add_viewport_meta_tag');
407 407
 endif;
408 408
 
409
-if ( ! function_exists( 'lsx_header_search_form' ) ) :
409
+if ( ! function_exists('lsx_header_search_form')) :
410 410
 	/**
411 411
 	 * Add a search form to just above the nav menu.
412 412
 	 *
@@ -414,19 +414,19 @@  discard block
 block discarded – undo
414 414
 	 * @subpackage layout
415 415
 	 */
416 416
 	function lsx_header_search_form() {
417
-		$search_form = get_theme_mod( 'lsx_header_search', false );
417
+		$search_form = get_theme_mod('lsx_header_search', false);
418 418
 
419
-		if ( false !== $search_form || is_customize_preview() ) {
420
-			get_search_form( true );
419
+		if (false !== $search_form || is_customize_preview()) {
420
+			get_search_form(true);
421 421
 		}
422 422
 	}
423
-	add_action( 'lsx_nav_before', 'lsx_header_search_form', 0 );
423
+	add_action('lsx_nav_before', 'lsx_header_search_form', 0);
424 424
 endif;
425 425
 
426 426
 // Add entry meta to single post if active.
427
-if ( ! function_exists( 'lsx_add_entry_meta' ) ) :
427
+if ( ! function_exists('lsx_add_entry_meta')) :
428 428
 	function lsx_add_entry_meta() {
429
-		if ( is_single() && is_singular( 'post' ) ) {
429
+		if (is_single() && is_singular('post')) {
430 430
 			?>
431 431
 			<div class="entry-meta">
432 432
 				<?php lsx_post_meta_single_top(); ?>
@@ -434,5 +434,5 @@  discard block
 block discarded – undo
434 434
 			<?php
435 435
 		}
436 436
 	}
437
-	add_action( 'lsx_entry_top', 'lsx_add_entry_meta', 999 );
437
+	add_action('lsx_entry_top', 'lsx_add_entry_meta', 999);
438 438
 endif;
Please login to merge, or discard this patch.
includes/the-events-calendar/the-events-calendar.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage the-events-calendar
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_tec_scripts_add_styles' ) ) :
13
+if ( ! function_exists('lsx_tec_scripts_add_styles')) :
14 14
 
15 15
 	/**
16 16
 	 * The Events Calendar enqueue styles.
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage the-events-calendar
20 20
 	 */
21 21
 	function lsx_tec_scripts_add_styles() {
22
-		wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION );
23
-		wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' );
22
+		wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array('lsx_main'), LSX_VERSION);
23
+		wp_style_add_data('the-events-calendar-lsx', 'rtl', 'replace');
24 24
 	}
25 25
 
26
-	add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' );
26
+	add_action('wp_enqueue_scripts', 'lsx_tec_scripts_add_styles');
27 27
 
28 28
 endif;
29 29
 
30
-if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) :
30
+if ( ! function_exists('lsx_tec_theme_wrapper_start')) :
31 31
 
32 32
 	/**
33 33
 	 * The Events Calendar wrapper start.
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	function lsx_tec_theme_wrapper_start() {
39 39
 		lsx_content_wrap_before();
40
-		echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">';
40
+		echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">';
41 41
 		lsx_content_before();
42 42
 		echo '<main id="main" class="site-main" role="main">';
43 43
 		lsx_content_top();
44 44
 	}
45 45
 
46
-	add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 );
46
+	add_action('tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9);
47 47
 
48 48
 endif;
49 49
 
50
-if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) :
50
+if ( ! function_exists('lsx_tec_theme_wrapper_end')) :
51 51
 
52 52
 	/**
53 53
 	 * The Events Calendar wrapper end.
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 		lsx_content_wrap_after();
64 64
 	}
65 65
 
66
-	add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 );
66
+	add_action('tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11);
67 67
 
68 68
 endif;
69 69
 
70
-if ( ! function_exists( 'lsx_tec_global_header_title' ) ) :
70
+if ( ! function_exists('lsx_tec_global_header_title')) :
71 71
 
72 72
 	/**
73 73
 	 * Move the events title into the global header
@@ -75,98 +75,98 @@  discard block
 block discarded – undo
75 75
 	 * @package    lsx
76 76
 	 * @subpackage the-events-calendar
77 77
 	 */
78
-	function lsx_tec_global_header_title( $title ) {
78
+	function lsx_tec_global_header_title($title) {
79 79
 
80
-		if ( tribe_is_community_edit_event_page() ) {
80
+		if (tribe_is_community_edit_event_page()) {
81 81
 
82
-			$is_route = get_query_var( 'WP_Route' );
83
-			switch ( $is_route ) {
82
+			$is_route = get_query_var('WP_Route');
83
+			switch ($is_route) {
84 84
 				case 'ce-edit-route':
85
-					$title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) );
85
+					$title = apply_filters('tribe_ce_edit_event_page_title', __('Edit an Event', 'lsx'));
86 86
 					break;
87 87
 
88 88
 				case 'ce-edit-organizer-route':
89
-					$title = __( 'Edit an Organizer', 'lsx' );
89
+					$title = __('Edit an Organizer', 'lsx');
90 90
 					break;
91 91
 
92 92
 				case 'ce-edit-venue-route':
93
-					$title = __( 'Edit a Venue', 'lsx' );
93
+					$title = __('Edit a Venue', 'lsx');
94 94
 					break;
95 95
 
96 96
 				default:
97
-					$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) );
97
+					$title = apply_filters('tribe_ce_submit_event_page_title', __('Submit an Event', 'lsx'));
98 98
 					break;
99 99
 			}
100
-		} elseif ( tribe_is_community_my_events_page() ) {
101
-			$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) );
102
-		} elseif ( tribe_is_event() ) {
100
+		} elseif (tribe_is_community_my_events_page()) {
101
+			$title = apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx'));
102
+		} elseif (tribe_is_event()) {
103 103
 			$title = tribe_get_events_title();
104 104
 		}
105 105
 
106 106
 		// Only disable the title after we have retrieved it.
107
-		add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 );
107
+		add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1);
108 108
 
109
-		if ( is_singular( 'tribe_events' ) ) {
110
-			add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 );
109
+		if (is_singular('tribe_events')) {
110
+			add_filter('the_title', 'lsx_text_disable_body_title', 200, 1);
111 111
 		}
112 112
 		return $title;
113 113
 	}
114
-	add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 );
114
+	add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1);
115 115
 
116 116
 endif;
117 117
 
118
-if ( ! function_exists( 'lsx_text_disable_body_title' ) ) :
118
+if ( ! function_exists('lsx_text_disable_body_title')) :
119 119
 	/**
120 120
 	 * Disable the events title for the post archive if the dynamic setting is active.
121 121
 	 *
122 122
 	 * @param $title
123 123
 	 * @return string
124 124
 	 */
125
-	function lsx_text_disable_body_title( $title ) {
125
+	function lsx_text_disable_body_title($title) {
126 126
 		$title = '';
127
-		remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 );
127
+		remove_filter('the_title', 'lsx_text_disable_body_title', 200, 1);
128 128
 		return $title;
129 129
 	}
130 130
 
131 131
 endif;
132 132
 
133
-if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) :
133
+if ( ! function_exists('lsx_tec_breadcrumb_filter')) :
134 134
 	/**
135 135
 	 * Fixes the community events breadcrumb
136 136
 	 *
137 137
 	 * @package    lsx
138 138
 	 * @subpackage the-events-calendar
139 139
 	 */
140
-	function lsx_tec_breadcrumb_filter( $crumbs ) {
140
+	function lsx_tec_breadcrumb_filter($crumbs) {
141 141
 
142
-		if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) {
142
+		if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) {
143 143
 			$new_crumbs    = array();
144 144
 			$new_crumbs[0] = $crumbs[0];
145 145
 
146
-			if ( function_exists( 'woocommerce_breadcrumb' ) ) {
146
+			if (function_exists('woocommerce_breadcrumb')) {
147 147
 				$new_crumbs[1] = array(
148
-					0 => __( 'Events', 'lsx' ),
149
-					1 => get_post_type_archive_link( 'tribe_events' ),
148
+					0 => __('Events', 'lsx'),
149
+					1 => get_post_type_archive_link('tribe_events'),
150 150
 				);
151 151
 			} else {
152 152
 				$new_crumbs[1] = array(
153
-					'text' => __( 'Events', 'lsx' ),
154
-					'url'  => get_post_type_archive_link( 'tribe_events' ),
153
+					'text' => __('Events', 'lsx'),
154
+					'url'  => get_post_type_archive_link('tribe_events'),
155 155
 				);
156 156
 			}
157 157
 
158
-			if ( tribe_is_community_my_events_page() ) {
158
+			if (tribe_is_community_my_events_page()) {
159 159
 				$new_crumbs[2] = $crumbs[2];
160
-			} elseif ( tribe_is_community_edit_event_page() ) {
160
+			} elseif (tribe_is_community_edit_event_page()) {
161 161
 
162
-				if ( function_exists( 'woocommerce_breadcrumb' ) ) {
162
+				if (function_exists('woocommerce_breadcrumb')) {
163 163
 					$new_crumbs[2] = array(
164
-						0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ),
164
+						0 => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')),
165 165
 						1 => tribe_community_events_list_events_link(),
166 166
 					);
167 167
 				} else {
168 168
 					$new_crumbs[2] = array(
169
-						'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ),
169
+						'text' => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')),
170 170
 						'url'  => tribe_community_events_list_events_link(),
171 171
 					);
172 172
 				}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		}
180 180
 		return $crumbs;
181 181
 	}
182
-	add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 );
183
-	add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 );
182
+	add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1);
183
+	add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1);
184 184
 
185 185
 endif;
Please login to merge, or discard this patch.
includes/nav-bootstrap-navwalker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-navigation-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) :
14
+if ( ! function_exists('lsx_wpml_nav_language_switcher_fix')) :
15 15
 
16 16
 	/**
17 17
 	 * Add in our custom classes to the menus.
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 	 * @subpackage navigation
21 21
 	 * @category   bootstrap-navigation-walker
22 22
 	 */
23
-	function lsx_wpml_nav_language_switcher_fix( $items, $args ) {
24
-		$items = str_replace( 'menu-item-language-current', 'menu-item-language-current dropdown', $items );
25
-		$items = str_replace( 'submenu-languages', 'submenu-languages dropdown-menu', $items );
23
+	function lsx_wpml_nav_language_switcher_fix($items, $args) {
24
+		$items = str_replace('menu-item-language-current', 'menu-item-language-current dropdown', $items);
25
+		$items = str_replace('submenu-languages', 'submenu-languages dropdown-menu', $items);
26 26
 		return $items;
27 27
 	}
28 28
 
29 29
 endif;
30 30
 
31
-add_filter( 'wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2 );
31
+add_filter('wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2);
Please login to merge, or discard this patch.
includes/walker-comment.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage comment-walker
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_get_avatar' ) ) :
13
+if ( ! function_exists('lsx_get_avatar')) :
14 14
 
15 15
 	/**
16 16
 	 * Comment Form Field Filter.
@@ -18,25 +18,25 @@  discard block
 block discarded – undo
18 18
 	 * @package    lsx
19 19
 	 * @subpackage comment-walker
20 20
 	 */
21
-	function lsx_get_avatar( $avatar ) {
22
-		$avatar = str_replace( "class='avatar", "class='avatar pull-left media-object ", $avatar );
23
-		$avatar = str_replace( 'class="avatar', 'class="avatar pull-left media-object ', $avatar );
21
+	function lsx_get_avatar($avatar) {
22
+		$avatar = str_replace("class='avatar", "class='avatar pull-left media-object ", $avatar);
23
+		$avatar = str_replace('class="avatar', 'class="avatar pull-left media-object ', $avatar);
24 24
 		return $avatar;
25 25
 	}
26 26
 
27 27
 endif;
28 28
 
29
-add_filter( 'get_avatar', 'lsx_get_avatar' );
29
+add_filter('get_avatar', 'lsx_get_avatar');
30 30
 
31
-add_action( 'admin_bar_menu', function() {
32
-	remove_filter( 'get_avatar', 'lsx_get_avatar' );
33
-}, 0 );
31
+add_action('admin_bar_menu', function() {
32
+	remove_filter('get_avatar', 'lsx_get_avatar');
33
+}, 0);
34 34
 
35
-add_action( 'wp_after_admin_bar_render', function() {
36
-	add_filter( 'get_avatar', 'lsx_get_avatar' );
35
+add_action('wp_after_admin_bar_render', function() {
36
+	add_filter('get_avatar', 'lsx_get_avatar');
37 37
 } );
38 38
 
39
-if ( ! function_exists( 'lsx_comment_form_fields_filter' ) ) :
39
+if ( ! function_exists('lsx_comment_form_fields_filter')) :
40 40
 
41 41
 	/**
42 42
 	 * Comment Form Field Filter.
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	 * @package    lsx
45 45
 	 * @subpackage comment-walker
46 46
 	 */
47
-	function lsx_comment_form_fields_filter( $fields ) {
48
-		foreach ( $fields as &$field ) {
49
-			if ( stristr( 'class=', $field ) ) {
50
-				$field = str_replace( 'class="', 'class="form-control ', $field );
47
+	function lsx_comment_form_fields_filter($fields) {
48
+		foreach ($fields as &$field) {
49
+			if (stristr('class=', $field)) {
50
+				$field = str_replace('class="', 'class="form-control ', $field);
51 51
 			} else {
52
-				$field = str_replace( '<input', '<input class="form-control" ', $field );
52
+				$field = str_replace('<input', '<input class="form-control" ', $field);
53 53
 			}
54 54
 		}
55 55
 
@@ -58,4 +58,4 @@  discard block
 block discarded – undo
58 58
 
59 59
 endif;
60 60
 
61
-add_filter( 'comment_form_default_fields', 'lsx_comment_form_fields_filter' );
61
+add_filter('comment_form_default_fields', 'lsx_comment_form_fields_filter');
Please login to merge, or discard this patch.
includes/config.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage config
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_setup' ) ) :
13
+if ( ! function_exists('lsx_setup')) :
14 14
 
15 15
 	/**
16 16
 	 * Theme after_setup_theme action.
@@ -22,26 +22,26 @@  discard block
 block discarded – undo
22 22
 		global $content_width;
23 23
 		$content_width = 1140;
24 24
 
25
-		load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
25
+		load_theme_textdomain('lsx', get_template_directory() . '/languages');
26 26
 
27
-		add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
-		add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
-		add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
-		add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
-		add_image_size( 'lsx-banner', 1920, 600, true );
27
+		add_image_size('lsx-thumbnail-carousel', 350, 230, true);
28
+		add_image_size('lsx-thumbnail-wide', 360, 168, true);
29
+		add_image_size('lsx-thumbnail-square', 350, 350, true);
30
+		add_image_size('lsx-thumbnail-single', 750, 350, true);
31
+		add_image_size('lsx-banner', 1920, 600, true);
32 32
 
33 33
 		register_nav_menus(
34 34
 			array(
35
-				'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
-				'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
-				'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
-				'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
-				'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
35
+				'primary'       => esc_html__('Primary Menu', 'lsx'),
36
+				'top-menu'      => esc_html__('Top Menu (right)', 'lsx'),
37
+				'top-menu-left' => esc_html__('Top Menu (left)', 'lsx'),
38
+				'social'        => esc_html__('Social Menu', 'lsx'),
39
+				'footer'        => esc_html__('Footer Menu', 'lsx'),
40 40
 			)
41 41
 		);
42 42
 
43
-		add_theme_support( 'automatic-feed-links' );
44
-		add_theme_support( 'custom-background' );
43
+		add_theme_support('automatic-feed-links');
44
+		add_theme_support('custom-background');
45 45
 
46 46
 		add_theme_support(
47 47
 			'custom-logo',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 			)
54 54
 		);
55 55
 
56
-		add_theme_support( 'html5', array( 'caption' ) );
56
+		add_theme_support('html5', array('caption'));
57 57
 
58 58
 		add_theme_support(
59 59
 			'post-formats',
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 			)
67 67
 		);
68 68
 
69
-		add_theme_support( 'post-thumbnails' );
70
-		add_theme_support( 'sensei' );
69
+		add_theme_support('post-thumbnails');
70
+		add_theme_support('sensei');
71 71
 
72 72
 		add_theme_support(
73 73
 			'site-logo',
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 			)
81 81
 		);
82 82
 
83
-		add_theme_support( 'title-tag' );
83
+		add_theme_support('title-tag');
84 84
 
85 85
 		/*
86 86
 		 * @TODO - Necessary to test it
87 87
 		 */
88 88
 		// add_theme_support( 'woocommerce' );
89 89
 
90
-		add_theme_support( 'starter-content', array(
90
+		add_theme_support('starter-content', array(
91 91
 			'widgets'     => array(
92 92
 				'sidebar-home'       => array(
93 93
 					'custom_widget_1' => array(
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 						array(
97 97
 							'title' => '',
98
-							'text'  => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ),
98
+							'text'  => wp_kses_post('<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>'),
99 99
 						),
100 100
 					),
101 101
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 						array(
106 106
 							'title' => '',
107
-							'text'  => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ),
107
+							'text'  => wp_kses_post('<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>'),
108 108
 						),
109 109
 					),
110 110
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 						array(
115 115
 							'title' => '',
116
-							'text'  => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ),
116
+							'text'  => wp_kses_post('<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>'),
117 117
 						),
118 118
 					),
119 119
 				),
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 						'text',
124 124
 
125 125
 						array(
126
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
126
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
127
+							'text'  => esc_html__('This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx'),
128 128
 						),
129 129
 					),
130 130
 
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 						'text',
133 133
 
134 134
 						array(
135
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
135
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
136
+							'text'  => esc_html__('This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx'),
137 137
 						),
138 138
 					),
139 139
 
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
 						'text',
142 142
 
143 143
 						array(
144
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
145
-							'text'  => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ),
144
+							'title' => esc_html__('Contact us:', 'lsx'),
145
+							'text'  => wp_kses_post('<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment'),
146 146
 						),
147 147
 					),
148 148
 				),
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 						'text',
153 153
 
154 154
 						array(
155
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
-							'text'  => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ),
155
+							'title' => esc_html__('A Footer Call to Action', 'lsx'),
156
+							'text'  => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx'),
157 157
 						),
158 158
 					),
159 159
 				),
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				'home'    => array(
164 164
 					'template'     => 'page-templates/template-front-page.php',
165 165
 					'thumbnail'    => '{{image-banner-example-01}}',
166
-					'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
166
+					'post_title'   => esc_html__('LSX is a free WordPress theme', 'lsx'),
167 167
 					'post_content' => '',
168 168
 				),
169 169
 
@@ -180,17 +180,17 @@  discard block
 block discarded – undo
180 180
 
181 181
 			'attachments' => array(
182 182
 				'image-banner-example-01' => array(
183
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
183
+					'post_title' => esc_html_x('Banner Example 01', 'Theme starter content', 'lsx'),
184 184
 					'file'       => 'assets/images/admin/banner-example-01.jpg',
185 185
 				),
186 186
 
187 187
 				'image-banner-example-02' => array(
188
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
188
+					'post_title' => esc_html_x('Banner Example 02', 'Theme starter content', 'lsx'),
189 189
 					'file'       => 'assets/images/admin/banner-example-02.jpg',
190 190
 				),
191 191
 
192 192
 				'image-banner-example-03' => array(
193
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
193
+					'post_title' => esc_html_x('Banner Example 03', 'Theme starter content', 'lsx'),
194 194
 					'file'       => 'assets/images/admin/banner-example-03.jpg',
195 195
 				),
196 196
 			),
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
 				'show_on_front'   => 'page',
200 200
 				'page_on_front'   => '{{home}}',
201 201
 				'page_for_posts'  => '{{blog}}',
202
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
202
+				'blogdescription' => esc_html__('LSX starter content example', 'lsx'),
203 203
 			),
204 204
 
205 205
 			'nav_menus'   => array(
206 206
 				'primary'  => array(
207
-					'name'  => esc_html__( 'Primary Menu', 'lsx' ),
207
+					'name'  => esc_html__('Primary Menu', 'lsx'),
208 208
 
209 209
 					'items' => array(
210 210
 						'page_home',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 				),
216 216
 
217 217
 				'top-menu' => array(
218
-					'name'  => esc_html__( 'Top Menu', 'lsx' ),
218
+					'name'  => esc_html__('Top Menu', 'lsx'),
219 219
 
220 220
 					'items' => array(
221 221
 						'custom_link_1' => array(
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 				),
244 244
 
245 245
 				'social'   => array(
246
-					'name'  => esc_html__( 'Social Menu', 'lsx' ),
246
+					'name'  => esc_html__('Social Menu', 'lsx'),
247 247
 
248 248
 					'items' => array(
249 249
 						'link_facebook',
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 				),
259 259
 
260 260
 				'footer'   => array(
261
-					'name'  => esc_html__( 'Footer Menu', 'lsx' ),
261
+					'name'  => esc_html__('Footer Menu', 'lsx'),
262 262
 
263 263
 					'items' => array(
264 264
 						'page_about',
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
 				'lsx_header_search' => false,
273 273
 				'lsx_layout'        => '1c',
274 274
 			),
275
-		) );
275
+		));
276 276
 	}
277 277
 
278 278
 endif;
279 279
 
280
-add_action( 'after_setup_theme', 'lsx_setup' );
280
+add_action('after_setup_theme', 'lsx_setup');
281 281
 
282
-if ( ! function_exists( 'lsx_init' ) ) :
282
+if ( ! function_exists('lsx_init')) :
283 283
 
284 284
 	/**
285 285
 	 * Theme init action.
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
 	 * @subpackage config
289 289
 	 */
290 290
 	function lsx_init() {
291
-		add_post_type_support( 'page', 'excerpt' );
291
+		add_post_type_support('page', 'excerpt');
292 292
 
293
-		if ( class_exists( 'WooCommerce' ) ) {
294
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
293
+		if (class_exists('WooCommerce')) {
294
+			remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
295 295
 		}
296 296
 
297
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
297
+		remove_action('comment_form', 'wp_comment_form_unfiltered_html_nonce', 10);
298 298
 	}
299 299
 
300 300
 endif;
301 301
 
302
-add_action( 'init', 'lsx_init', 100 );
302
+add_action('init', 'lsx_init', 100);
303 303
 
304
-if ( ! function_exists( 'lsx_process_content_width' ) ) :
304
+if ( ! function_exists('lsx_process_content_width')) :
305 305
 
306 306
 	/**
307 307
 	 * Overwrite the $content_width var, based on the layout of the page.
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
 		global $content_width;
314 314
 
315 315
 		if (
316
-			is_page_template( 'page-templates/template-front-page.php' ) ||
317
-			is_page_template( 'page-templates/template-full-width.php' )
316
+			is_page_template('page-templates/template-front-page.php') ||
317
+			is_page_template('page-templates/template-full-width.php')
318 318
 		) {
319 319
 			$content_width = 1140;
320 320
 		}
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 
323 323
 endif;
324 324
 
325
-add_action( 'wp_head', 'lsx_process_content_width' );
325
+add_action('wp_head', 'lsx_process_content_width');
326 326
 
327
-if ( ! function_exists( 'lsx_file_get_contents' ) ) :
327
+if ( ! function_exists('lsx_file_get_contents')) :
328 328
 
329 329
 	/**
330 330
 	 * Get file contents.
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
 	 * @package    lsx
333 333
 	 * @subpackage config
334 334
 	 */
335
-	function lsx_file_get_contents( $file ) {
336
-		if ( file_exists( $file ) ) {
335
+	function lsx_file_get_contents($file) {
336
+		if (file_exists($file)) {
337 337
 			global $wp_filesystem;
338 338
 
339
-			if ( empty( $wp_filesystem ) ) {
340
-				require_once( ABSPATH . 'wp-admin/includes/file.php' );
339
+			if (empty($wp_filesystem)) {
340
+				require_once(ABSPATH . 'wp-admin/includes/file.php');
341 341
 				WP_Filesystem();
342 342
 			}
343 343
 
344
-			if ( $wp_filesystem ) {
345
-				$contents = $wp_filesystem->get_contents( $file );
344
+			if ($wp_filesystem) {
345
+				$contents = $wp_filesystem->get_contents($file);
346 346
 
347
-				if ( ! empty( $contents ) ) {
347
+				if ( ! empty($contents)) {
348 348
 					return $contents;
349 349
 				}
350 350
 			}
Please login to merge, or discard this patch.
includes/welcome.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage welcome-page
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_activation_admin_notice_dismiss' ) ) :
13
+if ( ! function_exists('lsx_activation_admin_notice_dismiss')) :
14 14
 
15 15
 	/**
16 16
 	 * Dismiss the admin notice (successful activation).
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage welcome-page
20 20
 	 */
21 21
 	function lsx_activation_admin_notice_dismiss() {
22
-		update_option( 'lsx-notice-dismissed', '1' );
22
+		update_option('lsx-notice-dismissed', '1');
23 23
 		wp_die();
24 24
 	}
25 25
 
26 26
 endif;
27 27
 
28
-add_action( 'wp_ajax_lsx_dismiss_theme_notice', 'lsx_activation_admin_notice_dismiss' );
28
+add_action('wp_ajax_lsx_dismiss_theme_notice', 'lsx_activation_admin_notice_dismiss');
29 29
 
30
-if ( ! function_exists( 'lsx_activation_admin_notice' ) ) :
30
+if ( ! function_exists('lsx_activation_admin_notice')) :
31 31
 
32 32
 	/**
33 33
 	 * Adds an admin notice upon successful activation.
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
 	 * @subpackage welcome-page
37 37
 	 */
38 38
 	function lsx_activation_admin_notice() {
39
-		if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) {
40
-			add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 );
39
+		if (empty(get_option('lsx-notice-dismissed'))) {
40
+			add_action('admin_notices', 'lsx_welcome_admin_notice', 99);
41 41
 		}
42 42
 	}
43 43
 
44 44
 endif;
45 45
 
46
-add_action( 'admin_notices', 'lsx_activation_admin_notice' );
46
+add_action('admin_notices', 'lsx_activation_admin_notice');
47 47
 
48
-if ( ! function_exists( 'lsx_welcome_admin_notice' ) ) :
48
+if ( ! function_exists('lsx_welcome_admin_notice')) :
49 49
 
50 50
 	/**
51 51
 	 * Display an admin notice linking to the welcome screen.
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
 					<?php
61 61
 						printf(
62 62
 							/* Translators: 1: HTML open tag link, 2: HTML close tag link */
63
-							esc_html__( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ),
64
-							'<a href="' . esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ) . '">',
63
+							esc_html__('Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx'),
64
+							'<a href="' . esc_url(admin_url('themes.php?page=lsx-welcome')) . '">',
65 65
 							'</a>'
66 66
 						);
67 67
 					?>
68 68
 				</p>
69
-				<p><a href="<?php echo esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ); ?>" class="button" style="text-decoration: none;"><?php esc_attr_e( 'Get started with LSX', 'lsx' ); ?></a></p>
69
+				<p><a href="<?php echo esc_url(admin_url('themes.php?page=lsx-welcome')); ?>" class="button" style="text-decoration: none;"><?php esc_attr_e('Get started with LSX', 'lsx'); ?></a></p>
70 70
 			</div>
71 71
 		<?php
72 72
 	}
73 73
 
74 74
 endif;
75 75
 
76
-if ( ! function_exists( 'lsx_welcome_style' ) ) :
76
+if ( ! function_exists('lsx_welcome_style')) :
77 77
 
78 78
 	/**
79 79
 	 * Load welcome screen css.
@@ -83,19 +83,19 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @param string $hook_suffix the current page hook suffix.
85 85
 	 */
86
-	function lsx_welcome_style( $hook_suffix ) {
87
-		if ( 'appearance_page_lsx-welcome' === $hook_suffix ) {
88
-			wp_enqueue_style( 'lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION );
89
-			wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array( 'lsx-welcome-screen-mailchimp' ), LSX_VERSION );
90
-			wp_style_add_data( 'lsx-welcome-screen', 'rtl', 'replace' );
86
+	function lsx_welcome_style($hook_suffix) {
87
+		if ('appearance_page_lsx-welcome' === $hook_suffix) {
88
+			wp_enqueue_style('lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION);
89
+			wp_enqueue_style('lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array('lsx-welcome-screen-mailchimp'), LSX_VERSION);
90
+			wp_style_add_data('lsx-welcome-screen', 'rtl', 'replace');
91 91
 		}
92 92
 	}
93 93
 
94 94
 endif;
95 95
 
96
-add_action( 'admin_enqueue_scripts', 'lsx_welcome_style' );
96
+add_action('admin_enqueue_scripts', 'lsx_welcome_style');
97 97
 
98
-if ( ! function_exists( 'lsx_welcome_register_menu' ) ) :
98
+if ( ! function_exists('lsx_welcome_register_menu')) :
99 99
 
100 100
 	/**
101 101
 	 * Creates the dashboard page.
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
 	 * @subpackage welcome-page
105 105
 	 */
106 106
 	function lsx_welcome_register_menu() {
107
-		add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' );
107
+		add_theme_page('LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen');
108 108
 	}
109 109
 
110 110
 endif;
111 111
 
112
-add_action( 'admin_menu', 'lsx_welcome_register_menu' );
112
+add_action('admin_menu', 'lsx_welcome_register_menu');
113 113
 
114
-if ( ! function_exists( 'lsx_welcome_screen' ) ) :
114
+if ( ! function_exists('lsx_welcome_screen')) :
115 115
 
116 116
 	/**
117 117
 	 * The welcome screen.
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 			 * @hooked lsx_welcome_enhance - 20
134 134
 			 * @hooked lsx_welcome_footer  - 30
135 135
 			 */
136
-			do_action( 'lsx_welcome' );
136
+			do_action('lsx_welcome');
137 137
 			?>
138 138
 		</div>
139 139
 		<?php
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 endif;
143 143
 
144
-if ( ! function_exists( 'lsx_welcome_header' ) ) :
144
+if ( ! function_exists('lsx_welcome_header')) :
145 145
 
146 146
 	/**
147 147
 	 * Welcome screen intro.
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 
156 156
 endif;
157 157
 
158
-add_action( 'lsx_welcome', 'lsx_welcome_header', 10 );
158
+add_action('lsx_welcome', 'lsx_welcome_header', 10);
159 159
 
160
-if ( ! function_exists( 'lsx_welcome_enhance' ) ) :
160
+if ( ! function_exists('lsx_welcome_enhance')) :
161 161
 
162 162
 	/**
163 163
 	 * Welcome screen enhance section.
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 
172 172
 endif;
173 173
 
174
-add_action( 'lsx_welcome', 'lsx_welcome_enhance', 20 );
174
+add_action('lsx_welcome', 'lsx_welcome_enhance', 20);
175 175
 
176
-if ( ! function_exists( 'lsx_welcome_footer' ) ) :
176
+if ( ! function_exists('lsx_welcome_footer')) :
177 177
 
178 178
 	/**
179 179
 	 * Welcome screen contribute section.
@@ -187,4 +187,4 @@  discard block
 block discarded – undo
187 187
 
188 188
 endif;
189 189
 
190
-add_action( 'lsx_welcome', 'lsx_welcome_footer', 30 );
190
+add_action('lsx_welcome', 'lsx_welcome_footer', 30);
Please login to merge, or discard this patch.
includes/widgets.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage widgets
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_widget_area_init' ) ) :
13
+if ( ! function_exists('lsx_widget_area_init')) :
14 14
 
15 15
 	/**
16 16
 	 * Register widgetized area and update sidebar with default widgets.
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	function lsx_widget_area_init() {
22 22
 		register_sidebar(
23 23
 			array(
24
-				'name'          => esc_html__( 'Home', 'lsx' ),
24
+				'name'          => esc_html__('Home', 'lsx'),
25 25
 				'id'            => 'sidebar-home',
26 26
 				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
27 27
 				'after_widget'  => '</aside>',
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 		register_sidebar(
34 34
 			array(
35
-				'name'          => esc_html__( 'Sidebar', 'lsx' ),
35
+				'name'          => esc_html__('Sidebar', 'lsx'),
36 36
 				'id'            => 'sidebar-1',
37 37
 				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
38 38
 				'after_widget'  => '</aside>',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 		register_sidebar(
45 45
 			array(
46
-				'name'          => esc_html__( 'Footer', 'lsx' ),
46
+				'name'          => esc_html__('Footer', 'lsx'),
47 47
 				'id'            => 'sidebar-footer',
48 48
 				'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">',
49 49
 				'after_widget'  => '</aside></div>',
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 		register_sidebar(
56 56
 			array(
57
-				'name'          => esc_html__( 'Footer Call to Action', 'lsx' ),
57
+				'name'          => esc_html__('Footer Call to Action', 'lsx'),
58 58
 				'id'            => 'sidebar-footer-cta',
59 59
 				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
60 60
 				'after_widget'  => '</aside>',
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
 endif;
68 68
 
69
-add_action( 'widgets_init', 'lsx_widget_area_init' );
69
+add_action('widgets_init', 'lsx_widget_area_init');
70 70
 
71
-if ( ! function_exists( 'lsx_sidebar_footer_params' ) ) :
71
+if ( ! function_exists('lsx_sidebar_footer_params')) :
72 72
 
73 73
 	/**
74 74
 	 * Register widgetized area and update sidebar with default widgets.
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
 	 * @package    lsx
77 77
 	 * @subpackage widgets
78 78
 	 */
79
-	function lsx_sidebar_footer_params( $params ) {
79
+	function lsx_sidebar_footer_params($params) {
80 80
 		$sidebar_id = $params[0]['id'];
81 81
 
82
-		if ( 'sidebar-footer' === $sidebar_id ) {
82
+		if ('sidebar-footer' === $sidebar_id) {
83 83
 			$total_widgets              = wp_get_sidebars_widgets();
84
-			$sidebar_widgets            = count( $total_widgets[ $sidebar_id ] );
85
-			$params[0]['before_widget'] = str_replace( 'class="styler', 'class="col-md-' . floor( 12 / $sidebar_widgets ), $params[0]['before_widget'] );
84
+			$sidebar_widgets            = count($total_widgets[$sidebar_id]);
85
+			$params[0]['before_widget'] = str_replace('class="styler', 'class="col-md-' . floor(12 / $sidebar_widgets), $params[0]['before_widget']);
86 86
 		}
87 87
 
88 88
 		return $params;
@@ -90,4 +90,4 @@  discard block
 block discarded – undo
90 90
 
91 91
 endif;
92 92
 
93
-add_filter( 'dynamic_sidebar_params', 'lsx_sidebar_footer_params' );
93
+add_filter('dynamic_sidebar_params', 'lsx_sidebar_footer_params');
Please login to merge, or discard this patch.
includes/woocommerce/woocommerce.php 1 patch
Spacing   +202 added lines, -202 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage woocommerce
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_wc_support' ) ) :
13
+if ( ! function_exists('lsx_wc_support')) :
14 14
 
15 15
 	/**
16 16
 	 * WooCommerce support.
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage woocommerce
20 20
 	 */
21 21
 	function lsx_wc_support() {
22
-		add_theme_support( 'woocommerce' );
23
-		add_theme_support( 'wc-product-gallery-zoom' );
24
-		add_theme_support( 'wc-product-gallery-lightbox' );
25
-		add_theme_support( 'wc-product-gallery-slider' );
22
+		add_theme_support('woocommerce');
23
+		add_theme_support('wc-product-gallery-zoom');
24
+		add_theme_support('wc-product-gallery-lightbox');
25
+		add_theme_support('wc-product-gallery-slider');
26 26
 	}
27 27
 
28
-	add_action( 'after_setup_theme', 'lsx_wc_support' );
28
+	add_action('after_setup_theme', 'lsx_wc_support');
29 29
 
30 30
 endif;
31 31
 
32
-if ( ! function_exists( 'lsx_wc_scripts_add_styles' ) ) :
32
+if ( ! function_exists('lsx_wc_scripts_add_styles')) :
33 33
 
34 34
 	/**
35 35
 	 * WooCommerce enqueue styles.
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
 	 * @subpackage woocommerce
39 39
 	 */
40 40
 	function lsx_wc_scripts_add_styles() {
41
-		wp_enqueue_style( 'woocommerce-lsx', get_template_directory_uri() . '/assets/css/woocommerce/woocommerce.css', array( 'lsx_main' ), LSX_VERSION );
42
-		wp_style_add_data( 'woocommerce-lsx', 'rtl', 'replace' );
41
+		wp_enqueue_style('woocommerce-lsx', get_template_directory_uri() . '/assets/css/woocommerce/woocommerce.css', array('lsx_main'), LSX_VERSION);
42
+		wp_style_add_data('woocommerce-lsx', 'rtl', 'replace');
43 43
 
44 44
 		// Remove WC Shipping Multiple Addresses specific script causing issues on checkout.
45
-		wp_dequeue_script( 'wcms-country-select' );
45
+		wp_dequeue_script('wcms-country-select');
46 46
 	}
47 47
 
48
-	add_action( 'wp_enqueue_scripts', 'lsx_wc_scripts_add_styles' );
48
+	add_action('wp_enqueue_scripts', 'lsx_wc_scripts_add_styles');
49 49
 
50 50
 endif;
51 51
 
52
-if ( ! function_exists( 'lsx_wc_form_field_args' ) ) :
52
+if ( ! function_exists('lsx_wc_form_field_args')) :
53 53
 
54 54
 	/**
55 55
 	 * WooCommerce form fields.
@@ -57,17 +57,17 @@  discard block
 block discarded – undo
57 57
 	 * @package    lsx
58 58
 	 * @subpackage woocommerce
59 59
 	 */
60
-	function lsx_wc_form_field_args( $args, $key, $value ) {
60
+	function lsx_wc_form_field_args($args, $key, $value) {
61 61
 		$args['input_class'][] = 'form-control';
62 62
 
63 63
 		return $args;
64 64
 	}
65 65
 
66
-	add_action( 'woocommerce_form_field_args', 'lsx_wc_form_field_args', 10, 3 );
66
+	add_action('woocommerce_form_field_args', 'lsx_wc_form_field_args', 10, 3);
67 67
 
68 68
 endif;
69 69
 
70
-if ( ! function_exists( 'lsx_wc_theme_wrapper_start' ) ) :
70
+if ( ! function_exists('lsx_wc_theme_wrapper_start')) :
71 71
 
72 72
 	/**
73 73
 	 * WooCommerce wrapper start.
@@ -77,18 +77,18 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	function lsx_wc_theme_wrapper_start() {
79 79
 		lsx_content_wrap_before();
80
-		echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">';
80
+		echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">';
81 81
 		lsx_content_before();
82 82
 		echo '<main id="main" class="site-main" role="main">';
83 83
 		lsx_content_top();
84 84
 	}
85 85
 
86
-	remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
87
-	add_action( 'woocommerce_before_main_content', 'lsx_wc_theme_wrapper_start' );
86
+	remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
87
+	add_action('woocommerce_before_main_content', 'lsx_wc_theme_wrapper_start');
88 88
 
89 89
 endif;
90 90
 
91
-if ( ! function_exists( 'lsx_wc_theme_wrapper_end' ) ) :
91
+if ( ! function_exists('lsx_wc_theme_wrapper_end')) :
92 92
 
93 93
 	/**
94 94
 	 * WooCommerce wrapper end.
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 		lsx_content_wrap_after();
105 105
 	}
106 106
 
107
-	remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
108
-	add_action( 'woocommerce_after_main_content', 'lsx_wc_theme_wrapper_end' );
107
+	remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
108
+	add_action('woocommerce_after_main_content', 'lsx_wc_theme_wrapper_end');
109 109
 
110 110
 endif;
111 111
 
112
-if ( ! function_exists( 'lsx_wc_disable_lsx_banner_plugin' ) ) :
112
+if ( ! function_exists('lsx_wc_disable_lsx_banner_plugin')) :
113 113
 
114 114
 	/**
115 115
 	 * Disable LSX Banners plugin in some WC pages.
@@ -117,21 +117,21 @@  discard block
 block discarded – undo
117 117
 	 * @package    lsx
118 118
 	 * @subpackage woocommerce
119 119
 	 */
120
-	function lsx_wc_disable_lsx_banner_plugin( $disabled ) {
120
+	function lsx_wc_disable_lsx_banner_plugin($disabled) {
121 121
 		global $post;
122 122
 
123
-		if ( $post && class_exists( 'WC_Wishlists_Pages' ) && WC_Wishlists_Pages::is_wishlist_page( $post->post_name ) ) {
123
+		if ($post && class_exists('WC_Wishlists_Pages') && WC_Wishlists_Pages::is_wishlist_page($post->post_name)) {
124 124
 			$disabled = true;
125 125
 		}
126 126
 
127 127
 		return $disabled;
128 128
 	}
129 129
 
130
-	add_filter( 'lsx_banner_plugin_disable', 'lsx_wc_disable_lsx_banner_plugin' );
130
+	add_filter('lsx_banner_plugin_disable', 'lsx_wc_disable_lsx_banner_plugin');
131 131
 
132 132
 endif;
133 133
 
134
-if ( ! function_exists( 'lsx_wc_disable_lsx_banner' ) ) :
134
+if ( ! function_exists('lsx_wc_disable_lsx_banner')) :
135 135
 
136 136
 	/**
137 137
 	 * Disable LSX Banners banner in some WC pages.
@@ -139,41 +139,41 @@  discard block
 block discarded – undo
139 139
 	 * @package    lsx
140 140
 	 * @subpackage woocommerce
141 141
 	 */
142
-	function lsx_wc_disable_lsx_banner( $disabled ) {
143
-		if ( is_shop() || is_product_category() || is_product_tag() || is_product() ) {
142
+	function lsx_wc_disable_lsx_banner($disabled) {
143
+		if (is_shop() || is_product_category() || is_product_tag() || is_product()) {
144 144
 			$disabled = true;
145 145
 		}
146 146
 
147 147
 		return $disabled;
148 148
 	}
149 149
 
150
-	add_filter( 'lsx_banner_disable', 'lsx_wc_disable_lsx_banner' );
150
+	add_filter('lsx_banner_disable', 'lsx_wc_disable_lsx_banner');
151 151
 
152 152
 endif;
153 153
 
154
-if ( ! function_exists( 'lsx_wc_categories_breadcrumb_filter' ) ) :
154
+if ( ! function_exists('lsx_wc_categories_breadcrumb_filter')) :
155 155
 	/**
156 156
 	 * Improves the category and taxonomy breadcrumbs for woocommerce.
157 157
 	 *
158 158
 	 * @package    lsx
159 159
 	 * @subpackage woocommerce
160 160
 	 */
161
-	function lsx_wc_categories_breadcrumb_filter( $crumbs ) {
161
+	function lsx_wc_categories_breadcrumb_filter($crumbs) {
162 162
 
163
-		$shop_page_url = get_permalink( wc_get_page_id( 'shop' ) );
163
+		$shop_page_url = get_permalink(wc_get_page_id('shop'));
164 164
 
165
-		if ( is_product_category() || is_product_tag() ) {
165
+		if (is_product_category() || is_product_tag()) {
166 166
 			$new_crumbs    = array();
167 167
 			$new_crumbs[0] = $crumbs[0];
168 168
 
169
-			if ( function_exists( 'woocommerce_breadcrumb' ) ) {
169
+			if (function_exists('woocommerce_breadcrumb')) {
170 170
 				$new_crumbs[1] = array(
171
-					0 => __( 'Shop', 'lsx' ),
171
+					0 => __('Shop', 'lsx'),
172 172
 					1 => $shop_page_url,
173 173
 				);
174 174
 			} else {
175 175
 				$new_crumbs[1] = array(
176
-					'text' => __( 'Shop', 'lsx' ),
176
+					'text' => __('Shop', 'lsx'),
177 177
 					'url'  => $shop_page_url,
178 178
 				);
179 179
 			}
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
 		}
185 185
 		return $crumbs;
186 186
 	}
187
-	add_filter( 'wpseo_breadcrumb_links', 'lsx_wc_categories_breadcrumb_filter', 30, 1 );
188
-	add_filter( 'woocommerce_get_breadcrumb', 'lsx_wc_categories_breadcrumb_filter', 30, 1 );
187
+	add_filter('wpseo_breadcrumb_links', 'lsx_wc_categories_breadcrumb_filter', 30, 1);
188
+	add_filter('woocommerce_get_breadcrumb', 'lsx_wc_categories_breadcrumb_filter', 30, 1);
189 189
 
190 190
 endif;
191 191
 
192
-if ( ! function_exists( 'lsx_wc_add_cart' ) ) :
192
+if ( ! function_exists('lsx_wc_add_cart')) :
193 193
 
194 194
 	/**
195 195
 	 * Adds WC cart to the header.
@@ -197,34 +197,34 @@  discard block
 block discarded – undo
197 197
 	 * @package    lsx
198 198
 	 * @subpackage template-tags
199 199
 	 */
200
-	function lsx_wc_add_cart( $items, $args ) {
201
-		$cart_menu_item_position = apply_filters( 'lsx_wc_cart_menu_item_position', 'primary' );
200
+	function lsx_wc_add_cart($items, $args) {
201
+		$cart_menu_item_position = apply_filters('lsx_wc_cart_menu_item_position', 'primary');
202 202
 
203 203
 		$cart_logged_out_position = $cart_menu_item_position . '_logged_out';
204 204
 
205
-		if ( $cart_menu_item_position === $args->theme_location || $cart_logged_out_position === $args->theme_location ) {
206
-			$customizer_option = get_theme_mod( 'lsx_header_wc_cart', false );
205
+		if ($cart_menu_item_position === $args->theme_location || $cart_logged_out_position === $args->theme_location) {
206
+			$customizer_option = get_theme_mod('lsx_header_wc_cart', false);
207 207
 
208
-			if ( ! empty( $customizer_option ) ) {
208
+			if ( ! empty($customizer_option)) {
209 209
 				ob_start();
210
-				the_widget( 'WC_Widget_Cart', 'title=' );
210
+				the_widget('WC_Widget_Cart', 'title=');
211 211
 				$widget = ob_get_clean();
212 212
 
213
-				if ( is_cart() ) {
213
+				if (is_cart()) {
214 214
 					$class = 'current-menu-item';
215 215
 				} else {
216 216
 					$class = '';
217 217
 				}
218 218
 
219 219
 				$item_class = 'menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children dropdown lsx-wc-cart-menu-item ' . $class;
220
-				$item_class = apply_filters( 'lsx_wc_cart_menu_item_class', $item_class );
220
+				$item_class = apply_filters('lsx_wc_cart_menu_item_class', $item_class);
221 221
 
222 222
 				$item = '<li class="' . $item_class . '">' .
223
-							'<a title="' . esc_attr__( 'View your shopping cart', 'lsx' ) . '" href="' . esc_url( wc_get_cart_url() ) . '" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true">' .
224
-								'<span class="lsx-wc-cart-amount">' . wp_kses_data( WC()->cart->get_cart_subtotal() ) . '</span>' .
223
+							'<a title="' . esc_attr__('View your shopping cart', 'lsx') . '" href="' . esc_url(wc_get_cart_url()) . '" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true">' .
224
+								'<span class="lsx-wc-cart-amount">' . wp_kses_data(WC()->cart->get_cart_subtotal()) . '</span>' .
225 225
 								/* Translators: %s: items quantity */
226
-								'<span class="lsx-wc-cart-count">' . wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'lsx' ), WC()->cart->get_cart_contents_count() ) ) . '</span>' .
227
-								( ! empty( WC()->cart->get_cart_contents_count() ) ? '<span class="lsx-wc-cart-count-badge">' . wp_kses_data( WC()->cart->get_cart_contents_count() ) . '</span>' : '' ) .
226
+								'<span class="lsx-wc-cart-count">' . wp_kses_data(sprintf(_n('%d item', '%d items', WC()->cart->get_cart_contents_count(), 'lsx'), WC()->cart->get_cart_contents_count())) . '</span>' .
227
+								( ! empty(WC()->cart->get_cart_contents_count()) ? '<span class="lsx-wc-cart-count-badge">' . wp_kses_data(WC()->cart->get_cart_contents_count()) . '</span>' : '') .
228 228
 							'</a>' .
229 229
 							'<ul role="menu" class=" dropdown-menu lsx-wc-cart-sub-menu">' .
230 230
 								'<li>' .
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 							'</ul>' .
234 234
 						'</li>';
235 235
 
236
-				if ( 'top-menu' === $args->theme_location ) {
236
+				if ('top-menu' === $args->theme_location) {
237 237
 					$items = $item . $items;
238 238
 				} else {
239 239
 					$items = $items . $item;
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
 		return $items;
245 245
 	}
246 246
 
247
-	add_filter( 'wp_nav_menu_items', 'lsx_wc_add_cart', 10, 2 );
247
+	add_filter('wp_nav_menu_items', 'lsx_wc_add_cart', 10, 2);
248 248
 
249 249
 endif;
250 250
 
251
-if ( ! function_exists( 'lsx_wc_products_widget_wrapper_before' ) ) :
251
+if ( ! function_exists('lsx_wc_products_widget_wrapper_before')) :
252 252
 
253 253
 	/**
254 254
 	 * Change WC products widget wrapper (before).
@@ -256,16 +256,16 @@  discard block
 block discarded – undo
256 256
 	 * @package    lsx
257 257
 	 * @subpackage woocommerce
258 258
 	 */
259
-	function lsx_wc_products_widget_wrapper_before( $html ) {
259
+	function lsx_wc_products_widget_wrapper_before($html) {
260 260
 		$html = '<div class="lsx-woocommerce-slider lsx-woocommerce-shortcode">';
261 261
 		return $html;
262 262
 	}
263 263
 
264
-	add_filter( 'woocommerce_before_widget_product_list', 'lsx_wc_products_widget_wrapper_before', 15 );
264
+	add_filter('woocommerce_before_widget_product_list', 'lsx_wc_products_widget_wrapper_before', 15);
265 265
 
266 266
 endif;
267 267
 
268
-if ( ! function_exists( 'lsx_wc_products_widget_wrapper_after' ) ) :
268
+if ( ! function_exists('lsx_wc_products_widget_wrapper_after')) :
269 269
 
270 270
 	/**
271 271
 	 * Change WC products widget wrapper (after).
@@ -273,16 +273,16 @@  discard block
 block discarded – undo
273 273
 	 * @package    lsx
274 274
 	 * @subpackage woocommerce
275 275
 	 */
276
-	function lsx_wc_products_widget_wrapper_after( $html ) {
276
+	function lsx_wc_products_widget_wrapper_after($html) {
277 277
 		$html = '</div>';
278 278
 		return $html;
279 279
 	}
280 280
 
281
-	add_filter( 'woocommerce_after_widget_product_list', 'lsx_wc_products_widget_wrapper_after', 15 );
281
+	add_filter('woocommerce_after_widget_product_list', 'lsx_wc_products_widget_wrapper_after', 15);
282 282
 
283 283
 endif;
284 284
 
285
-if ( ! function_exists( 'lsx_wc_reviews_widget_override' ) ) :
285
+if ( ! function_exists('lsx_wc_reviews_widget_override')) :
286 286
 
287 287
 	/**
288 288
 	 * Override WC ewviews widget.
@@ -291,18 +291,18 @@  discard block
 block discarded – undo
291 291
 	 * @subpackage woocommerce
292 292
 	 */
293 293
 	function lsx_wc_reviews_widget_override() {
294
-		if ( class_exists( 'WC_Widget_Recent_Reviews' ) ) {
295
-			unregister_widget( 'WC_Widget_Recent_Reviews' );
294
+		if (class_exists('WC_Widget_Recent_Reviews')) {
295
+			unregister_widget('WC_Widget_Recent_Reviews');
296 296
 			require get_template_directory() . '/includes/classes/class-lsx-wc-widget-recent-reviews.php';
297
-			register_widget( 'LSX_WC_Widget_Recent_Reviews' );
297
+			register_widget('LSX_WC_Widget_Recent_Reviews');
298 298
 		}
299 299
 	}
300 300
 
301
-	add_action( 'widgets_init', 'lsx_wc_reviews_widget_override', 15 );
301
+	add_action('widgets_init', 'lsx_wc_reviews_widget_override', 15);
302 302
 
303 303
 endif;
304 304
 
305
-if ( ! function_exists( 'lsx_wc_change_price_html' ) ) :
305
+if ( ! function_exists('lsx_wc_change_price_html')) :
306 306
 
307 307
 	/**
308 308
 	 * Change WC ZERO price to "free".
@@ -314,30 +314,30 @@  discard block
 block discarded – undo
314 314
 	 * @param $product WC_Product
315 315
 	 * @return string
316 316
 	 */
317
-	function lsx_wc_change_price_html( $price, $product ) {
318
-		if ( empty( $product->get_price() ) ) {
319
-			if ( $product->is_on_sale() && $product->get_regular_price() ) {
320
-				$regular_price = wc_get_price_to_display( $product,
317
+	function lsx_wc_change_price_html($price, $product) {
318
+		if (empty($product->get_price())) {
319
+			if ($product->is_on_sale() && $product->get_regular_price()) {
320
+				$regular_price = wc_get_price_to_display($product,
321 321
 					array(
322 322
 						'qty'   => 1,
323 323
 						'price' => $product->get_regular_price(),
324 324
 					)
325 325
 				);
326 326
 
327
-				$price = wc_format_price_range( $regular_price, esc_html__( 'Free!', 'lsx' ) );
327
+				$price = wc_format_price_range($regular_price, esc_html__('Free!', 'lsx'));
328 328
 			} else {
329
-				$price = '<span class="amount">' . esc_html__( 'Free!', 'lsx' ) . '</span>';
329
+				$price = '<span class="amount">' . esc_html__('Free!', 'lsx') . '</span>';
330 330
 			}
331 331
 		}
332 332
 
333 333
 		return $price;
334 334
 	}
335 335
 
336
-	add_filter( 'woocommerce_get_price_html', 'lsx_wc_change_price_html', 15, 2 );
336
+	add_filter('woocommerce_get_price_html', 'lsx_wc_change_price_html', 15, 2);
337 337
 
338 338
 endif;
339 339
 
340
-if ( ! function_exists( 'lsx_wc_cart_link_fragment' ) ) :
340
+if ( ! function_exists('lsx_wc_cart_link_fragment')) :
341 341
 
342 342
 	/**
343 343
 	 * Cart Fragments.
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 	 * @package    lsx
347 347
 	 * @subpackage woocommerce
348 348
 	 */
349
-	function lsx_wc_cart_link_fragment( $fragments ) {
349
+	function lsx_wc_cart_link_fragment($fragments) {
350 350
 		global $woocommerce;
351 351
 
352 352
 		ob_start();
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
 		lsx_wc_items_counter();
358 358
 		$items_counter = ob_get_clean();
359 359
 
360
-		if ( ! empty( $items_counter ) ) {
361
-			$fragments['div.widget_shopping_cart_content'] = preg_replace( '/(.+)(<\/ul>)[\s\n]*(<p class="woocommerce-mini-cart__total)(.+)/', '$1' . $items_counter . '$2$3$4', $fragments['div.widget_shopping_cart_content'] );
360
+		if ( ! empty($items_counter)) {
361
+			$fragments['div.widget_shopping_cart_content'] = preg_replace('/(.+)(<\/ul>)[\s\n]*(<p class="woocommerce-mini-cart__total)(.+)/', '$1' . $items_counter . '$2$3$4', $fragments['div.widget_shopping_cart_content']);
362 362
 		}
363 363
 
364 364
 		return $fragments;
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
 endif;
368 368
 
369
-if ( ! function_exists( 'lsx_wc_cart_link' ) ) :
369
+if ( ! function_exists('lsx_wc_cart_link')) :
370 370
 
371 371
 	/**
372 372
 	 * Cart Link.
@@ -377,14 +377,14 @@  discard block
 block discarded – undo
377 377
 	 */
378 378
 	function lsx_wc_cart_link() {
379 379
 		?>
380
-			<a title="<?php esc_attr_e( 'View your shopping cart', 'lsx' ); ?>" href="<?php echo esc_url( wc_get_cart_url() ); ?>" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true">
381
-				<span class="lsx-wc-cart-amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span>
380
+			<a title="<?php esc_attr_e('View your shopping cart', 'lsx'); ?>" href="<?php echo esc_url(wc_get_cart_url()); ?>" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true">
381
+				<span class="lsx-wc-cart-amount"><?php echo wp_kses_data(WC()->cart->get_cart_subtotal()); ?></span>
382 382
 
383 383
 				<?php /* Translators: %s: items quantity */ ?>
384
-				<span class="lsx-wc-cart-count"><?php echo wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'lsx' ), WC()->cart->get_cart_contents_count() ) ); ?></span>
384
+				<span class="lsx-wc-cart-count"><?php echo wp_kses_data(sprintf(_n('%d item', '%d items', WC()->cart->get_cart_contents_count(), 'lsx'), WC()->cart->get_cart_contents_count())); ?></span>
385 385
 
386
-				<?php if ( ! empty( WC()->cart->get_cart_contents_count() ) ) : ?>
387
-					<span class="lsx-wc-cart-count-badge"><?php echo wp_kses_data( WC()->cart->get_cart_contents_count() ); ?></span>
386
+				<?php if ( ! empty(WC()->cart->get_cart_contents_count())) : ?>
387
+					<span class="lsx-wc-cart-count-badge"><?php echo wp_kses_data(WC()->cart->get_cart_contents_count()); ?></span>
388 388
 				<?php endif; ?>
389 389
 			</a>
390 390
 		<?php
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 
393 393
 endif;
394 394
 
395
-if ( ! function_exists( 'lsx_wc_items_counter' ) ) :
395
+if ( ! function_exists('lsx_wc_items_counter')) :
396 396
 
397 397
 	/**
398 398
 	 * Add car item hidden items counter.
@@ -404,21 +404,21 @@  discard block
 block discarded – undo
404 404
 		$count         = (int) WC()->cart->get_cart_contents_count();
405 405
 		$items_counter = '';
406 406
 
407
-		if ( ! empty( $count ) ) {
407
+		if ( ! empty($count)) {
408 408
 			$count -= 3;
409 409
 
410
-			if ( 1 === $count ) {
411
-				$items_counter = esc_html__( '1 other item in cart', 'lsx' );
412
-			} elseif ( $count > 1 ) {
410
+			if (1 === $count) {
411
+				$items_counter = esc_html__('1 other item in cart', 'lsx');
412
+			} elseif ($count > 1) {
413 413
 				/* Translators: %s: items counter */
414
-				$items_counter = sprintf( esc_html__( '%s other items in cart', 'lsx' ), $count );
414
+				$items_counter = sprintf(esc_html__('%s other items in cart', 'lsx'), $count);
415 415
 			}
416 416
 		}
417
-		$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
418
-		if ( ! empty( $items_counter ) ) :
417
+		$cart_url = function_exists('wc_get_cart_url') ? wc_get_cart_url() : WC()->cart->get_cart_url();
418
+		if ( ! empty($items_counter)) :
419 419
 			?>
420 420
 				<li class="woocommerce-mini-cart-item mini_cart_item" style="display: block;">
421
-					<a href="<?php echo esc_url( $cart_url ); ?>"><?php echo esc_html( $items_counter ); ?></a>
421
+					<a href="<?php echo esc_url($cart_url); ?>"><?php echo esc_html($items_counter); ?></a>
422 422
 				</li>
423 423
 			<?php
424 424
 		endif;
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
 endif;
428 428
 
429
-if ( ! function_exists( 'lsx_wc_loop_shop_per_page' ) ) :
429
+if ( ! function_exists('lsx_wc_loop_shop_per_page')) :
430 430
 
431 431
 	/**
432 432
 	 * Changes the number of products to display on shop.
@@ -434,16 +434,16 @@  discard block
 block discarded – undo
434 434
 	 * @package    lsx
435 435
 	 * @subpackage woocommerce
436 436
 	 */
437
-	function lsx_wc_loop_shop_per_page( $items ) {
437
+	function lsx_wc_loop_shop_per_page($items) {
438 438
 		$items = 20;
439 439
 		return $items;
440 440
 	}
441 441
 
442
-	add_filter( 'loop_shop_per_page', 'lsx_wc_loop_shop_per_page', 20 );
442
+	add_filter('loop_shop_per_page', 'lsx_wc_loop_shop_per_page', 20);
443 443
 
444 444
 endif;
445 445
 
446
-if ( ! function_exists( 'lsx_wc_add_to_cart_message_html' ) ) :
446
+if ( ! function_exists('lsx_wc_add_to_cart_message_html')) :
447 447
 
448 448
 	/**
449 449
 	 * Changes the "added to cart" message HTML.
@@ -451,39 +451,39 @@  discard block
 block discarded – undo
451 451
 	 * @package    lsx
452 452
 	 * @subpackage woocommerce
453 453
 	 */
454
-	function lsx_wc_add_to_cart_message_html( $message, $products ) {
454
+	function lsx_wc_add_to_cart_message_html($message, $products) {
455 455
 		$message = '<div class="woocommerce-message-added-to-cart">' . $message . '</div>';
456 456
 		return $message;
457 457
 	}
458 458
 
459
-	add_filter( 'wc_add_to_cart_message_html', 'lsx_wc_add_to_cart_message_html', 20, 2 );
459
+	add_filter('wc_add_to_cart_message_html', 'lsx_wc_add_to_cart_message_html', 20, 2);
460 460
 
461 461
 endif;
462 462
 
463
-if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.3', '>=' ) ) {
464
-	add_filter( 'woocommerce_add_to_cart_fragments', 'lsx_wc_cart_link_fragment' );
463
+if (defined('WC_VERSION') && version_compare(WC_VERSION, '2.3', '>=')) {
464
+	add_filter('woocommerce_add_to_cart_fragments', 'lsx_wc_cart_link_fragment');
465 465
 } else {
466
-	add_filter( 'add_to_cart_fragments', 'lsx_wc_cart_link_fragment' );
466
+	add_filter('add_to_cart_fragments', 'lsx_wc_cart_link_fragment');
467 467
 }
468 468
 
469
-remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 );
469
+remove_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 10);
470 470
 
471
-add_action( 'woocommerce_after_shop_loop', 'lsx_wc_sorting_wrapper', 9 );
472
-add_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10 );
473
-add_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 );
474
-add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 30 );
475
-add_action( 'woocommerce_after_shop_loop', 'lsx_wc_sorting_wrapper_close', 31 );
471
+add_action('woocommerce_after_shop_loop', 'lsx_wc_sorting_wrapper', 9);
472
+add_action('woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10);
473
+add_action('woocommerce_after_shop_loop', 'woocommerce_result_count', 20);
474
+add_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 30);
475
+add_action('woocommerce_after_shop_loop', 'lsx_wc_sorting_wrapper_close', 31);
476 476
 
477
-remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
478
-remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
477
+remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
478
+remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30);
479 479
 
480
-add_action( 'woocommerce_before_shop_loop', 'lsx_wc_sorting_wrapper', 9 );
481
-add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );
482
-add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
483
-add_action( 'woocommerce_before_shop_loop', 'lsx_wc_woocommerce_pagination', 30 );
484
-add_action( 'woocommerce_before_shop_loop', 'lsx_wc_sorting_wrapper_close', 31 );
480
+add_action('woocommerce_before_shop_loop', 'lsx_wc_sorting_wrapper', 9);
481
+add_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10);
482
+add_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
483
+add_action('woocommerce_before_shop_loop', 'lsx_wc_woocommerce_pagination', 30);
484
+add_action('woocommerce_before_shop_loop', 'lsx_wc_sorting_wrapper_close', 31);
485 485
 
486
-if ( ! function_exists( 'lsx_wc_sorting_wrapper' ) ) :
486
+if ( ! function_exists('lsx_wc_sorting_wrapper')) :
487 487
 
488 488
 	/**
489 489
 	 * Sorting wrapper.
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 
498 498
 endif;
499 499
 
500
-if ( ! function_exists( 'lsx_wc_sorting_wrapper_close' ) ) :
500
+if ( ! function_exists('lsx_wc_sorting_wrapper_close')) :
501 501
 
502 502
 	/**
503 503
 	 * Sorting wrapper close.
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 
512 512
 endif;
513 513
 
514
-if ( ! function_exists( 'lsx_wc_product_columns_wrapper_close' ) ) :
514
+if ( ! function_exists('lsx_wc_product_columns_wrapper_close')) :
515 515
 
516 516
 	/**
517 517
 	 * Product columns wrapper close.
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 
526 526
 endif;
527 527
 
528
-if ( ! function_exists( 'lsx_wc_woocommerce_pagination' ) ) :
528
+if ( ! function_exists('lsx_wc_woocommerce_pagination')) :
529 529
 
530 530
 	/**
531 531
 	 * LSX WooCommerce Pagination
@@ -537,14 +537,14 @@  discard block
 block discarded – undo
537 537
 	 * @subpackage woocommerce
538 538
 	 */
539 539
 	function lsx_wc_woocommerce_pagination() {
540
-		if ( woocommerce_products_will_display() ) {
540
+		if (woocommerce_products_will_display()) {
541 541
 			woocommerce_pagination();
542 542
 		}
543 543
 	}
544 544
 
545 545
 endif;
546 546
 
547
-if ( ! function_exists( 'lsx_customizer_wc_controls' ) ) :
547
+if ( ! function_exists('lsx_customizer_wc_controls')) :
548 548
 
549 549
 	/**
550 550
 	 * Returns an array of the core panel.
@@ -554,10 +554,10 @@  discard block
 block discarded – undo
554 554
 	 *
555 555
 	 * @return $lsx_controls array()
556 556
 	 */
557
-	function lsx_customizer_wc_controls( $lsx_controls ) {
557
+	function lsx_customizer_wc_controls($lsx_controls) {
558 558
 		$lsx_controls['panels']['lsx-wc'] = array(
559
-			'title'       => esc_html__( 'WooCommerce', 'lsx' ),
560
-			'description' => esc_html__( 'Change the WooCommerce settings.', 'lsx' ),
559
+			'title'       => esc_html__('WooCommerce', 'lsx'),
560
+			'description' => esc_html__('Change the WooCommerce settings.', 'lsx'),
561 561
 			'priority'    => 23,
562 562
 		);
563 563
 
@@ -566,8 +566,8 @@  discard block
 block discarded – undo
566 566
 		 */
567 567
 
568 568
 		$lsx_controls['sections']['lsx-wc-global'] = array(
569
-			'title'       => esc_html__( 'Global', 'lsx' ),
570
-			'description' => esc_html__( 'Change the WooCommerce global settings.', 'lsx' ),
569
+			'title'       => esc_html__('Global', 'lsx'),
570
+			'description' => esc_html__('Change the WooCommerce global settings.', 'lsx'),
571 571
 			'panel'       => 'lsx-wc',
572 572
 			'priority'    => 1,
573 573
 		);
@@ -578,8 +578,8 @@  discard block
 block discarded – undo
578 578
 		);
579 579
 
580 580
 		$lsx_controls['fields']['lsx_wc_mobile_footer_bar_status'] = array(
581
-			'label'       => esc_html__( 'Footer Bar', 'lsx' ),
582
-			'description' => esc_html__( 'Enable the mobile footer bar.', 'lsx' ),
581
+			'label'       => esc_html__('Footer Bar', 'lsx'),
582
+			'description' => esc_html__('Enable the mobile footer bar.', 'lsx'),
583 583
 			'section'     => 'lsx-wc-global',
584 584
 			'type'        => 'checkbox',
585 585
 			'priority'    => 1,
@@ -590,8 +590,8 @@  discard block
 block discarded – undo
590 590
 		 */
591 591
 
592 592
 		$lsx_controls['sections']['lsx-wc-cart'] = array(
593
-			'title'       => esc_html__( 'Cart', 'lsx' ),
594
-			'description' => esc_html__( 'Change the WooCommerce cart settings.', 'lsx' ),
593
+			'title'       => esc_html__('Cart', 'lsx'),
594
+			'description' => esc_html__('Change the WooCommerce cart settings.', 'lsx'),
595 595
 			'panel'       => 'lsx-wc',
596 596
 			'priority'    => 2,
597 597
 		);
@@ -602,8 +602,8 @@  discard block
 block discarded – undo
602 602
 		);
603 603
 
604 604
 		$lsx_controls['fields']['lsx_header_wc_cart'] = array(
605
-			'label'       => esc_html__( 'Menu Item', 'lsx' ),
606
-			'description' => esc_html__( 'Enable the cart menu item.', 'lsx' ),
605
+			'label'       => esc_html__('Menu Item', 'lsx'),
606
+			'description' => esc_html__('Enable the cart menu item.', 'lsx'),
607 607
 			'section'     => 'lsx-wc-cart',
608 608
 			'type'        => 'checkbox',
609 609
 			'priority'    => 1,
@@ -612,11 +612,11 @@  discard block
 block discarded – undo
612 612
 		return $lsx_controls;
613 613
 	}
614 614
 
615
-	add_filter( 'lsx_customizer_controls', 'lsx_customizer_wc_controls' );
615
+	add_filter('lsx_customizer_controls', 'lsx_customizer_wc_controls');
616 616
 
617 617
 endif;
618 618
 
619
-if ( ! function_exists( 'lsx_wc_global_header_title' ) ) :
619
+if ( ! function_exists('lsx_wc_global_header_title')) :
620 620
 
621 621
 	/**
622 622
 	 * Move the shop title into the global header
@@ -624,21 +624,21 @@  discard block
 block discarded – undo
624 624
 	 * @package    lsx
625 625
 	 * @subpackage the-events-calendar
626 626
 	 */
627
-	function lsx_wc_global_header_title( $title ) {
627
+	function lsx_wc_global_header_title($title) {
628 628
 
629
-		if ( is_woocommerce() && is_shop() ) {
629
+		if (is_woocommerce() && is_shop()) {
630 630
 
631
-			$title = __( 'Shop', 'lsx' );
631
+			$title = __('Shop', 'lsx');
632 632
 		}
633 633
 
634 634
 		return $title;
635 635
 	}
636
-	add_filter( 'lsx_global_header_title', 'lsx_wc_global_header_title', 200, 1 );
636
+	add_filter('lsx_global_header_title', 'lsx_wc_global_header_title', 200, 1);
637 637
 
638 638
 endif;
639 639
 
640 640
 
641
-if ( ! function_exists( 'lsx_wc_footer_bar' ) ) :
641
+if ( ! function_exists('lsx_wc_footer_bar')) :
642 642
 
643 643
 	/**
644 644
 	 * Display WC footer bar.
@@ -647,47 +647,47 @@  discard block
 block discarded – undo
647 647
 	 * @subpackage woocommerce
648 648
 	 */
649 649
 	function lsx_wc_footer_bar() {
650
-		$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
651
-		if ( ! empty( get_theme_mod( 'lsx_wc_mobile_footer_bar_status', '1' ) ) ) :
650
+		$cart_url = function_exists('wc_get_cart_url') ? wc_get_cart_url() : WC()->cart->get_cart_url();
651
+		if ( ! empty(get_theme_mod('lsx_wc_mobile_footer_bar_status', '1'))) :
652 652
 			?>
653 653
 			<div class="lsx-wc-footer-bar">
654
-				<form role="search" method="get" action="<?php echo esc_url( home_url() ); ?>" class="lsx-wc-footer-bar-form">
654
+				<form role="search" method="get" action="<?php echo esc_url(home_url()); ?>" class="lsx-wc-footer-bar-form">
655 655
 					<fieldset>
656
-						<legend class="screen-reader-text"><?php esc_html_e( 'Search products', 'lsx' ); ?></legend>
657
-						<input type="search" name="s" placeholder="<?php esc_attr_e( 'Search products...', 'lsx' ); ?>" class="form-control">
656
+						<legend class="screen-reader-text"><?php esc_html_e('Search products', 'lsx'); ?></legend>
657
+						<input type="search" name="s" placeholder="<?php esc_attr_e('Search products...', 'lsx'); ?>" class="form-control">
658 658
 					</fieldset>
659 659
 				</form>
660 660
 
661 661
 				<ul class="lsx-wc-footer-bar-items">
662 662
 					<li class="lsx-wc-footer-bar-item">
663
-						<a href="<?php echo esc_url( home_url() ); ?>" class="lsx-wc-footer-bar-link">
663
+						<a href="<?php echo esc_url(home_url()); ?>" class="lsx-wc-footer-bar-link">
664 664
 							<i class="fa fa-home" aria-hidden="true"></i>
665
-							<span><?php esc_html_e( 'Home', 'lsx' ); ?></span>
665
+							<span><?php esc_html_e('Home', 'lsx'); ?></span>
666 666
 						</a>
667 667
 					</li>
668 668
 
669 669
 					<li class="lsx-wc-footer-bar-item">
670
-						<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="lsx-wc-footer-bar-link">
670
+						<a href="<?php echo esc_url(get_permalink(get_option('woocommerce_myaccount_page_id'))); ?>" class="lsx-wc-footer-bar-link">
671 671
 							<i class="fa fa-user" aria-hidden="true"></i>
672
-							<span><?php esc_html_e( 'Account', 'lsx' ); ?></span>
672
+							<span><?php esc_html_e('Account', 'lsx'); ?></span>
673 673
 						</a>
674 674
 					</li>
675 675
 
676 676
 					<li class="lsx-wc-footer-bar-item">
677 677
 						<a href="#" class="lsx-wc-footer-bar-link lsx-wc-footer-bar-link-toogle">
678 678
 							<i class="fa fa-search" aria-hidden="true"></i>
679
-							<span><?php esc_html_e( 'Search', 'lsx' ); ?></span>
679
+							<span><?php esc_html_e('Search', 'lsx'); ?></span>
680 680
 						</a>
681 681
 					</li>
682 682
 
683 683
 					<li class="lsx-wc-footer-bar-item">
684
-						<a href="<?php echo esc_url( $cart_url ); ?>" class="lsx-wc-footer-bar-link">
684
+						<a href="<?php echo esc_url($cart_url); ?>" class="lsx-wc-footer-bar-link">
685 685
 							<i class="fa fa-shopping-basket" aria-hidden="true"></i>
686 686
 							<?php $count = WC()->cart->get_cart_contents_count(); ?>
687
-							<?php if ( ! empty( $count ) ) : ?>
688
-								<span class="lsx-wc-footer-bar-count"><?php echo wp_kses_data( $count ); ?></span>
687
+							<?php if ( ! empty($count)) : ?>
688
+								<span class="lsx-wc-footer-bar-count"><?php echo wp_kses_data($count); ?></span>
689 689
 							<?php endif; ?>
690
-							<span><?php esc_html_e( 'Cart', 'lsx' ); ?></span>
690
+							<span><?php esc_html_e('Cart', 'lsx'); ?></span>
691 691
 						</a>
692 692
 					</li>
693 693
 				</ul>
@@ -696,11 +696,11 @@  discard block
 block discarded – undo
696 696
 		endif;
697 697
 	}
698 698
 
699
-	add_action( 'lsx_body_bottom', 'lsx_wc_footer_bar', 15 );
699
+	add_action('lsx_body_bottom', 'lsx_wc_footer_bar', 15);
700 700
 
701 701
 endif;
702 702
 
703
-if ( ! function_exists( 'lsx_wc_body_class' ) ) :
703
+if ( ! function_exists('lsx_wc_body_class')) :
704 704
 
705 705
 	/**
706 706
 	 * Changes body class.
@@ -708,25 +708,25 @@  discard block
 block discarded – undo
708 708
 	 * @package    lsx
709 709
 	 * @subpackage woocommerce
710 710
 	 */
711
-	function lsx_wc_body_class( $classes ) {
711
+	function lsx_wc_body_class($classes) {
712 712
 		global $post;
713 713
 
714
-		if ( $post && class_exists( 'WC_Wishlists_Pages' ) && WC_Wishlists_Pages::is_wishlist_page( $post->post_name ) ) {
714
+		if ($post && class_exists('WC_Wishlists_Pages') && WC_Wishlists_Pages::is_wishlist_page($post->post_name)) {
715 715
 			$classes[] = 'woocommerce-page woocommerce-wishlist';
716 716
 		}
717 717
 
718
-		if ( ! empty( get_theme_mod( 'lsx_wc_mobile_footer_bar_status', '1' ) ) ) {
718
+		if ( ! empty(get_theme_mod('lsx_wc_mobile_footer_bar_status', '1'))) {
719 719
 			$classes[] = 'lsx-wc-has-footer-bar';
720 720
 		}
721 721
 
722 722
 		return $classes;
723 723
 	}
724 724
 
725
-	add_filter( 'body_class', 'lsx_wc_body_class', 2999 );
725
+	add_filter('body_class', 'lsx_wc_body_class', 2999);
726 726
 
727 727
 endif;
728 728
 
729
-if ( ! function_exists( 'lsx_wc_downloadable_products' ) ) :
729
+if ( ! function_exists('lsx_wc_downloadable_products')) :
730 730
 
731 731
 	/**
732 732
 	 * Changes downloads "download" button text.
@@ -734,19 +734,19 @@  discard block
 block discarded – undo
734 734
 	 * @package    lsx
735 735
 	 * @subpackage woocommerce
736 736
 	 */
737
-	function lsx_wc_downloadable_products( $downloads ) {
738
-		foreach ( $downloads as $i => $download ) {
739
-			$downloads[ $i ]['download_name'] = esc_html__( 'Download', 'lsx' );
737
+	function lsx_wc_downloadable_products($downloads) {
738
+		foreach ($downloads as $i => $download) {
739
+			$downloads[$i]['download_name'] = esc_html__('Download', 'lsx');
740 740
 		}
741 741
 
742 742
 		return $downloads;
743 743
 	}
744 744
 
745
-	add_filter( 'woocommerce_customer_get_downloadable_products', 'lsx_wc_downloadable_products', 2999 );
745
+	add_filter('woocommerce_customer_get_downloadable_products', 'lsx_wc_downloadable_products', 2999);
746 746
 
747 747
 endif;
748 748
 
749
-if ( ! function_exists( 'lsx_wc_move_bundle_products' ) ) :
749
+if ( ! function_exists('lsx_wc_move_bundle_products')) :
750 750
 
751 751
 	/**
752 752
 	 * WooCommerce - Move the bundle products to a tab.
@@ -754,46 +754,46 @@  discard block
 block discarded – undo
754 754
 	 * @package    lsx
755 755
 	 * @subpackage woocommerce
756 756
 	 */
757
-	function lsx_wc_move_bundle_products( $tabs ) {
757
+	function lsx_wc_move_bundle_products($tabs) {
758 758
 		global $product, $post;
759 759
 
760
-		if ( method_exists( $product, 'get_bundled_items' ) ) {
760
+		if (method_exists($product, 'get_bundled_items')) {
761 761
 			$bundled_items = $product->get_bundled_items();
762 762
 
763
-			if ( ! empty( $bundled_items ) ) {
763
+			if ( ! empty($bundled_items)) {
764 764
 				$tabs['bundled_products'] = array(
765
-					'title'    => __( 'Included Products', 'lsx' ),
765
+					'title'    => __('Included Products', 'lsx'),
766 766
 					'priority' => 10,
767 767
 					'callback' => 'lsx_wc_bundle_products',
768 768
 				);
769 769
 			}
770 770
 		}
771 771
 
772
-		if ( isset( $tabs['description'] ) ) {
772
+		if (isset($tabs['description'])) {
773 773
 			$tabs['description']['priority'] = 5;
774 774
 		}
775 775
 
776
-		if ( isset( $tabs['reviews'] ) ) {
776
+		if (isset($tabs['reviews'])) {
777 777
 			$tabs['reviews']['priority'] = 15;
778 778
 		}
779 779
 
780
-		if ( isset( $tabs['product_enquiry'] ) ) {
780
+		if (isset($tabs['product_enquiry'])) {
781 781
 			$tabs['product_enquiry']['priority'] = 20;
782 782
 		}
783 783
 
784 784
 		return $tabs;
785 785
 	}
786 786
 
787
-	add_action( 'woocommerce_product_tabs', 'lsx_wc_move_bundle_products', 50 );
787
+	add_action('woocommerce_product_tabs', 'lsx_wc_move_bundle_products', 50);
788 788
 
789 789
 endif;
790 790
 
791
-if ( ! function_exists( 'lsx_wc_bundle_products' ) ) :
791
+if ( ! function_exists('lsx_wc_bundle_products')) :
792 792
 
793 793
 	function lsx_wc_bundle_products() {
794 794
 		global $product, $post;
795 795
 
796
-		if ( method_exists( $product, 'get_bundled_items' ) ) {
796
+		if (method_exists($product, 'get_bundled_items')) {
797 797
 			$bundled_items = $product->get_bundled_items();
798 798
 
799 799
 			// do_action( 'woocommerce_before_bundled_items', $product );
@@ -809,16 +809,16 @@  discard block
 block discarded – undo
809 809
 			// $this->widget_start( $args, $instance );
810 810
 
811 811
 			// @codingStandardsIgnoreLine
812
-			echo apply_filters( 'woocommerce_before_widget_product_list', '<ul class="product_list_widget">' );
812
+			echo apply_filters('woocommerce_before_widget_product_list', '<ul class="product_list_widget">');
813 813
 
814
-			foreach ( $bundled_items as $bundled_item ) {
815
-				$product = wc_get_product( $bundled_item->item_data['product_id'] );
816
-				wc_get_template( 'content-widget-product.php' );
814
+			foreach ($bundled_items as $bundled_item) {
815
+				$product = wc_get_product($bundled_item->item_data['product_id']);
816
+				wc_get_template('content-widget-product.php');
817 817
 				$product = $product_original;
818 818
 			}
819 819
 
820 820
 			// @codingStandardsIgnoreLine
821
-			echo apply_filters( 'woocommerce_after_widget_product_list', '</ul>' );
821
+			echo apply_filters('woocommerce_after_widget_product_list', '</ul>');
822 822
 		}
823 823
 
824 824
 		// $this->widget_end( $args );
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 endif;
828 828
 
829 829
 
830
-if ( ! function_exists( 'lsx_wc_product_searchform' ) ) :
830
+if ( ! function_exists('lsx_wc_product_searchform')) :
831 831
 	/**
832 832
 	 * woo_custom_product_searchform
833 833
 	 *
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 	 * @since       1.0
836 836
 	 * @return      void
837 837
 	 */
838
-	function lsx_wc_product_searchform( $form ) {
838
+	function lsx_wc_product_searchform($form) {
839 839
 
840 840
 		$form = '
841 841
 			<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url( home_url( \'/\' ) ); ?>">
@@ -856,42 +856,42 @@  discard block
 block discarded – undo
856 856
 
857 857
 	}
858 858
 endif;
859
-add_filter( 'get_product_search_form', 'lsx_wc_product_searchform', 10, 1 );
859
+add_filter('get_product_search_form', 'lsx_wc_product_searchform', 10, 1);
860 860
 
861 861
 	/**
862 862
 	 * Output the pagination.
863 863
 	 */
864 864
 function woocommerce_pagination() {
865
-	if ( ! wc_get_loop_prop( 'is_paginated' ) || ! woocommerce_products_will_display() ) {
865
+	if ( ! wc_get_loop_prop('is_paginated') || ! woocommerce_products_will_display()) {
866 866
 		return;
867 867
 	}
868 868
 	$args = array(
869
-		'total'   => wc_get_loop_prop( 'total_pages' ),
870
-		'current' => wc_get_loop_prop( 'current_page' ),
869
+		'total'   => wc_get_loop_prop('total_pages'),
870
+		'current' => wc_get_loop_prop('current_page'),
871 871
 	);
872 872
 
873
-	if ( wc_get_loop_prop( 'is_shortcode' ) ) {
874
-		$args['base']   = esc_url_raw( add_query_arg( 'product-page', '%#%', false ) );
873
+	if (wc_get_loop_prop('is_shortcode')) {
874
+		$args['base']   = esc_url_raw(add_query_arg('product-page', '%#%', false));
875 875
 		$args['format'] = '?product-page = %#%';
876 876
 	} else {
877
-		$args['base']   = esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) );
877
+		$args['base']   = esc_url_raw(str_replace(999999999, '%#%', remove_query_arg('add-to-cart', get_pagenum_link(999999999, false))));
878 878
 		$args['format'] = '';
879 879
 	}
880 880
 
881
-	echo wp_kses_post( '<div class="lsx-pagination-wrapper">' );
882
-	$template = wc_get_template_html( 'loop/pagination.php', $args );
883
-	$template = str_replace( 'woocommerce-pagination', 'lsx-pagination', $template );
884
-	echo wp_kses_post( $template );
885
-	echo wp_kses_post( '</div>' );
881
+	echo wp_kses_post('<div class="lsx-pagination-wrapper">');
882
+	$template = wc_get_template_html('loop/pagination.php', $args);
883
+	$template = str_replace('woocommerce-pagination', 'lsx-pagination', $template);
884
+	echo wp_kses_post($template);
885
+	echo wp_kses_post('</div>');
886 886
 }
887 887
 
888
-function lsx_wc_pagination_args( $args ) {
889
-	$args['prev_text'] = '<span class="meta-nav">&larr;</span> ' . esc_html__( 'Previous', 'lsx' );
890
-	$args['next_text'] = esc_html__( 'Next', 'lsx' ) . ' <span class="meta-nav">&rarr;</span>';
888
+function lsx_wc_pagination_args($args) {
889
+	$args['prev_text'] = '<span class="meta-nav">&larr;</span> ' . esc_html__('Previous', 'lsx');
890
+	$args['next_text'] = esc_html__('Next', 'lsx') . ' <span class="meta-nav">&rarr;</span>';
891 891
 	$args['type']      = 'plain';
892 892
 	return $args;
893 893
 }
894
-add_filter( 'woocommerce_pagination_args', 'lsx_wc_pagination_args', 10, 1 );
894
+add_filter('woocommerce_pagination_args', 'lsx_wc_pagination_args', 10, 1);
895 895
 
896 896
 
897 897
 /**
@@ -902,19 +902,19 @@  discard block
 block discarded – undo
902 902
  *
903 903
  * @return array
904 904
  */
905
-function lsx_wc_product_widget_template( $located, $template_name ) {
906
-	if ( 'content-widget-product.php' === $template_name || 'content-widget-review.php' === $template_name ) {
905
+function lsx_wc_product_widget_template($located, $template_name) {
906
+	if ('content-widget-product.php' === $template_name || 'content-widget-review.php' === $template_name) {
907 907
 
908 908
 		$new_location = get_stylesheet_directory() . '/partials/' . $template_name;
909
-		if ( file_exists( $new_location ) ) {
909
+		if (file_exists($new_location)) {
910 910
 			$located = $new_location;
911 911
 		} else {
912 912
 			$new_location = get_parent_theme_file_path() . '/partials/' . $template_name;
913
-			if ( file_exists( $new_location ) ) {
913
+			if (file_exists($new_location)) {
914 914
 				$located = $new_location;
915 915
 			}
916 916
 		}
917 917
 	}
918 918
 	return $located;
919 919
 }
920
-add_filter( 'wc_get_template', 'lsx_wc_product_widget_template', 90, 2 );
920
+add_filter('wc_get_template', 'lsx_wc_product_widget_template', 90, 2);
Please login to merge, or discard this patch.