Passed
Push — master ( fa9e4a...d9cbdc )
by Warwick
02:52
created
includes/hooks.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage hooks
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 function lsx_body_top() {
20
-	do_action( 'lsx_body_top' );
20
+	do_action('lsx_body_top');
21 21
 }
22 22
 
23 23
 function lsx_body_bottom() {
24
-	do_action( 'lsx_body_bottom' );
24
+	do_action('lsx_body_bottom');
25 25
 }
26 26
 
27 27
 /**
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
  */
32 32
 
33 33
 function lsx_head_top() {
34
-	do_action( 'lsx_head_top' );
34
+	do_action('lsx_head_top');
35 35
 }
36 36
 
37 37
 function lsx_head_bottom() {
38
-	do_action( 'lsx_head_bottom' );
38
+	do_action('lsx_head_bottom');
39 39
 }
40 40
 
41 41
 /**
@@ -45,27 +45,27 @@  discard block
 block discarded – undo
45 45
  */
46 46
 
47 47
 function lsx_header_before() {
48
-	do_action( 'lsx_header_before' );
48
+	do_action('lsx_header_before');
49 49
 }
50 50
 
51 51
 function lsx_header_after() {
52
-	do_action( 'lsx_header_after' );
52
+	do_action('lsx_header_after');
53 53
 }
54 54
 
55 55
 function lsx_header_top() {
56
-	do_action( 'lsx_header_top' );
56
+	do_action('lsx_header_top');
57 57
 }
58 58
 
59 59
 function lsx_header_bottom() {
60
-	do_action( 'lsx_header_bottom' );
60
+	do_action('lsx_header_bottom');
61 61
 }
62 62
 
63 63
 function lsx_nav_before() {
64
-	do_action( 'lsx_nav_before' );
64
+	do_action('lsx_nav_before');
65 65
 }
66 66
 
67 67
 function lsx_nav_after() {
68
-	do_action( 'lsx_nav_after' );
68
+	do_action('lsx_nav_after');
69 69
 }
70 70
 
71 71
 /**
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
  */
76 76
 
77 77
 function lsx_banner_content() {
78
-	do_action( 'lsx_banner_content' );
78
+	do_action('lsx_banner_content');
79 79
 }
80 80
 
81 81
 function lsx_banner_inner_top() {
82
-	do_action( 'lsx_banner_inner_top' );
82
+	do_action('lsx_banner_inner_top');
83 83
 }
84 84
 
85 85
 function lsx_banner_inner_bottom() {
86
-	do_action( 'lsx_banner_inner_bottom' );
86
+	do_action('lsx_banner_inner_bottom');
87 87
 }
88 88
 
89 89
 /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
  */
94 94
 
95 95
 function lsx_global_header_inner_bottom() {
96
-	do_action( 'lsx_global_header_inner_bottom' );
96
+	do_action('lsx_global_header_inner_bottom');
97 97
 }
98 98
 
99 99
 /**
@@ -103,35 +103,35 @@  discard block
 block discarded – undo
103 103
  */
104 104
 
105 105
 function lsx_content_wrap_before() {
106
-	do_action( 'lsx_content_wrap_before' );
106
+	do_action('lsx_content_wrap_before');
107 107
 }
108 108
 
109 109
 function lsx_content_wrap_after() {
110
-	do_action( 'lsx_content_wrap_after' );
110
+	do_action('lsx_content_wrap_after');
111 111
 }
112 112
 
113 113
 function lsx_content_before() {
114
-	do_action( 'lsx_content_before' );
114
+	do_action('lsx_content_before');
115 115
 }
116 116
 
117 117
 function lsx_content_after() {
118
-	do_action( 'lsx_content_after' );
118
+	do_action('lsx_content_after');
119 119
 }
120 120
 
121 121
 function lsx_content_top() {
122
-	do_action( 'lsx_content_top' );
122
+	do_action('lsx_content_top');
123 123
 }
124 124
 
125 125
 function lsx_content_bottom() {
126
-	do_action( 'lsx_content_bottom' );
126
+	do_action('lsx_content_bottom');
127 127
 }
128 128
 
129 129
 function lsx_content_post_tags() {
130
-	do_action( 'lsx_content_post_tags' );
130
+	do_action('lsx_content_post_tags');
131 131
 }
132 132
 
133 133
 function lsx_content_sharing() {
134
-	do_action( 'lsx_content_sharing' );
134
+	do_action('lsx_content_sharing');
135 135
 }
136 136
 
137 137
 /**
@@ -141,19 +141,19 @@  discard block
 block discarded – undo
141 141
  */
142 142
 
143 143
 function lsx_entry_before() {
144
-	do_action( 'lsx_entry_before' );
144
+	do_action('lsx_entry_before');
145 145
 }
146 146
 
147 147
 function lsx_entry_after() {
148
-	do_action( 'lsx_entry_after' );
148
+	do_action('lsx_entry_after');
149 149
 }
150 150
 
151 151
 function lsx_entry_top() {
152
-	do_action( 'lsx_entry_top' );
152
+	do_action('lsx_entry_top');
153 153
 }
154 154
 
155 155
 function lsx_entry_bottom() {
156
-	do_action( 'lsx_entry_bottom' );
156
+	do_action('lsx_entry_bottom');
157 157
 }
158 158
 
159 159
 /**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
  */
162 162
 
163 163
 function lsx_post_meta_top() {
164
-	do_action( 'lsx_post_meta_top' );
164
+	do_action('lsx_post_meta_top');
165 165
 }
166 166
 
167 167
 /**
@@ -171,27 +171,27 @@  discard block
 block discarded – undo
171 171
  */
172 172
 
173 173
 function lsx_widget_entry_before() {
174
-	do_action( 'lsx_widget_entry_before' );
174
+	do_action('lsx_widget_entry_before');
175 175
 }
176 176
 
177 177
 function lsx_widget_entry_after() {
178
-	do_action( 'lsx_widget_entry_after' );
178
+	do_action('lsx_widget_entry_after');
179 179
 }
180 180
 
181 181
 function lsx_widget_entry_top() {
182
-	do_action( 'lsx_widget_entry_top' );
182
+	do_action('lsx_widget_entry_top');
183 183
 }
184 184
 
185 185
 function lsx_widget_entry_bottom() {
186
-	do_action( 'lsx_widget_entry_bottom' );
186
+	do_action('lsx_widget_entry_bottom');
187 187
 }
188 188
 
189 189
 function lsx_widget_entry_content_top() {
190
-	do_action( 'lsx_widget_entry_content_top' );
190
+	do_action('lsx_widget_entry_content_top');
191 191
 }
192 192
 
193 193
 function lsx_widget_entry_content_bottom() {
194
-	do_action( 'lsx_widget_entry_content_bottom' );
194
+	do_action('lsx_widget_entry_content_bottom');
195 195
 }
196 196
 
197 197
 /**
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
  */
202 202
 
203 203
 function lsx_comments_before() {
204
-	do_action( 'lsx_comments_before' );
204
+	do_action('lsx_comments_before');
205 205
 }
206 206
 
207 207
 function lsx_comments_after() {
208
-	do_action( 'lsx_comments_after' );
208
+	do_action('lsx_comments_after');
209 209
 }
210 210
 
211 211
 /**
@@ -215,19 +215,19 @@  discard block
 block discarded – undo
215 215
  */
216 216
 
217 217
 function lsx_sidebars_before() {
218
-	do_action( 'lsx_sidebars_before' );
218
+	do_action('lsx_sidebars_before');
219 219
 }
220 220
 
221 221
 function lsx_sidebars_after() {
222
-	do_action( 'lsx_sidebars_after' );
222
+	do_action('lsx_sidebars_after');
223 223
 }
224 224
 
225 225
 function lsx_sidebar_top() {
226
-	do_action( 'lsx_sidebar_top' );
226
+	do_action('lsx_sidebar_top');
227 227
 }
228 228
 
229 229
 function lsx_sidebar_bottom() {
230
-	do_action( 'lsx_sidebar_bottom' );
230
+	do_action('lsx_sidebar_bottom');
231 231
 }
232 232
 
233 233
 /**
@@ -237,17 +237,17 @@  discard block
 block discarded – undo
237 237
  */
238 238
 
239 239
 function lsx_footer_before() {
240
-	do_action( 'lsx_footer_before' );
240
+	do_action('lsx_footer_before');
241 241
 }
242 242
 
243 243
 function lsx_footer_after() {
244
-	do_action( 'lsx_footer_after' );
244
+	do_action('lsx_footer_after');
245 245
 }
246 246
 
247 247
 function lsx_footer_top() {
248
-	do_action( 'lsx_footer_top' );
248
+	do_action('lsx_footer_top');
249 249
 }
250 250
 
251 251
 function lsx_footer_bottom() {
252
-	do_action( 'lsx_footer_bottom' );
252
+	do_action('lsx_footer_bottom');
253 253
 }
Please login to merge, or discard this patch.
partials/content-none.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,25 +8,25 @@
 block discarded – undo
8 8
 
9 9
 <section class="no-results not-found">
10 10
 	<header class="page-header">
11
-		<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' ); ?></h1>
11
+		<h1 class="page-title"><?php esc_html_e('Nothing Found', 'lsx'); ?></h1>
12 12
 	</header><!-- .page-header -->
13 13
 
14 14
 	<div class="page-content">
15 15
 
16
-		<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
16
+		<?php if (is_home() && current_user_can('publish_posts')) : ?>
17 17
 
18
-			<p><?php esc_html_e( 'Ready to publish your first post?', 'lsx' ); ?> <a href="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>"><?php esc_html_e( 'Get started here', 'lsx' ); ?></a></p>
18
+			<p><?php esc_html_e('Ready to publish your first post?', 'lsx'); ?> <a href="<?php echo esc_url(admin_url('post-new.php')); ?>"><?php esc_html_e('Get started here', 'lsx'); ?></a></p>
19 19
 
20
-		<?php elseif ( is_search() ) : ?>
20
+		<?php elseif (is_search()) : ?>
21 21
 
22
-			<p><?php esc_html_e( 'Your search for "', 'lsx' ); ?><?php echo get_search_query(); ?><?php esc_html_e( '" didn’t return any results… ', 'lsx' ); ?><br><?php esc_html_e( 'Please try another keyword', 'lsx' ); ?></p>
22
+			<p><?php esc_html_e('Your search for "', 'lsx'); ?><?php echo get_search_query(); ?><?php esc_html_e('" didn’t return any results… ', 'lsx'); ?><br><?php esc_html_e('Please try another keyword', 'lsx'); ?></p>
23 23
 
24
-			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
24
+			<?php echo wp_kses_post(apply_filters('lsx_404_search_form', get_search_form())); ?>
25 25
 
26 26
 		<?php else : ?>
27 27
 
28
-			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
29
-			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
28
+			<p><?php esc_html_e('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx'); ?></p>
29
+			<?php echo wp_kses_post(apply_filters('lsx_404_search_form', get_search_form())); ?>
30 30
 
31 31
 		<?php endif; ?>
32 32
 
Please login to merge, or discard this patch.
includes/layout.php 1 patch
Spacing   +105 added lines, -105 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,32 +123,32 @@  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 endif;
147 147
 	}
148
-	add_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
148
+	add_action('lsx_footer_before', 'lsx_add_footer_sidebar_area');
149 149
 endif;
150 150
 
151
-if ( ! function_exists( 'lsx_global_header' ) ) :
151
+if ( ! function_exists('lsx_global_header')) :
152 152
 	/**
153 153
 	 * Displays the global header.
154 154
 	 *
@@ -156,26 +156,26 @@  discard block
 block discarded – undo
156 156
 	 * @subpackage layout
157 157
 	 */
158 158
 	function lsx_global_header() {
159
-		$show_on_front  = get_option( 'show_on_front' );
159
+		$show_on_front  = get_option('show_on_front');
160 160
 		$queried_object = get_queried_object();
161 161
 		$default_size   = 'sm';
162
-		$size           = apply_filters( 'lsx_bootstrap_column_size', $default_size );
162
+		$size           = apply_filters('lsx_bootstrap_column_size', $default_size);
163 163
 
164 164
 		//Pages have their own banner function 'lsx_page_banner()'
165
-		if ( function_exists( 'is_woocommerce' ) && ( is_woocommerce() || is_checkout() || is_cart() || is_account_page() ) ) {
165
+		if (function_exists('is_woocommerce') && (is_woocommerce() || is_checkout() || is_cart() || is_account_page())) {
166 166
 			return;
167 167
 		}
168 168
 
169
-		if ( true === apply_filters( 'lsx_global_header_disable', false ) ) :
169
+		if (true === apply_filters('lsx_global_header_disable', false)) :
170 170
 			// Display only the breadcrumbs
171 171
 			?>
172
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
172
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
173 173
 				<?php lsx_global_header_inner_bottom(); ?>
174 174
 			</div>
175 175
 			<?php
176
-		elseif ( is_page() && ( 'page' !== $show_on_front || ! is_front_page() ) ) :
176
+		elseif (is_page() && ('page' !== $show_on_front || ! is_front_page())) :
177 177
 			?>
178
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
178
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
179 179
 				<?php lsx_global_header_inner_bottom(); ?>
180 180
 				<header class="archive-header">
181 181
 					<h1 class="archive-title"><?php the_title(); ?></h1>
@@ -183,26 +183,26 @@  discard block
 block discarded – undo
183 183
 
184 184
 			</div>
185 185
 			<?php
186
-		elseif ( is_single() && ! is_singular( 'post' ) ) :
186
+		elseif (is_single() && ! is_singular('post')) :
187 187
 			?>
188
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
188
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
189 189
 				<?php lsx_global_header_inner_bottom(); ?>
190 190
 				<header class="archive-header">
191
-					<h1 class="archive-title"><?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_title() ) ); ?></h1>
191
+					<h1 class="archive-title"><?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_title())); ?></h1>
192 192
 				</header>
193 193
 
194 194
 			</div>
195 195
 			<?php
196
-		elseif ( is_search() ) :
196
+		elseif (is_search()) :
197 197
 			?>
198
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
198
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
199 199
 				<?php lsx_global_header_inner_bottom(); ?>
200 200
 				<header class="archive-header">
201 201
 					<h1 class="archive-title">
202 202
 						<?php
203 203
 							printf(
204 204
 								/* Translators: %s: search term/query */
205
-								esc_html__( 'Search Results for: %s', 'lsx' ),
205
+								esc_html__('Search Results for: %s', 'lsx'),
206 206
 								'<span>' . get_search_query() . '</span>'
207 207
 							);
208 208
 						?>
@@ -211,12 +211,12 @@  discard block
 block discarded – undo
211 211
 
212 212
 			</div>
213 213
 			<?php
214
-		elseif ( is_author() ) :
214
+		elseif (is_author()) :
215 215
 			$author = get_the_author();
216
-			$author_avatar = get_avatar( get_the_author_meta( 'ID' ), 256 );
216
+			$author_avatar = get_avatar(get_the_author_meta('ID'), 256);
217 217
 			$author_bio = get_the_archive_description();
218 218
 			?>
219
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
219
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
220 220
 				<?php lsx_global_header_inner_bottom(); ?>
221 221
 				<header class="archive-header">
222 222
 					<h1 class="archive-title"><?php the_archive_title(); ?></h1>
@@ -224,16 +224,16 @@  discard block
 block discarded – undo
224 224
 
225 225
 			</div>
226 226
 			<?php
227
-		elseif ( is_archive() ) :
227
+		elseif (is_archive()) :
228 228
 			?>
229
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
229
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
230 230
 				<?php lsx_global_header_inner_bottom(); ?>
231 231
 				<header class="archive-header">
232 232
 					<h1 class="archive-title">
233
-						<?php if ( has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax( 'post_format' ) ) { ?>
234
-							<?php the_archive_title( esc_html__( 'Type:', 'lsx' ) ); ?>
233
+						<?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?>
234
+							<?php the_archive_title(esc_html__('Type:', 'lsx')); ?>
235 235
 						<?php } else { ?>
236
-							<?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_archive_title() ) ); ?>
236
+							<?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_archive_title())); ?>
237 237
 						<?php } ?>
238 238
 					</h1>
239 239
 
@@ -241,29 +241,29 @@  discard block
 block discarded – undo
241 241
 				</header>
242 242
 			</div>
243 243
 			<?php
244
-		elseif ( 'page' === $show_on_front && (int) get_option( 'page_for_posts' ) === $queried_object->ID ) :
244
+		elseif ('page' === $show_on_front && (int) get_option('page_for_posts') === $queried_object->ID) :
245 245
 			?>
246
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
246
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
247 247
 				<?php lsx_global_header_inner_bottom(); ?>
248 248
 				<header class="archive-header">
249
-					<h1 class="archive-title"><?php esc_html_e( 'Blog', 'lsx' ); ?></h1>
249
+					<h1 class="archive-title"><?php esc_html_e('Blog', 'lsx'); ?></h1>
250 250
 				</header>
251 251
 
252 252
 			</div>
253 253
 			<?php
254
-		elseif ( ! is_singular( 'post' ) ) :
254
+		elseif ( ! is_singular('post')) :
255 255
 			// Display only the breadcrumbs
256 256
 			?>
257
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
257
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
258 258
 				<?php lsx_global_header_inner_bottom(); ?>
259 259
 			</div>
260 260
 			<?php
261 261
 		endif;
262 262
 	}
263
-	add_action( 'lsx_content_wrap_before', 'lsx_global_header' );
263
+	add_action('lsx_content_wrap_before', 'lsx_global_header');
264 264
 endif;
265 265
 
266
-if ( ! function_exists( 'lsx_author_extra_info' ) ) :
266
+if ( ! function_exists('lsx_author_extra_info')) :
267 267
 	/**
268 268
 	 * Displays the author extra info.
269 269
 	 *
@@ -272,57 +272,57 @@  discard block
 block discarded – undo
272 272
 	 */
273 273
 	function lsx_author_extra_info() {
274 274
 		$default_size   = 'sm';
275
-		$size           = apply_filters( 'lsx_bootstrap_column_size', $default_size );
275
+		$size           = apply_filters('lsx_bootstrap_column_size', $default_size);
276 276
 
277
-		if ( is_author() ) :
278
-			$author_id         = get_the_author_meta( 'ID' );
277
+		if (is_author()) :
278
+			$author_id         = get_the_author_meta('ID');
279 279
 			$author            = get_the_author();
280
-			$author_avatar     = get_avatar( $author_id, 256 );
280
+			$author_avatar     = get_avatar($author_id, 256);
281 281
 			$author_bio        = get_the_archive_description();
282
-			$author_url        = get_the_author_meta( 'url', $author_id );
283
-			$author_email      = get_the_author_meta( 'email', $author_id );
284
-			$author_facebook   = get_the_author_meta( 'facebook', $author_id );
285
-			$author_twitter    = get_the_author_meta( 'twitter', $author_id );
286
-			$author_googleplus = get_the_author_meta( 'googleplus', $author_id );
282
+			$author_url        = get_the_author_meta('url', $author_id);
283
+			$author_email      = get_the_author_meta('email', $author_id);
284
+			$author_facebook   = get_the_author_meta('facebook', $author_id);
285
+			$author_twitter    = get_the_author_meta('twitter', $author_id);
286
+			$author_googleplus = get_the_author_meta('googleplus', $author_id);
287 287
 			?>
288
-			<div class="col-<?php echo esc_attr( $size ); ?>-12">
288
+			<div class="col-<?php echo esc_attr($size); ?>-12">
289 289
 				<div class="archive-author-data">
290
-					<figure class="archive-author-avatar"><?php echo wp_kses_post( $author_avatar ); ?></figure>
290
+					<figure class="archive-author-avatar"><?php echo wp_kses_post($author_avatar); ?></figure>
291 291
 
292
-					<?php if ( ! empty( $author_url ) || ! empty( $author_email ) || ! empty( $author_facebook ) || ! empty( $author_twitter ) || ! empty( $author_googleplus ) ) : ?>
292
+					<?php if ( ! empty($author_url) || ! empty($author_email) || ! empty($author_facebook) || ! empty($author_twitter) || ! empty($author_googleplus)) : ?>
293 293
 						<div class="archive-author-social-links">
294
-							<?php if ( ! empty( $author_url ) ) : ?>
295
-								<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>
294
+							<?php if ( ! empty($author_url)) : ?>
295
+								<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>
296 296
 							<?php endif; ?>
297 297
 
298
-							<?php if ( ! empty( $author_email ) ) : ?>
299
-								<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>
298
+							<?php if ( ! empty($author_email)) : ?>
299
+								<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>
300 300
 							<?php endif; ?>
301 301
 
302
-							<?php if ( ! empty( $author_facebook ) ) : ?>
303
-								<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>
302
+							<?php if ( ! empty($author_facebook)) : ?>
303
+								<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>
304 304
 							<?php endif; ?>
305 305
 
306
-							<?php if ( ! empty( $author_twitter ) ) : ?>
307
-								<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>
306
+							<?php if ( ! empty($author_twitter)) : ?>
307
+								<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>
308 308
 							<?php endif; ?>
309 309
 
310
-							<?php if ( ! empty( $author_googleplus ) ) : ?>
311
-								<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>
310
+							<?php if ( ! empty($author_googleplus)) : ?>
311
+								<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>
312 312
 							<?php endif; ?>
313 313
 						</div>
314 314
 					<?php endif; ?>
315 315
 
316
-					<?php if ( ! empty( $author_bio ) ) : ?>
317
-						<h2 class="archive-author-title text-center"><?php esc_html_e( 'About the author', 'lsx' ); ?></h2>
318
-						<p class="archive-author-bio"><?php echo wp_kses_post( $author_bio ); ?></p>
316
+					<?php if ( ! empty($author_bio)) : ?>
317
+						<h2 class="archive-author-title text-center"><?php esc_html_e('About the author', 'lsx'); ?></h2>
318
+						<p class="archive-author-bio"><?php echo wp_kses_post($author_bio); ?></p>
319 319
 					<?php endif; ?>
320 320
 
321 321
 					<h2 class="archive-author-posts text-center">
322 322
 						<?php
323
-						if ( '' !== $author ) {
324
-							esc_html_e( 'All posts by ', 'lsx' );
325
-							esc_html( $author );
323
+						if ('' !== $author) {
324
+							esc_html_e('All posts by ', 'lsx');
325
+							esc_html($author);
326 326
 						}
327 327
 						?>
328 328
 					</h2>
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
 			<?php
332 332
 		endif;
333 333
 	}
334
-	add_action( 'lsx_content_wrap_before', 'lsx_author_extra_info', 11 );
334
+	add_action('lsx_content_wrap_before', 'lsx_author_extra_info', 11);
335 335
 endif;
336 336
 
337
-if ( ! function_exists( 'lsx_post_header' ) ) :
337
+if ( ! function_exists('lsx_post_header')) :
338 338
 	/**
339 339
 	 * Displays the post header.
340 340
 	 *
@@ -343,21 +343,21 @@  discard block
 block discarded – undo
343 343
 	 */
344 344
 	function lsx_post_header() {
345 345
 		$default_size  = 'sm';
346
-		$size          = apply_filters( 'lsx_bootstrap_column_size', $default_size );
346
+		$size          = apply_filters('lsx_bootstrap_column_size', $default_size);
347 347
 
348
-		if ( is_singular( 'post' ) ) :
348
+		if (is_singular('post')) :
349 349
 			$format = get_post_format();
350 350
 
351
-			if ( false === $format ) {
351
+			if (false === $format) {
352 352
 				$format = 'standard';
353 353
 			}
354 354
 
355
-			$format = lsx_translate_format_to_fontawesome( $format );
355
+			$format = lsx_translate_format_to_fontawesome($format);
356 356
 			?>
357
-			<div class="archive-header-wrapper col-<?php echo esc_attr( $size ); ?>-12">
357
+			<div class="archive-header-wrapper col-<?php echo esc_attr($size); ?>-12">
358 358
 				<header class="archive-header">
359 359
 					<h1 class="archive-title">
360
-						<i class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></i>
360
+						<i class="format-link fa fa-<?php echo esc_attr($format); ?>"></i>
361 361
 						<span><?php the_title(); ?></span>
362 362
 					</h1>
363 363
 				</header>
@@ -365,10 +365,10 @@  discard block
 block discarded – undo
365 365
 			<?php
366 366
 		endif;
367 367
 	}
368
-	add_action( 'lsx_entry_top', 'lsx_post_header' );
368
+	add_action('lsx_entry_top', 'lsx_post_header');
369 369
 endif;
370 370
 
371
-if ( ! function_exists( 'lsx_add_viewport_meta_tag' ) ) :
371
+if ( ! function_exists('lsx_add_viewport_meta_tag')) :
372 372
 	/**
373 373
 	 * Add Viewport Meta Tag to head.
374 374
 	 *
@@ -380,10 +380,10 @@  discard block
 block discarded – undo
380 380
 		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
381 381
 		<?php
382 382
 	}
383
-	add_action( 'wp_head', 'lsx_add_viewport_meta_tag' );
383
+	add_action('wp_head', 'lsx_add_viewport_meta_tag');
384 384
 endif;
385 385
 
386
-if ( ! function_exists( 'lsx_header_search_form' ) ) :
386
+if ( ! function_exists('lsx_header_search_form')) :
387 387
 	/**
388 388
 	 * Add a search form to just above the nav menu.
389 389
 	 *
@@ -391,19 +391,19 @@  discard block
 block discarded – undo
391 391
 	 * @subpackage layout
392 392
 	 */
393 393
 	function lsx_header_search_form() {
394
-		$search_form = get_theme_mod( 'lsx_header_search', false );
394
+		$search_form = get_theme_mod('lsx_header_search', false);
395 395
 
396
-		if ( false !== $search_form || is_customize_preview() ) {
397
-			get_search_form( true );
396
+		if (false !== $search_form || is_customize_preview()) {
397
+			get_search_form(true);
398 398
 		}
399 399
 	}
400
-	add_action( 'lsx_nav_before', 'lsx_header_search_form', 0 );
400
+	add_action('lsx_nav_before', 'lsx_header_search_form', 0);
401 401
 endif;
402 402
 
403 403
 // Add entry meta to single post if active
404
-if ( ! function_exists( 'lsx_add_entry_meta' ) ) :
404
+if ( ! function_exists('lsx_add_entry_meta')) :
405 405
 	function lsx_add_entry_meta() {
406
-		if ( is_single() && is_singular( 'post' ) ) {
406
+		if (is_single() && is_singular('post')) {
407 407
 			?>
408 408
 			<div class="entry-meta">
409 409
 				<?php lsx_post_meta_single_top(); ?>
@@ -411,5 +411,5 @@  discard block
 block discarded – undo
411 411
 			<?php
412 412
 		}
413 413
 	}
414
-	add_action( 'lsx_entry_top', 'lsx_add_entry_meta', 0 );
414
+	add_action('lsx_entry_top', 'lsx_add_entry_meta', 0);
415 415
 endif;
Please login to merge, or discard this patch.
includes/classes/class-lsx-theme-customizer.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage customizer
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! class_exists( 'LSX_Theme_Customizer' ) ) :
13
+if ( ! class_exists('LSX_Theme_Customizer')) :
14 14
 
15 15
 	/**
16 16
 	 * Customizer Configuration File
@@ -26,90 +26,90 @@  discard block
 block discarded – undo
26 26
 		/**
27 27
 		 * Initialize the plugin by setting localization and loading public scripts and styles.
28 28
 		 */
29
-		public function __construct( $controls ) {
29
+		public function __construct($controls) {
30 30
 			require get_template_directory() . '/includes/classes/class-lsx-customize-core-control.php';
31 31
 			require get_template_directory() . '/includes/classes/class-lsx-customize-layout-control.php';
32 32
 			require get_template_directory() . '/includes/classes/class-lsx-customize-header-layout-control.php';
33 33
 
34 34
 			$this->controls = $controls;
35 35
 
36
-			add_action( 'customize_preview_init', array( $this, 'customize_preview_js' ), 20 );
37
-			add_action( 'customize_register', array( $this, 'customizer' ), 11 );
36
+			add_action('customize_preview_init', array($this, 'customize_preview_js'), 20);
37
+			add_action('customize_register', array($this, 'customizer'), 11);
38 38
 		}
39 39
 
40 40
 		/**
41 41
 		 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
42 42
 		 */
43 43
 		public function customize_preview_js() {
44
-			wp_enqueue_script( 'lsx_customizer', get_template_directory_uri() . '/assets/js/admin/customizer.js', array( 'customize-preview' ), LSX_VERSION, true );
44
+			wp_enqueue_script('lsx_customizer', get_template_directory_uri() . '/assets/js/admin/customizer.js', array('customize-preview'), LSX_VERSION, true);
45 45
 
46
-			wp_localize_script( 'lsx_customizer', 'lsx_customizer_params', array(
46
+			wp_localize_script('lsx_customizer', 'lsx_customizer_params', array(
47 47
 				'template_directory' => get_template_directory_uri(),
48
-			) );
48
+			));
49 49
 		}
50 50
 
51 51
 		/**
52 52
 		 * Create customiser controls.
53 53
 		 */
54
-		public function customizer( $wp_customize ) {
54
+		public function customizer($wp_customize) {
55 55
 			// Start panels.
56
-			if ( ! empty( $this->controls['panels'] ) ) {
57
-				foreach ( $this->controls['panels'] as $panel_slug => $args ) {
58
-					$this->add_panel( $panel_slug, $args, $wp_customize );
56
+			if ( ! empty($this->controls['panels'])) {
57
+				foreach ($this->controls['panels'] as $panel_slug => $args) {
58
+					$this->add_panel($panel_slug, $args, $wp_customize);
59 59
 				}
60 60
 			}
61 61
 
62 62
 			// Start sections.
63
-			if ( ! empty( $this->controls['sections'] ) ) {
64
-				foreach ( $this->controls['sections'] as $section_slug => $args ) {
65
-					$this->add_section( $section_slug, $args, $wp_customize );
63
+			if ( ! empty($this->controls['sections'])) {
64
+				foreach ($this->controls['sections'] as $section_slug => $args) {
65
+					$this->add_section($section_slug, $args, $wp_customize);
66 66
 				}
67 67
 			}
68 68
 
69 69
 			// Start settings.
70
-			if ( ! empty( $this->controls['settings'] ) ) {
71
-				foreach ( $this->controls['settings'] as $settings_slug => $args ) {
72
-					$this->add_setting( $settings_slug, $args, $wp_customize );
70
+			if ( ! empty($this->controls['settings'])) {
71
+				foreach ($this->controls['settings'] as $settings_slug => $args) {
72
+					$this->add_setting($settings_slug, $args, $wp_customize);
73 73
 				}
74 74
 			}
75 75
 
76 76
 			// Start fields.
77
-			if ( ! empty( $this->controls['fields'] ) ) {
78
-				foreach ( $this->controls['fields'] as $field_slug => $args ) {
79
-					$this->add_control( $field_slug, $args, $wp_customize );
77
+			if ( ! empty($this->controls['fields'])) {
78
+				foreach ($this->controls['fields'] as $field_slug => $args) {
79
+					$this->add_control($field_slug, $args, $wp_customize);
80 80
 				}
81 81
 			}
82 82
 
83 83
 			// Start selective refresh.
84
-			if ( ! empty( $this->controls['selective_refresh'] ) ) {
85
-				foreach ( $this->controls['selective_refresh'] as $field_slug => $args ) {
86
-					$this->add_selective_refresh( $field_slug, $args, $wp_customize );
84
+			if ( ! empty($this->controls['selective_refresh'])) {
85
+				foreach ($this->controls['selective_refresh'] as $field_slug => $args) {
86
+					$this->add_selective_refresh($field_slug, $args, $wp_customize);
87 87
 				}
88 88
 			}
89 89
 
90
-			$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
91
-			$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
92
-			$wp_customize->get_setting( 'background_color' )->transport = 'postMessage';
90
+			$wp_customize->get_setting('blogname')->transport         = 'postMessage';
91
+			$wp_customize->get_setting('blogdescription')->transport  = 'postMessage';
92
+			$wp_customize->get_setting('background_color')->transport = 'postMessage';
93 93
 
94
-			$wp_customize->selective_refresh->add_partial( 'blogname', array(
94
+			$wp_customize->selective_refresh->add_partial('blogname', array(
95 95
 				'selector'        => 'h1.site-title a',
96 96
 				'render_callback' => function() {
97
-					bloginfo( 'name' );
97
+					bloginfo('name');
98 98
 				},
99
-			) );
99
+			));
100 100
 
101
-			$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
101
+			$wp_customize->selective_refresh->add_partial('blogdescription', array(
102 102
 				'selector'        => '.site-description',
103 103
 				'render_callback' => function() {
104
-					bloginfo( 'description' );
104
+					bloginfo('description');
105 105
 				},
106
-			) );
106
+			));
107 107
 		}
108 108
 
109 109
 		/**
110 110
 		 * Create a panel.
111 111
 		 */
112
-		private function add_panel( $slug, $args, $wp_customize ) {
112
+		private function add_panel($slug, $args, $wp_customize) {
113 113
 			$default_args = array(
114 114
 				'title'       => null,
115 115
 				'description' => null,
@@ -117,57 +117,57 @@  discard block
 block discarded – undo
117 117
 
118 118
 			$wp_customize->add_panel(
119 119
 				$slug,
120
-				array_merge( $default_args, $args )
120
+				array_merge($default_args, $args)
121 121
 			);
122 122
 		}
123 123
 
124 124
 		/**
125 125
 		 * Create a section.
126 126
 		 */
127
-		private function add_section( $slug, $args, $wp_customize ) {
127
+		private function add_section($slug, $args, $wp_customize) {
128 128
 			$default_args = array(
129 129
 				'capability'  => 'edit_theme_options',
130 130
 				'description' => null,
131 131
 			);
132 132
 
133
-			$wp_customize->add_section( $slug, array_merge( $default_args, $args ) );
133
+			$wp_customize->add_section($slug, array_merge($default_args, $args));
134 134
 		}
135 135
 
136 136
 		/**
137 137
 		 * Create a setting.
138 138
 		 */
139
-		private function add_setting( $slug, $args, $wp_customize ) {
140
-			$wp_customize->add_setting( $slug,
141
-				array_merge( array(
139
+		private function add_setting($slug, $args, $wp_customize) {
140
+			$wp_customize->add_setting($slug,
141
+				array_merge(array(
142 142
 					'default'           => null,
143 143
 					'type'              => 'theme_mod',
144 144
 					'capability'        => 'edit_theme_options',
145 145
 					'transport'         => 'postMessage',
146 146
 					'sanitize_callback' => 'lsx_sanitize_choices',
147
-				), $args )
147
+				), $args)
148 148
 			);
149 149
 		}
150 150
 
151 151
 		/**
152 152
 		 * Create a control.
153 153
 		 */
154
-		private function add_control( $slug, $args, $wp_customize ) {
154
+		private function add_control($slug, $args, $wp_customize) {
155 155
 			$default_args = array();
156 156
 
157
-			if ( isset( $args['control'] ) && class_exists( $args['control'] ) ) {
157
+			if (isset($args['control']) && class_exists($args['control'])) {
158 158
 				$control_class = $args['control'];
159
-				unset( $args['control'] );
159
+				unset($args['control']);
160 160
 
161
-				$control = new $control_class( $wp_customize, $slug, array_merge( $default_args, $args ) );
162
-				$wp_customize->add_control( $control );
161
+				$control = new $control_class($wp_customize, $slug, array_merge($default_args, $args));
162
+				$wp_customize->add_control($control);
163 163
 			} else {
164
-				if ( isset( $args['control'] ) ) {
165
-					unset( $args['control'] );
164
+				if (isset($args['control'])) {
165
+					unset($args['control']);
166 166
 				}
167 167
 
168 168
 				$wp_customize->add_control(
169 169
 					$slug,
170
-					array_merge( $default_args, $args )
170
+					array_merge($default_args, $args)
171 171
 				);
172 172
 			}
173 173
 		}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		/**
176 176
 		 * Create a selective refresh.
177 177
 		 */
178
-		private function add_selective_refresh( $slug, $args, $wp_customize ) {
178
+		private function add_selective_refresh($slug, $args, $wp_customize) {
179 179
 			$default_args = array(
180 180
 				'selector'        => null,
181 181
 				'render_callback' => null,
@@ -183,23 +183,23 @@  discard block
 block discarded – undo
183 183
 
184 184
 			$wp_customize->selective_refresh->add_partial(
185 185
 				$slug,
186
-				array_merge( $default_args, $args )
186
+				array_merge($default_args, $args)
187 187
 			);
188 188
 		}
189 189
 
190 190
 		/**
191 191
 		 * Returns a registered field.
192 192
 		 */
193
-		public function get_control( $id ) {
194
-			$field = $this->controls['fields'][ $id ];
193
+		public function get_control($id) {
194
+			$field = $this->controls['fields'][$id];
195 195
 			return $field;
196 196
 		}
197 197
 
198 198
 		/**
199 199
 		 * Returns a registered setting.
200 200
 		 */
201
-		public function get_setting( $id ) {
202
-			$setting = $this->controls['settings'][ $id ];
201
+		public function get_setting($id) {
202
+			$setting = $this->controls['settings'][$id];
203 203
 			return $setting;
204 204
 		}
205 205
 
Please login to merge, or discard this patch.
includes/scripts.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage scripts
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_scripts' ) ) :
13
+if ( ! function_exists('lsx_scripts')) :
14 14
 
15 15
 	/**
16 16
 	 * Enqueue scripts, fonts and styles.
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
 endif;
28 28
 
29
-add_action( 'wp_enqueue_scripts', 'lsx_scripts', 5 );
29
+add_action('wp_enqueue_scripts', 'lsx_scripts', 5);
30 30
 
31
-if ( ! function_exists( 'lsx_admin_scripts' ) ) :
31
+if ( ! function_exists('lsx_admin_scripts')) :
32 32
 
33 33
 	/**
34 34
 	 * Enqueue scripts (admin).
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 	 * @subpackage scripts
38 38
 	 */
39 39
 	function lsx_admin_scripts() {
40
-		wp_enqueue_script( 'lsx-admin', get_template_directory_uri() . '/assets/js/admin/lsx-admin.js', array( 'jquery' ), LSX_VERSION, true );
40
+		wp_enqueue_script('lsx-admin', get_template_directory_uri() . '/assets/js/admin/lsx-admin.js', array('jquery'), LSX_VERSION, true);
41 41
 	}
42 42
 
43 43
 endif;
44 44
 
45
-add_action( 'admin_enqueue_scripts', 'lsx_admin_scripts' );
45
+add_action('admin_enqueue_scripts', 'lsx_admin_scripts');
46 46
 
47
-if ( ! function_exists( 'lsx_scripts_add_styles' ) ) :
47
+if ( ! function_exists('lsx_scripts_add_styles')) :
48 48
 
49 49
 	/**
50 50
 	 * Enqueue styles.
@@ -53,23 +53,23 @@  discard block
 block discarded – undo
53 53
 	 * @subpackage scripts
54 54
 	 */
55 55
 	function lsx_scripts_add_styles() {
56
-		wp_register_style( 'fontawesome', get_template_directory_uri() . '/assets/css/vendor/font-awesome.css', array(), LSX_VERSION );
57
-		wp_style_add_data( 'fontawesome', 'rtl', 'replace' );
56
+		wp_register_style('fontawesome', get_template_directory_uri() . '/assets/css/vendor/font-awesome.css', array(), LSX_VERSION);
57
+		wp_style_add_data('fontawesome', 'rtl', 'replace');
58 58
 
59
-		wp_register_style( 'bootstrap', get_template_directory_uri() . '/assets/css/vendor/bootstrap.css', array(), LSX_VERSION );
60
-		wp_style_add_data( 'bootstrap', 'rtl', 'replace' );
59
+		wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/vendor/bootstrap.css', array(), LSX_VERSION);
60
+		wp_style_add_data('bootstrap', 'rtl', 'replace');
61 61
 
62
-		wp_enqueue_style( 'slick', get_template_directory_uri() . '/assets/css/vendor/slick.css', array(), LSX_VERSION, null );
63
-		wp_enqueue_style( 'slick-lightbox', get_template_directory_uri() . '/assets/css/vendor/slick-lightbox.css', array( 'slick' ), LSX_VERSION, null );
62
+		wp_enqueue_style('slick', get_template_directory_uri() . '/assets/css/vendor/slick.css', array(), LSX_VERSION, null);
63
+		wp_enqueue_style('slick-lightbox', get_template_directory_uri() . '/assets/css/vendor/slick-lightbox.css', array('slick'), LSX_VERSION, null);
64 64
 
65
-		wp_enqueue_style( 'lsx_main_style', get_template_directory_uri() . '/style.css', array(), LSX_VERSION );
66
-		wp_enqueue_style( 'lsx_main', get_template_directory_uri() . '/assets/css/lsx.css', array( 'lsx_main_style', 'fontawesome', 'bootstrap', 'slick', 'slick-lightbox' ), LSX_VERSION );
67
-		wp_style_add_data( 'lsx_main', 'rtl', 'replace' );
65
+		wp_enqueue_style('lsx_main_style', get_template_directory_uri() . '/style.css', array(), LSX_VERSION);
66
+		wp_enqueue_style('lsx_main', get_template_directory_uri() . '/assets/css/lsx.css', array('lsx_main_style', 'fontawesome', 'bootstrap', 'slick', 'slick-lightbox'), LSX_VERSION);
67
+		wp_style_add_data('lsx_main', 'rtl', 'replace');
68 68
 	}
69 69
 
70 70
 endif;
71 71
 
72
-if ( ! function_exists( 'lsx_scripts_add_fonts' ) ) :
72
+if ( ! function_exists('lsx_scripts_add_fonts')) :
73 73
 
74 74
 	/**
75 75
 	 * Enqueue fonts.
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	function lsx_scripts_add_fonts() {
81 81
 
82
-		$disable_fonts = get_theme_mod( 'lsx_disable_fonts', false );
83
-		if ( false !== $disable_fonts ) {
82
+		$disable_fonts = get_theme_mod('lsx_disable_fonts', false);
83
+		if (false !== $disable_fonts) {
84 84
 			return;
85 85
 		}
86 86
 
@@ -145,14 +145,14 @@  discard block
 block discarded – undo
145 145
 			.single-testimonial .entry-content:before{font-family:\'Lora\',serif}			
146 146
 		';
147 147
 
148
-		if ( ! empty( $font_styles ) ) {
149
-			wp_add_inline_style( 'lsx_main', $font_styles );
148
+		if ( ! empty($font_styles)) {
149
+			wp_add_inline_style('lsx_main', $font_styles);
150 150
 		}
151 151
 	}
152 152
 
153 153
 endif;
154 154
 
155
-if ( ! function_exists( 'lsx_scripts_add_scripts' ) ) :
155
+if ( ! function_exists('lsx_scripts_add_scripts')) :
156 156
 
157 157
 	/**
158 158
 	 * Enqueue scripts.
@@ -161,31 +161,31 @@  discard block
 block discarded – undo
161 161
 	 * @subpackage scripts
162 162
 	 */
163 163
 	function lsx_scripts_add_scripts() {
164
-		if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
165
-			wp_enqueue_script( 'comment-reply' );
164
+		if (is_singular() && comments_open() && get_option('thread_comments')) {
165
+			wp_enqueue_script('comment-reply');
166 166
 		}
167 167
 
168
-		wp_enqueue_script( 'platform', get_template_directory_uri() . '/assets/js/vendor/platform.min.js', array(), LSX_VERSION, true );
169
-		wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/vendor/bootstrap.min.js', array( 'jquery' ), LSX_VERSION, true );
168
+		wp_enqueue_script('platform', get_template_directory_uri() . '/assets/js/vendor/platform.min.js', array(), LSX_VERSION, true);
169
+		wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/vendor/bootstrap.min.js', array('jquery'), LSX_VERSION, true);
170 170
 
171
-		wp_enqueue_script( 'imagesLoaded', get_template_directory_uri() . '/assets/js/vendor/imagesloaded.pkgd.min.js', array( 'masonry' ), LSX_VERSION, true );
172
-		wp_enqueue_script( 'scrolltofixed', get_template_directory_uri() . '/assets/js/vendor/jquery-scrolltofixed-min.js', array( 'jquery' ), LSX_VERSION, true );
173
-		wp_enqueue_script( 'slick', get_template_directory_uri() . '/assets/js/vendor/slick.min.js', array( 'jquery' ), LSX_VERSION, true );
174
-		wp_enqueue_script( 'slick-lightbox', get_template_directory_uri() . '/assets/js/vendor/slick-lightbox.min.js', array( 'jquery', 'slick' ), LSX_VERSION, true );
175
-		wp_enqueue_script( 'picturefill', get_template_directory_uri() . '/assets/js/vendor/picturefill.min.js', array(), LSX_VERSION, true );
171
+		wp_enqueue_script('imagesLoaded', get_template_directory_uri() . '/assets/js/vendor/imagesloaded.pkgd.min.js', array('masonry'), LSX_VERSION, true);
172
+		wp_enqueue_script('scrolltofixed', get_template_directory_uri() . '/assets/js/vendor/jquery-scrolltofixed-min.js', array('jquery'), LSX_VERSION, true);
173
+		wp_enqueue_script('slick', get_template_directory_uri() . '/assets/js/vendor/slick.min.js', array('jquery'), LSX_VERSION, true);
174
+		wp_enqueue_script('slick-lightbox', get_template_directory_uri() . '/assets/js/vendor/slick-lightbox.min.js', array('jquery', 'slick'), LSX_VERSION, true);
175
+		wp_enqueue_script('picturefill', get_template_directory_uri() . '/assets/js/vendor/picturefill.min.js', array(), LSX_VERSION, true);
176 176
 
177
-		wp_enqueue_script( 'lsx_script', get_template_directory_uri() . '/assets/js/lsx.min.js', array( 'jquery', 'platform', 'bootstrap', 'masonry', 'imagesLoaded', 'scrolltofixed', 'slick', 'slick-lightbox', 'picturefill' ), LSX_VERSION, true );
177
+		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/assets/js/lsx.min.js', array('jquery', 'platform', 'bootstrap', 'masonry', 'imagesLoaded', 'scrolltofixed', 'slick', 'slick-lightbox', 'picturefill'), LSX_VERSION, true);
178 178
 
179 179
 		$param_array = array(
180
-			'columns' => apply_filters( 'lsx_archive_column_number', 3 ),
180
+			'columns' => apply_filters('lsx_archive_column_number', 3),
181 181
 		);
182 182
 
183
-		wp_localize_script( 'lsx_script', 'lsx_params', $param_array );
183
+		wp_localize_script('lsx_script', 'lsx_params', $param_array);
184 184
 	}
185 185
 
186 186
 endif;
187 187
 
188
-if ( ! function_exists( 'lsx_scripts_child_theme' ) ) :
188
+if ( ! function_exists('lsx_scripts_child_theme')) :
189 189
 
190 190
 	/**
191 191
 	 * Enqueue scripts and styles (for child theme).
@@ -194,12 +194,12 @@  discard block
 block discarded – undo
194 194
 	 * @subpackage scripts
195 195
 	 */
196 196
 	function lsx_scripts_child_theme() {
197
-		if ( is_child_theme() && file_exists( get_stylesheet_directory() . '/assets/css/custom.css' ) ) {
198
-			wp_enqueue_style( 'child-css', get_stylesheet_directory_uri() . '/assets/css/custom.css', array( 'lsx_main' ), LSX_VERSION );
199
-			wp_style_add_data( 'child-css', 'rtl', 'replace' );
197
+		if (is_child_theme() && file_exists(get_stylesheet_directory() . '/assets/css/custom.css')) {
198
+			wp_enqueue_style('child-css', get_stylesheet_directory_uri() . '/assets/css/custom.css', array('lsx_main'), LSX_VERSION);
199
+			wp_style_add_data('child-css', 'rtl', 'replace');
200 200
 		}
201 201
 	}
202 202
 
203 203
 endif;
204 204
 
205
-add_action( 'wp_enqueue_scripts', 'lsx_scripts_child_theme', 1999 );
205
+add_action('wp_enqueue_scripts', 'lsx_scripts_child_theme', 1999);
Please login to merge, or discard this patch.
includes/customizer.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage customizer
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_customizer_core_controls' ) ) :
13
+if ( ! function_exists('lsx_customizer_core_controls')) :
14 14
 
15 15
 	/**
16 16
 	 * Returns an array of the core panel.
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	 *
21 21
 	 * @return $lsx_controls array()
22 22
 	 */
23
-	function lsx_customizer_core_controls( $lsx_controls ) {
23
+	function lsx_customizer_core_controls($lsx_controls) {
24 24
 		$lsx_controls['sections']['lsx-core'] = array(
25
-			'title'       => esc_html__( 'Core Settings', 'lsx' ),
26
-			'description' => esc_html__( 'Change the core settings.', 'lsx' ),
25
+			'title'       => esc_html__('Core Settings', 'lsx'),
26
+			'description' => esc_html__('Change the core settings.', 'lsx'),
27 27
 			'priority'    => 21,
28 28
 		);
29 29
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		);
35 35
 
36 36
 		$lsx_controls['fields']['lsx_lazyload_status'] = array(
37
-			'label'   => esc_html__( 'Lazy Loading Images', 'lsx' ),
37
+			'label'   => esc_html__('Lazy Loading Images', 'lsx'),
38 38
 			'section' => 'lsx-core',
39 39
 			'type'    => 'checkbox',
40 40
 		);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		);
47 47
 
48 48
 		$lsx_controls['fields']['lsx_preloader_content_status'] = array(
49
-			'label'   => esc_html__( 'Preloader Content', 'lsx' ),
49
+			'label'   => esc_html__('Preloader Content', 'lsx'),
50 50
 			'section' => 'lsx-core',
51 51
 			'type'    => 'checkbox',
52 52
 		);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		);
59 59
 
60 60
 		$lsx_controls['fields']['lsx_disable_fonts'] = array(
61
-			'label'   => esc_html__( 'Disable Fonts', 'lsx' ),
61
+			'label'   => esc_html__('Disable Fonts', 'lsx'),
62 62
 			'section' => 'lsx-core',
63 63
 			'type'    => 'checkbox',
64 64
 		);
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 
69 69
 endif;
70 70
 
71
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_core_controls' );
71
+add_filter('lsx_customizer_controls', 'lsx_customizer_core_controls');
72 72
 
73
-if ( ! function_exists( 'lsx_customizer_layout_controls' ) ) :
73
+if ( ! function_exists('lsx_customizer_layout_controls')) :
74 74
 
75 75
 	/**
76 76
 	 * Returns an array of the layout panel.
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @return $lsx_controls array()
82 82
 	 */
83
-	function lsx_customizer_layout_controls( $lsx_controls ) {
83
+	function lsx_customizer_layout_controls($lsx_controls) {
84 84
 		$lsx_controls['sections']['lsx-layout'] = array(
85
-			'title'       => esc_html__( 'Layout', 'lsx' ),
86
-			'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ),
85
+			'title'       => esc_html__('Layout', 'lsx'),
86
+			'description' => esc_html__('Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx'),
87 87
 			'priority'    => 22,
88 88
 		);
89 89
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		);
95 95
 
96 96
 		$lsx_controls['fields']['lsx_header_layout'] = array(
97
-			'label'   => esc_html__( 'Header', 'lsx' ),
97
+			'label'   => esc_html__('Header', 'lsx'),
98 98
 			'section' => 'lsx-layout',
99 99
 			'control' => 'LSX_Customize_Header_Layout_Control',
100 100
 			'choices' => array(
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		);
112 112
 
113 113
 		$lsx_controls['fields']['lsx_layout'] = array(
114
-			'label'   => esc_html__( 'Body', 'lsx' ),
114
+			'label'   => esc_html__('Body', 'lsx'),
115 115
 			'section' => 'lsx-layout',
116 116
 			'control' => 'LSX_Customize_Layout_Control',
117 117
 			'choices' => array(
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		);
129 129
 
130 130
 		$lsx_controls['fields']['lsx_header_fixed'] = array(
131
-			'label'   => esc_html__( 'Fixed Header', 'lsx' ),
131
+			'label'   => esc_html__('Fixed Header', 'lsx'),
132 132
 			'section' => 'lsx-layout',
133 133
 			'type'    => 'checkbox',
134 134
 		);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		);
141 141
 
142 142
 		$lsx_controls['fields']['lsx_header_search'] = array(
143
-			'label'   => esc_html__( 'Search Box in Header', 'lsx' ),
143
+			'label'   => esc_html__('Search Box in Header', 'lsx'),
144 144
 			'section' => 'lsx-layout',
145 145
 			'type'    => 'checkbox',
146 146
 		);
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
 		$lsx_controls['selective_refresh']['lsx_header_search'] = array(
149 149
 			'selector'        => '#lsx-header-search-css',
150 150
 			'render_callback' => function() {
151
-				$search_form = get_theme_mod( 'lsx_header_search' );
151
+				$search_form = get_theme_mod('lsx_header_search');
152 152
 
153
-				if ( false !== $search_form ) {
153
+				if (false !== $search_form) {
154 154
 					echo 'body #searchform { display: block; }';
155 155
 				} else {
156 156
 					echo 'body #searchform { display: none; }';
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 
164 164
 endif;
165 165
 
166
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_layout_controls' );
166
+add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls');
167 167
 
168
-if ( ! function_exists( 'lsx_get_customizer_controls' ) ) :
168
+if ( ! function_exists('lsx_get_customizer_controls')) :
169 169
 
170 170
 	/**
171 171
 	 * Returns an array of $controls for the customizer class to generate.
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	function lsx_get_customizer_controls() {
179 179
 		$lsx_controls = array();
180
-		$lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls );
180
+		$lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls);
181 181
 		return $lsx_controls;
182 182
 	}
183 183
 
184 184
 endif;
185 185
 
186
-$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() );
186
+$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls());
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,25 +7,25 @@  discard block
 block discarded – undo
7 7
  * @package lsx
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-define( 'LSX_VERSION', '2.3.1' );
14
+define('LSX_VERSION', '2.3.1');
15 15
 
16
-if ( class_exists( 'WooCommerce' ) ) {
16
+if (class_exists('WooCommerce')) {
17 17
 	require get_template_directory() . '/includes/plugins/woocommerce.php';
18 18
 }
19 19
 
20
-if ( class_exists( 'Tribe__Events__Main' ) ) {
20
+if (class_exists('Tribe__Events__Main')) {
21 21
 	require get_template_directory() . '/includes/plugins/the-events-calendar.php';
22 22
 }
23 23
 
24
-if ( class_exists( 'Sensei_WC' ) ) {
24
+if (class_exists('Sensei_WC')) {
25 25
 	require get_template_directory() . '/includes/plugins/sensei.php';
26 26
 }
27 27
 
28
-if ( class_exists( 'bbPress' ) ) {
28
+if (class_exists('bbPress')) {
29 29
 	require get_template_directory() . '/includes/plugins/bbpress.php';
30 30
 }
31 31
 
@@ -56,28 +56,28 @@  discard block
 block discarded – undo
56 56
 function lsx_importer_tester() {
57 57
 	$value = 'a:3:{s:12:""workouttitle"";s:15:""Weighted lunges"";s:4:""reps"";s:7:""20 REPS"";s:16:""video_to_workout"";s:3:""273"";}|a:3:{s:12:""workouttitle"";s:8:""Knee-Ins"";s:4:""reps"";s:7:""20 REPS"";s:16:""video_to_workout"";s:3:""709"";}|a:3:{s:12:""workouttitle"";s:17:""Criss-cross jumps"";s:4:""reps"";s:7:""30 SECS"";s:16:""video_to_workout"";s:3:""710"";}';
58 58
 
59
-	cb_explode_workouts( 3150, 'extable_1', $value );
59
+	cb_explode_workouts(3150, 'extable_1', $value);
60 60
 }
61 61
 //add_action( 'init', 'lsx_importer_tester' );
62 62
 
63
-function cb_explode_workouts_2( $value ) {
64
-	if ( '' !== $value ) {
63
+function cb_explode_workouts_2($value) {
64
+	if ('' !== $value) {
65 65
 		$new_values = array();
66 66
 
67
-		$value = explode( '|', $value );	
68
-		if ( ! is_array( $value ) ) {
69
-			$value = array( $value );
67
+		$value = explode('|', $value);	
68
+		if ( ! is_array($value)) {
69
+			$value = array($value);
70 70
 		}
71
-		if ( ! empty( $value ) ) {
71
+		if ( ! empty($value)) {
72 72
 
73
-			foreach ( $value as $serial_string ) {
74
-				$serial_string = str_replace( '""', '"', $serial_string );
75
-				$old_array = maybe_unserialize( $serial_string );
76
-				if ( is_array( $old_array ) && ! empty( $old_array ) ) {
73
+			foreach ($value as $serial_string) {
74
+				$serial_string = str_replace('""', '"', $serial_string);
75
+				$old_array = maybe_unserialize($serial_string);
76
+				if (is_array($old_array) && ! empty($old_array)) {
77 77
 					$old_values = array();
78 78
 
79
-					foreach( $old_array as $old_key => $old_value ){
80
-						switch( $old_key ) {
79
+					foreach ($old_array as $old_key => $old_value) {
80
+						switch ($old_key) {
81 81
 							case 'workouttitle':
82 82
 								$old_values['name'] = $old_value;
83 83
 							break;
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 						}
96 96
 					};
97 97
 
98
-					if ( ! empty( $old_values ) ) {
98
+					if ( ! empty($old_values)) {
99 99
 						$new_values[] = $old_values;
100 100
 					}
101 101
 				}
102 102
 			}
103 103
 		}	
104
-		if ( ! empty( $new_values ) ) {
105
-			$value = maybe_serialize( $new_values );
104
+		if ( ! empty($new_values)) {
105
+			$value = maybe_serialize($new_values);
106 106
 		}
107 107
 	}
108 108
 	return $value;
Please login to merge, or discard this patch.
includes/classes/class-lsx-nav-walker.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-if ( ! class_exists( 'Walker_Nav_Menu' ) ) {
14
+if ( ! class_exists('Walker_Nav_Menu')) {
15 15
 	return;
16 16
 }
17 17
 
18
-if ( ! class_exists( 'LSX_Nav_Walker' ) ) :
18
+if ( ! class_exists('LSX_Nav_Walker')) :
19 19
 
20 20
 	/**
21 21
 	 * Cleaner walker for wp_nav_menu()
@@ -34,46 +34,46 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	class LSX_Nav_Walker extends Walker_Nav_Menu {
36 36
 
37
-		function check_current( $classes ) {
38
-			return preg_match( '/^(current[-_])|active|dropdown$/', $classes );
37
+		function check_current($classes) {
38
+			return preg_match('/^(current[-_])|active|dropdown$/', $classes);
39 39
 		}
40 40
 
41
-		function start_lvl( &$output, $depth = 0, $args = array() ) {
41
+		function start_lvl(&$output, $depth = 0, $args = array()) {
42 42
 			$output .= "\n<ul class=\"dropdown-menu\">\n";
43 43
 		}
44 44
 
45
-		function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
45
+		function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) {
46 46
 			$item_html = '';
47 47
 
48
-			if ( isset( $item->title ) ) {
49
-				parent::start_el( $item_html, $item, $depth, $args );
48
+			if (isset($item->title)) {
49
+				parent::start_el($item_html, $item, $depth, $args);
50 50
 
51
-				if ( $item->is_dropdown && ( 0 === $depth ) ) {
52
-					$item_html = str_replace( '<a', '<a class="dropdown-toggle" data-target="#"', $item_html );
53
-					$item_html = str_replace( '</a>', ' <b class="caret"></b></a>', $item_html );
54
-				} elseif ( stristr( $item_html, 'li class="divider"' ) ) {
55
-					$item_html = preg_replace( '/<a[^>]*>.*?<\/a>/iU', '', $item_html );
56
-				} elseif ( stristr( $item_html, 'li class="dropdown-header"' ) ) {
57
-					$item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html );
51
+				if ($item->is_dropdown && (0 === $depth)) {
52
+					$item_html = str_replace('<a', '<a class="dropdown-toggle" data-target="#"', $item_html);
53
+					$item_html = str_replace('</a>', ' <b class="caret"></b></a>', $item_html);
54
+				} elseif (stristr($item_html, 'li class="divider"')) {
55
+					$item_html = preg_replace('/<a[^>]*>.*?<\/a>/iU', '', $item_html);
56
+				} elseif (stristr($item_html, 'li class="dropdown-header"')) {
57
+					$item_html = preg_replace('/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html);
58 58
 				}
59 59
 
60
-				$item_html = apply_filters( 'lsx_wp_nav_menu_item', $item_html );
60
+				$item_html = apply_filters('lsx_wp_nav_menu_item', $item_html);
61 61
 				$output   .= $item_html;
62 62
 			}
63 63
 		}
64 64
 
65
-		function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
66
-			$element->is_dropdown = ( ( ! empty( $children_elements[ $element->ID ] ) && ( ( $depth + 1 ) < $max_depth || ( 0 === $max_depth ) ) ) );
65
+		function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {
66
+			$element->is_dropdown = (( ! empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth || (0 === $max_depth))));
67 67
 
68
-			if ( $element->is_dropdown ) {
69
-				if ( $depth > 0 ) {
68
+			if ($element->is_dropdown) {
69
+				if ($depth > 0) {
70 70
 					$element->classes[] = 'dropdown-submenu';
71 71
 				} else {
72 72
 					$element->classes[] = 'dropdown';
73 73
 				}
74 74
 			}
75 75
 
76
-			parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
76
+			parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
77 77
 		}
78 78
 
79 79
 	}
Please login to merge, or discard this patch.
includes/template-tags.php 1 patch
Spacing   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage template-tags
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_breadcrumbs' ) ) :
13
+if ( ! function_exists('lsx_breadcrumbs')) :
14 14
 
15 15
 	/**
16 16
 	 * Breadcrumbs.
@@ -19,52 +19,52 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage template-tags
20 20
 	 */
21 21
 	function lsx_breadcrumbs() {
22
-		if ( ! function_exists( 'yoast_breadcrumb' ) && ! function_exists( 'woocommerce_breadcrumb' ) ) {
22
+		if ( ! function_exists('yoast_breadcrumb') && ! function_exists('woocommerce_breadcrumb')) {
23 23
 			return null;
24 24
 		}
25 25
 
26
-		$show_on_front = get_option( 'show_on_front' );
26
+		$show_on_front = get_option('show_on_front');
27 27
 
28
-		if ( ( 'posts' === $show_on_front && is_home() ) || ( 'page' === $show_on_front && is_front_page() ) ) {
28
+		if (('posts' === $show_on_front && is_home()) || ('page' === $show_on_front && is_front_page())) {
29 29
 			return;
30 30
 		}
31 31
 
32
-		if ( function_exists( 'woocommerce_breadcrumb' ) ) {
32
+		if (function_exists('woocommerce_breadcrumb')) {
33 33
 			ob_start();
34 34
 
35
-			woocommerce_breadcrumb( array(
35
+			woocommerce_breadcrumb(array(
36 36
 				'wrap_before' => '<div class="breadcrumbs-container breadcrumbs-woocommerce"><div class="container"><div class="row"><div class="col-xs-12">',
37 37
 				'wrap_after'  => '</div></div></div></div>',
38 38
 				'before'      => '<span>',
39 39
 				'after'       => '</span>',
40
-			) );
40
+			));
41 41
 
42 42
 			$output = ob_get_clean();
43
-		} elseif ( function_exists( 'yoast_breadcrumb' ) ) {
44
-			$output = yoast_breadcrumb( null, null, false );
43
+		} elseif (function_exists('yoast_breadcrumb')) {
44
+			$output = yoast_breadcrumb(null, null, false);
45 45
 			$output = '<div class="breadcrumbs-container breadcrumbs-yoast"><div class="container"><div class="row"><div class="col-xs-12">' . $output . '</div></div></div></div>';
46 46
 		}
47 47
 
48
-		$output = apply_filters( 'lsx_breadcrumbs', $output );
48
+		$output = apply_filters('lsx_breadcrumbs', $output);
49 49
 
50
-		echo wp_kses_post( $output );
50
+		echo wp_kses_post($output);
51 51
 	}
52 52
 
53 53
 endif;
54 54
 
55 55
 function lsx_breadcrumbs_placements() {
56
-	if ( is_singular( 'post' ) ) {
57
-		add_action( 'lsx_banner_inner_top', 'lsx_breadcrumbs', 100 );
56
+	if (is_singular('post')) {
57
+		add_action('lsx_banner_inner_top', 'lsx_breadcrumbs', 100);
58 58
 	} else {
59
-		add_action( 'lsx_header_after', 'lsx_breadcrumbs', 1 );
59
+		add_action('lsx_header_after', 'lsx_breadcrumbs', 1);
60 60
 	}
61 61
 }
62
-add_action( 'wp', 'lsx_breadcrumbs_placements' );
62
+add_action('wp', 'lsx_breadcrumbs_placements');
63 63
 
64 64
 //add_action( 'lsx_banner_inner_bottom', 'lsx_breadcrumbs', 100 );
65 65
 //add_action( 'lsx_global_header_inner_bottom', 'lsx_breadcrumbs', 100 );
66 66
 
67
-if ( ! function_exists( 'lsx_breadcrumbs_wpseo_seperator_filter' ) ) :
67
+if ( ! function_exists('lsx_breadcrumbs_wpseo_seperator_filter')) :
68 68
 
69 69
 	/**
70 70
 	 * Replaces the seperator.
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
 	 * @package    lsx
73 73
 	 * @subpackage template-tags
74 74
 	 */
75
-	function lsx_breadcrumbs_wpseo_seperator_filter( $seperator ) {
75
+	function lsx_breadcrumbs_wpseo_seperator_filter($seperator) {
76 76
 		$seperator = '<i class="fa fa-angle-right" aria-hidden="true"></i>';
77 77
 		return $seperator;
78 78
 	}
79 79
 
80 80
 endif;
81 81
 
82
-add_filter( 'wpseo_breadcrumb_separator', 'lsx_breadcrumbs_wpseo_seperator_filter' );
82
+add_filter('wpseo_breadcrumb_separator', 'lsx_breadcrumbs_wpseo_seperator_filter');
83 83
 
84
-if ( ! function_exists( 'lsx_breadcrumbs_woocommerce_seperator_filter' ) ) :
84
+if ( ! function_exists('lsx_breadcrumbs_woocommerce_seperator_filter')) :
85 85
 
86 86
 	/**
87 87
 	 * Replaces the seperator.
@@ -89,16 +89,16 @@  discard block
 block discarded – undo
89 89
 	 * @package    lsx
90 90
 	 * @subpackage template-tags
91 91
 	 */
92
-	function lsx_breadcrumbs_woocommerce_seperator_filter( $defaults ) {
92
+	function lsx_breadcrumbs_woocommerce_seperator_filter($defaults) {
93 93
 		$defaults['delimiter'] = '<i class="fa fa-angle-right" aria-hidden="true"></i>';
94 94
 		return $defaults;
95 95
 	}
96 96
 
97 97
 endif;
98 98
 
99
-add_filter( 'woocommerce_breadcrumb_defaults', 'lsx_breadcrumbs_woocommerce_seperator_filter' );
99
+add_filter('woocommerce_breadcrumb_defaults', 'lsx_breadcrumbs_woocommerce_seperator_filter');
100 100
 
101
-if ( ! function_exists( 'lsx_site_title' ) ) :
101
+if ( ! function_exists('lsx_site_title')) :
102 102
 
103 103
 	/**
104 104
 	 * Displays logo when applicable.
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
 	function lsx_site_title() {
110 110
 		?>
111 111
 			<div class="site-branding">
112
-				<h1 class="site-title"><a title="<?php bloginfo( 'name' ); ?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
113
-				<p class="site-description"><?php bloginfo( 'description' ); ?></p>
112
+				<h1 class="site-title"><a title="<?php bloginfo('name'); ?>" href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
113
+				<p class="site-description"><?php bloginfo('description'); ?></p>
114 114
 			</div>
115 115
 		<?php
116 116
 	}
117 117
 
118 118
 endif;
119 119
 
120
-if ( ! function_exists( 'lsx_post_meta_list_top' ) ) :
120
+if ( ! function_exists('lsx_post_meta_list_top')) :
121 121
 
122 122
 	/**
123 123
 	 * Add customisable post meta (post list - above title).
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 endif;
140 140
 
141
-if ( ! function_exists( 'lsx_post_meta_single_top' ) ) :
141
+if ( ! function_exists('lsx_post_meta_single_top')) :
142 142
 
143 143
 	/**
144 144
 	 * Add customisable post meta (single post - above title).
@@ -157,11 +157,11 @@  discard block
 block discarded – undo
157 157
 
158 158
 endif;
159 159
 
160
-add_action( 'lsx_post_meta_top', 'lsx_post_meta_avatar' );
161
-add_action( 'lsx_post_meta_top', 'lsx_post_meta_date' );
162
-add_action( 'lsx_post_meta_top', 'lsx_post_meta_author' );
160
+add_action('lsx_post_meta_top', 'lsx_post_meta_avatar');
161
+add_action('lsx_post_meta_top', 'lsx_post_meta_date');
162
+add_action('lsx_post_meta_top', 'lsx_post_meta_author');
163 163
 
164
-if ( ! function_exists( 'lsx_post_meta_single_bottom' ) ) :
164
+if ( ! function_exists('lsx_post_meta_single_bottom')) :
165 165
 
166 166
 	/**
167 167
 	 * Add customisable post meta (single post - below title).
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 endif;
182 182
 
183
-if ( ! function_exists( 'lsx_post_meta_avatar' ) ) :
183
+if ( ! function_exists('lsx_post_meta_avatar')) :
184 184
 
185 185
 	/**
186 186
 	 * Add customisable post meta: author's avatar.
@@ -190,20 +190,20 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	function lsx_post_meta_avatar() {
192 192
 		$author = get_the_author();
193
-		$author_id = get_the_author_meta( 'ID' );
194
-		$author_avatar = get_avatar( $author_id, 80 );
195
-		$author_url = get_author_posts_url( $author_id );
193
+		$author_id = get_the_author_meta('ID');
194
+		$author_avatar = get_avatar($author_id, 80);
195
+		$author_url = get_author_posts_url($author_id);
196 196
 
197 197
 		printf(
198 198
 			'<a href="%1$s" class="post-meta-avatar">%2$s</a>',
199
-			esc_url( $author_url ),
200
-			wp_kses_post( $author_avatar )
199
+			esc_url($author_url),
200
+			wp_kses_post($author_avatar)
201 201
 		);
202 202
 	}
203 203
 
204 204
 endif;
205 205
 
206
-if ( ! function_exists( 'lsx_post_meta_date' ) ) :
206
+if ( ! function_exists('lsx_post_meta_date')) :
207 207
 
208 208
 	/**
209 209
 	 * Add customisable post meta: post date.
@@ -214,23 +214,23 @@  discard block
 block discarded – undo
214 214
 	function lsx_post_meta_date() {
215 215
 		$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
216 216
 
217
-		$time_string = sprintf( $time_string,
218
-			esc_attr( get_the_date( 'c' ) ),
217
+		$time_string = sprintf($time_string,
218
+			esc_attr(get_the_date('c')),
219 219
 			get_the_date(),
220
-			esc_attr( get_the_modified_date( 'c' ) ),
220
+			esc_attr(get_the_modified_date('c')),
221 221
 			get_the_modified_date()
222 222
 		);
223 223
 
224 224
 		printf(
225 225
 			'<span class="post-meta-time updated"><a href="%1$s" rel="bookmark">%2$s</a></span>',
226
-			esc_url( get_permalink() ),
227
-			wp_kses_post( $time_string )
226
+			esc_url(get_permalink()),
227
+			wp_kses_post($time_string)
228 228
 		);
229 229
 	}
230 230
 
231 231
 endif;
232 232
 
233
-if ( ! function_exists( 'lsx_post_meta_author' ) ) :
233
+if ( ! function_exists('lsx_post_meta_author')) :
234 234
 
235 235
 	/**
236 236
 	 * Add customisable post meta: post author.
@@ -240,27 +240,27 @@  discard block
 block discarded – undo
240 240
 	 */
241 241
 	function lsx_post_meta_author() {
242 242
 		$author = get_the_author();
243
-		$author_url = get_author_posts_url( get_the_author_meta( 'ID' ) );
243
+		$author_url = get_author_posts_url(get_the_author_meta('ID'));
244 244
 
245
-		if ( empty( $author ) ) {
245
+		if (empty($author)) {
246 246
 			global $post;
247 247
 
248
-			$author = get_user_by( 'ID', $post->post_author );
248
+			$author = get_user_by('ID', $post->post_author);
249 249
 			$author = $author->display_name;
250
-			$author_url = get_author_posts_url( $post->post_author );
250
+			$author_url = get_author_posts_url($post->post_author);
251 251
 		}
252 252
 
253 253
 		printf(
254 254
 			'<span class="vcard post-meta-author"><span>%1$s</span> <span class="fn"><a href="%2$s">%3$s</a></span></span>',
255
-			esc_html__( 'by', 'lsx' ),
256
-			esc_url( $author_url ),
257
-			esc_html( $author )
255
+			esc_html__('by', 'lsx'),
256
+			esc_url($author_url),
257
+			esc_html($author)
258 258
 		);
259 259
 	}
260 260
 
261 261
 endif;
262 262
 
263
-if ( ! function_exists( 'lsx_post_meta_category' ) ) :
263
+if ( ! function_exists('lsx_post_meta_category')) :
264 264
 
265 265
 	/**
266 266
 	 * Add customisable post meta: post category(ies).
@@ -269,25 +269,25 @@  discard block
 block discarded – undo
269 269
 	 * @subpackage template-tags
270 270
 	 */
271 271
 	function lsx_post_meta_category() {
272
-		$post_categories = wp_get_post_categories( get_the_ID() );
272
+		$post_categories = wp_get_post_categories(get_the_ID());
273 273
 		$cats = array();
274 274
 
275
-		foreach ( $post_categories as $c ) {
276
-			$cat = get_category( $c );
275
+		foreach ($post_categories as $c) {
276
+			$cat = get_category($c);
277 277
 			/* Translators: %s: category name */
278
-			$cats[] = '<a href="' . esc_url( get_category_link( $cat->term_id ) ) . '" title="' . sprintf( esc_html__( 'View all posts in %s' , 'lsx' ), $cat->name ) . '">' . $cat->name . '</a>';
278
+			$cats[] = '<a href="' . esc_url(get_category_link($cat->term_id)) . '" title="' . sprintf(esc_html__('View all posts in %s', 'lsx'), $cat->name) . '">' . $cat->name . '</a>';
279 279
 		}
280 280
 
281
-		if ( ! empty( $cats ) ) {
281
+		if ( ! empty($cats)) {
282 282
 			?>
283
-			<span class="post-meta-categories"><span><?php esc_html_e( 'Posted in', 'lsx' ); ?></span> <?php echo wp_kses_post( implode( ', ', $cats ) ); ?></span>
283
+			<span class="post-meta-categories"><span><?php esc_html_e('Posted in', 'lsx'); ?></span> <?php echo wp_kses_post(implode(', ', $cats)); ?></span>
284 284
 			<?php
285 285
 		}
286 286
 	}
287 287
 
288 288
 endif;
289 289
 
290
-if ( ! function_exists( 'lsx_post_tags' ) ) :
290
+if ( ! function_exists('lsx_post_tags')) :
291 291
 
292 292
 	/**
293 293
 	 * Add customisable post meta: post tag(s).
@@ -296,10 +296,10 @@  discard block
 block discarded – undo
296 296
 	 * @subpackage template-tags
297 297
 	 */
298 298
 	function lsx_post_tags() {
299
-		if ( has_tag() ) :
299
+		if (has_tag()) :
300 300
 			?>
301 301
 			<div class="post-tags">
302
-				<?php echo wp_kses_post( get_the_tag_list( '' ) ); ?>
302
+				<?php echo wp_kses_post(get_the_tag_list('')); ?>
303 303
 			</div>
304 304
 			<?php
305 305
 		endif;
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
 
308 308
 endif;
309 309
 
310
-add_action( 'lsx_content_post_tags', 'lsx_post_tags', 10 );
310
+add_action('lsx_content_post_tags', 'lsx_post_tags', 10);
311 311
 
312
-if ( ! function_exists( 'lsx_sharing_output' ) ) :
312
+if ( ! function_exists('lsx_sharing_output')) :
313 313
 
314 314
 	/**
315 315
 	 * Display sharing buttons.
@@ -319,14 +319,14 @@  discard block
 block discarded – undo
319 319
 	 */
320 320
 	function lsx_sharing_output() {
321 321
 		global $lsx_sharing;
322
-		echo wp_kses_post( $lsx_sharing->sharing_buttons() );
322
+		echo wp_kses_post($lsx_sharing->sharing_buttons());
323 323
 	}
324 324
 
325 325
 endif;
326 326
 
327
-add_action( 'lsx_content_sharing', 'lsx_sharing_output', 20 );
327
+add_action('lsx_content_sharing', 'lsx_sharing_output', 20);
328 328
 
329
-if ( ! function_exists( 'lsx_translate_format_to_fontawesome' ) ) :
329
+if ( ! function_exists('lsx_translate_format_to_fontawesome')) :
330 330
 
331 331
 	/**
332 332
 	 * Translate post format to Font Awesome class.
@@ -334,8 +334,8 @@  discard block
 block discarded – undo
334 334
 	 * @package    lsx
335 335
 	 * @subpackage template-tags
336 336
 	 */
337
-	function lsx_translate_format_to_fontawesome( $format ) {
338
-		switch ( $format ) {
337
+	function lsx_translate_format_to_fontawesome($format) {
338
+		switch ($format) {
339 339
 			case 'image':
340 340
 				$format = 'camera';
341 341
 				break;
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 
368 368
 endif;
369 369
 
370
-if ( ! function_exists( 'lsx_paging_nav' ) ) :
370
+if ( ! function_exists('lsx_paging_nav')) :
371 371
 
372 372
 	/**
373 373
 	 * Display navigation to next/previous set of posts when applicable.
@@ -378,37 +378,37 @@  discard block
 block discarded – undo
378 378
 	function lsx_paging_nav() {
379 379
 		global $wp_query;
380 380
 
381
-		if ( $wp_query->max_num_pages < 2 ) {
381
+		if ($wp_query->max_num_pages < 2) {
382 382
 			return;
383 383
 		}
384 384
 
385
-		if ( true === apply_filters( 'lsx_paging_nav_disable', false ) ) {
385
+		if (true === apply_filters('lsx_paging_nav_disable', false)) {
386 386
 			return true;
387
-		} elseif ( current_theme_supports( 'infinite-scroll' ) && class_exists( 'The_Neverending_Home_Page' ) ) {
387
+		} elseif (current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')) {
388 388
 			return true;
389 389
 		} else {
390 390
 			$html = '';
391 391
 			$html .= '<div class="lsx-pagination-wrapper">' . PHP_EOL;
392 392
 			$html .= '<div class="lsx-breaker"></div>' . PHP_EOL;
393 393
 			$html .= '<div class="lsx-pagination">' . PHP_EOL;
394
-			$html .= paginate_links( array(
395
-				'base'               => str_replace( 999999999, '%#%', esc_url( get_pagenum_link( 999999999 ) ) ),
394
+			$html .= paginate_links(array(
395
+				'base'               => str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))),
396 396
 				'format'             => '?paged=%#%',
397 397
 				'total'              => $wp_query->max_num_pages,
398
-				'current'            => max( 1, intval( get_query_var( 'paged' ) ) ),
399
-				'prev_text'          => '<span class="meta-nav">&larr;</span> ' . esc_html__( 'Previous', 'lsx' ),
400
-				'next_text'          => esc_html__( 'Next', 'lsx' ) . ' <span class="meta-nav">&rarr;</span>',
401
-			) );
398
+				'current'            => max(1, intval(get_query_var('paged'))),
399
+				'prev_text'          => '<span class="meta-nav">&larr;</span> ' . esc_html__('Previous', 'lsx'),
400
+				'next_text'          => esc_html__('Next', 'lsx') . ' <span class="meta-nav">&rarr;</span>',
401
+			));
402 402
 			$html .= '</div>' . PHP_EOL;
403 403
 			$html .= '</div>' . PHP_EOL;
404 404
 
405
-			echo wp_kses_post( $html );
405
+			echo wp_kses_post($html);
406 406
 		}
407 407
 	}
408 408
 
409 409
 endif;
410 410
 
411
-if ( ! function_exists( 'lsx_post_nav' ) ) :
411
+if ( ! function_exists('lsx_post_nav')) :
412 412
 
413 413
 	/**
414 414
 	 * Display navigation to next/previous post when applicable.
@@ -417,24 +417,24 @@  discard block
 block discarded – undo
417 417
 	 * @subpackage template-tags
418 418
 	 */
419 419
 	function lsx_post_nav() {
420
-		$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
421
-		$next     = get_adjacent_post( false, '', false );
420
+		$previous = (is_attachment()) ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
421
+		$next     = get_adjacent_post(false, '', false);
422 422
 
423
-		if ( ! $next && ! $previous ) {
423
+		if ( ! $next && ! $previous) {
424 424
 			return;
425 425
 		}
426 426
 
427 427
 		$default_size = 'sm';
428
-		$size         = apply_filters( 'lsx_bootstrap_column_size', $default_size );
428
+		$size         = apply_filters('lsx_bootstrap_column_size', $default_size);
429 429
 		?>
430 430
 		<nav class="navigation post-navigation" role="navigation">
431 431
 			<div class="lsx-breaker"></div>
432 432
 			<div class="nav-links pager row">
433
-				<div class="previous <?php echo 'col-' . esc_attr( $size ) . '-6'; ?>">
434
-					<?php previous_post_link( '%link', '<p class="nav-links-description">' . esc_html_x( 'Previous Post', 'Previous post link', 'lsx' ) . '</p><h3>%title</h3>' ); ?>
433
+				<div class="previous <?php echo 'col-' . esc_attr($size) . '-6'; ?>">
434
+					<?php previous_post_link('%link', '<p class="nav-links-description">' . esc_html_x('Previous Post', 'Previous post link', 'lsx') . '</p><h3>%title</h3>'); ?>
435 435
 				</div>
436
-				<div class="next <?php echo 'col-' . esc_attr( $size ) . '-6'; ?>">
437
-					<?php next_post_link( '%link', '<p class="nav-links-description">' . esc_html_x( 'Next Post', 'Next post link', 'lsx' ) . '</p><h3>%title</h3>' ); ?>
436
+				<div class="next <?php echo 'col-' . esc_attr($size) . '-6'; ?>">
437
+					<?php next_post_link('%link', '<p class="nav-links-description">' . esc_html_x('Next Post', 'Next post link', 'lsx') . '</p><h3>%title</h3>'); ?>
438 438
 				</div>
439 439
 			</div><!-- .nav-links -->
440 440
 		</nav><!-- .navigation -->
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 
444 444
 endif;
445 445
 
446
-if ( ! function_exists( 'lsx_site_identity' ) ) :
446
+if ( ! function_exists('lsx_site_identity')) :
447 447
 
448 448
 	/**
449 449
 	 * Outputs either the Site Title or the Site Logo.
@@ -452,10 +452,10 @@  discard block
 block discarded – undo
452 452
 	 * @subpackage template-tags
453 453
 	 */
454 454
 	function lsx_site_identity() {
455
-		if ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) {
455
+		if (function_exists('has_custom_logo') && has_custom_logo()) {
456 456
 			the_custom_logo();
457 457
 		} else {
458
-			if ( get_theme_mod( 'site_logo_header_text', 1 ) ) {
458
+			if (get_theme_mod('site_logo_header_text', 1)) {
459 459
 				lsx_site_title();
460 460
 			}
461 461
 		}
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
 endif;
465 465
 
466
-if ( ! function_exists( 'lsx_navbar_header' ) ) :
466
+if ( ! function_exists('lsx_navbar_header')) :
467 467
 	/**
468 468
 	 * Outputs the Nav Menu.
469 469
 	 *
@@ -474,17 +474,17 @@  discard block
 block discarded – undo
474 474
 		?>
475 475
 		<div class="navbar-header" itemscope itemtype="http://schema.org/WebPage">
476 476
 			<?php
477
-				if ( has_nav_menu( 'primary' ) ) :
477
+				if (has_nav_menu('primary')) :
478 478
 					?>
479 479
 					<div class="wrapper-toggle" data-toggle="collapse" data-target=".primary-navbar">
480 480
 						<button type="button" class="navbar-toggle">
481
-							<span class="sr-only"><?php esc_html_e( 'Toggle navigation', 'lsx' ); ?></span>
481
+							<span class="sr-only"><?php esc_html_e('Toggle navigation', 'lsx'); ?></span>
482 482
 							<span class="icon-bar"></span>
483 483
 							<span class="icon-bar"></span>
484 484
 							<span class="icon-bar"></span>
485 485
 							<span class="icon-bar"></span>
486 486
 						</button>
487
-						<span class="mobile-menu-title"><?php esc_html_e( 'Menu', 'lsx' ); ?></span>
487
+						<span class="mobile-menu-title"><?php esc_html_e('Menu', 'lsx'); ?></span>
488 488
 					</div>
489 489
 					<?php
490 490
 				endif;
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
 
498 498
 endif;
499 499
 
500
-add_action( 'lsx_nav_before', 'lsx_navbar_header' );
500
+add_action('lsx_nav_before', 'lsx_navbar_header');
501 501
 
502
-if ( ! function_exists( 'lsx_nav_menu' ) ) :
502
+if ( ! function_exists('lsx_nav_menu')) :
503 503
 
504 504
 	/**
505 505
 	 * Outputs the Nav Menu.
@@ -508,17 +508,17 @@  discard block
 block discarded – undo
508 508
 	 * @subpackage template-tags
509 509
 	 */
510 510
 	function lsx_nav_menu() {
511
-		if ( has_nav_menu( 'primary' ) ) :
511
+		if (has_nav_menu('primary')) :
512 512
 			?>
513 513
 			<nav class="primary-navbar collapse navbar-collapse">
514 514
 				<?php
515
-					wp_nav_menu( array(
515
+					wp_nav_menu(array(
516 516
 						'theme_location' => 'primary',
517 517
 						'depth'          => 3,
518 518
 						'container'      => false,
519 519
 						'menu_class'     => 'nav navbar-nav',
520 520
 						'walker'         => new LSX_Bootstrap_Navwalker(),
521
-					) );
521
+					));
522 522
 				?>
523 523
 			</nav>
524 524
 			<?php
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
 endif;
529 529
 
530
-if ( ! function_exists( 'lsx_sitemap_pages' ) ) :
530
+if ( ! function_exists('lsx_sitemap_pages')) :
531 531
 
532 532
 	/**
533 533
 	 * Outputs Pages for the Sitemap Template.
@@ -543,15 +543,15 @@  discard block
 block discarded – undo
543 543
 			'post_type'      => 'page',
544 544
 		);
545 545
 
546
-		$pages = new WP_Query( $page_args );
546
+		$pages = new WP_Query($page_args);
547 547
 
548
-		if ( $pages->have_posts() ) {
549
-			echo '<h2>' . esc_html__( 'Pages', 'lsx' ) . '</h2>';
548
+		if ($pages->have_posts()) {
549
+			echo '<h2>' . esc_html__('Pages', 'lsx') . '</h2>';
550 550
 			echo '<ul>';
551 551
 
552
-			while ( $pages->have_posts() ) {
552
+			while ($pages->have_posts()) {
553 553
 				$pages->the_post();
554
-				echo '<li class="page_item page-item-' . esc_attr( get_the_ID() ) . '"><a href="' . esc_url( get_permalink() ) . '" title="">' . get_the_title() . '</a></li>';
554
+				echo '<li class="page_item page-item-' . esc_attr(get_the_ID()) . '"><a href="' . esc_url(get_permalink()) . '" title="">' . get_the_title() . '</a></li>';
555 555
 			}
556 556
 
557 557
 			echo '</ul>';
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 
562 562
 endif;
563 563
 
564
-if ( ! function_exists( 'lsx_sitemap_custom_post_type' ) ) :
564
+if ( ! function_exists('lsx_sitemap_custom_post_type')) :
565 565
 
566 566
 	/**
567 567
 	 * Outputs a custom post type section.
@@ -575,9 +575,9 @@  discard block
 block discarded – undo
575 575
 			'_builtin' => false,
576 576
 		);
577 577
 
578
-		$post_types = get_post_types( $args , 'names' );
578
+		$post_types = get_post_types($args, 'names');
579 579
 
580
-		foreach ( $post_types as $post_type ) {
580
+		foreach ($post_types as $post_type) {
581 581
 			$post_type_args = array(
582 582
 				'post_type'      => 'page',
583 583
 				'posts_per_page' => 99,
@@ -585,22 +585,22 @@  discard block
 block discarded – undo
585 585
 				'post_type'      => $post_type,
586 586
 			);
587 587
 
588
-			$post_type_items  = new WP_Query( $post_type_args );
589
-			$post_type_object = get_post_type_object( $post_type );
588
+			$post_type_items  = new WP_Query($post_type_args);
589
+			$post_type_object = get_post_type_object($post_type);
590 590
 
591
-			if ( ! empty( $post_type_object ) ) {
591
+			if ( ! empty($post_type_object)) {
592 592
 				$title = $post_type_object->labels->name;
593 593
 			} else {
594
-				$title = ucwords( $post_type );
594
+				$title = ucwords($post_type);
595 595
 			}
596 596
 
597
-			if ( $post_type_items->have_posts() ) {
598
-				echo '<h2>' . esc_html( $title ) . '</h2>';
597
+			if ($post_type_items->have_posts()) {
598
+				echo '<h2>' . esc_html($title) . '</h2>';
599 599
 				echo '<ul>';
600 600
 
601
-				while ( $post_type_items->have_posts() ) {
601
+				while ($post_type_items->have_posts()) {
602 602
 					$post_type_items->the_post();
603
-					echo '<li class="' . esc_attr( get_post_type() ) . '_item ' . esc_attr( get_post_type() ) . '-item-' . esc_attr( get_the_ID() ) . '"><a href="' . esc_url( get_permalink() ) . '" title="">' . get_the_title() . '</a></li>';
603
+					echo '<li class="' . esc_attr(get_post_type()) . '_item ' . esc_attr(get_post_type()) . '-item-' . esc_attr(get_the_ID()) . '"><a href="' . esc_url(get_permalink()) . '" title="">' . get_the_title() . '</a></li>';
604 604
 				}
605 605
 
606 606
 				echo '</ul>';
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
 
612 612
 endif;
613 613
 
614
-if ( ! function_exists( 'lsx_sitemap_taxonomy_clouds' ) ) :
614
+if ( ! function_exists('lsx_sitemap_taxonomy_clouds')) :
615 615
 
616 616
 	/**
617 617
 	 * Outputs the public taxonomies.
@@ -625,18 +625,18 @@  discard block
 block discarded – undo
625 625
 			'_builtin' => false,
626 626
 		);
627 627
 
628
-		$taxonomies = get_taxonomies( $taxonomy_args );
628
+		$taxonomies = get_taxonomies($taxonomy_args);
629 629
 
630
-		if ( ! empty( $taxonomies ) ) {
631
-			foreach ( $taxonomies as $taxonomy_id => $taxonomy ) {
632
-				$tag_cloud = wp_tag_cloud( array(
630
+		if ( ! empty($taxonomies)) {
631
+			foreach ($taxonomies as $taxonomy_id => $taxonomy) {
632
+				$tag_cloud = wp_tag_cloud(array(
633 633
 					'taxonomy' => $taxonomy_id,
634 634
 					'echo'     => false,
635
-				) );
635
+				));
636 636
 
637
-				if ( ! empty( $tag_cloud ) ) {
638
-					echo '<h2>' . esc_html( $taxonomy ) . '</h2>';
639
-					echo '<aside id="' . esc_attr( $taxonomy_id ) . '" class="widget widget_' . esc_attr( $taxonomy_id ) . '">' . esc_html( $tag_cloud ) . '</aside>';
637
+				if ( ! empty($tag_cloud)) {
638
+					echo '<h2>' . esc_html($taxonomy) . '</h2>';
639
+					echo '<aside id="' . esc_attr($taxonomy_id) . '" class="widget widget_' . esc_attr($taxonomy_id) . '">' . esc_html($tag_cloud) . '</aside>';
640 640
 				}
641 641
 			}
642 642
 		}
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 
645 645
 endif;
646 646
 
647
-if ( ! function_exists( 'lsx_add_top_menu' ) ) :
647
+if ( ! function_exists('lsx_add_top_menu')) :
648 648
 
649 649
 	/**
650 650
 	 * Adds our top menu to the theme.
@@ -653,28 +653,28 @@  discard block
 block discarded – undo
653 653
 	 * @subpackage template-tags
654 654
 	 */
655 655
 	function lsx_add_top_menu() {
656
-		if ( has_nav_menu( 'top-menu' ) || has_nav_menu( 'top-menu-left' ) ) :
656
+		if (has_nav_menu('top-menu') || has_nav_menu('top-menu-left')) :
657 657
 			?>
658 658
 			<div id="top-menu" class="<?php lsx_top_menu_classes(); ?>">
659 659
 				<div class="container">
660
-					<?php if ( has_nav_menu( 'top-menu' ) ) : ?>
660
+					<?php if (has_nav_menu('top-menu')) : ?>
661 661
 						<nav class="top-menu">
662 662
 							<?php
663
-								wp_nav_menu( array(
663
+								wp_nav_menu(array(
664 664
 									'theme_location' => 'top-menu',
665 665
 									'walker'         => new LSX_Bootstrap_Navwalker(),
666
-								) );
666
+								));
667 667
 							?>
668 668
 						</nav>
669 669
 					<?php endif; ?>
670 670
 
671
-					<?php if ( has_nav_menu( 'top-menu-left' ) ) : ?>
671
+					<?php if (has_nav_menu('top-menu-left')) : ?>
672 672
 						<nav class="top-menu pull-left">
673 673
 							<?php
674
-								wp_nav_menu( array(
674
+								wp_nav_menu(array(
675 675
 									'theme_location' => 'top-menu-left',
676 676
 									'walker'         => new LSX_Bootstrap_Navwalker(),
677
-								) );
677
+								));
678 678
 							?>
679 679
 						</nav>
680 680
 					<?php endif; ?>
@@ -686,9 +686,9 @@  discard block
 block discarded – undo
686 686
 
687 687
 endif;
688 688
 
689
-add_action( 'lsx_header_before', 'lsx_add_top_menu' );
689
+add_action('lsx_header_before', 'lsx_add_top_menu');
690 690
 
691
-if ( ! function_exists( 'lsx_get_my_url' ) ) :
691
+if ( ! function_exists('lsx_get_my_url')) :
692 692
 
693 693
 	/**
694 694
 	 * Return URL from a link in the content.
@@ -697,11 +697,11 @@  discard block
 block discarded – undo
697 697
 	 * @subpackage template-tags
698 698
 	 */
699 699
 	function lsx_get_my_url() {
700
-		if ( ! preg_match( '/^<a\s[^>]*?href=[\'"](.+?)[\'"]$/is', get_the_content(), $matches ) ) {
700
+		if ( ! preg_match('/^<a\s[^>]*?href=[\'"](.+?)[\'"]$/is', get_the_content(), $matches)) {
701 701
 			return false;
702 702
 		}
703 703
 
704
-		return esc_url_raw( $matches[1] );
704
+		return esc_url_raw($matches[1]);
705 705
 	}
706 706
 
707 707
 endif;
Please login to merge, or discard this patch.