Completed
Push — master ( 3cda7b...636be9 )
by Fernando
04:01
created
inc/extras.php 4 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -198,6 +198,7 @@  discard block
 block discarded – undo
198 198
  * @package lsx
199 199
  * @subpackage extras
200 200
  * @category thumbnails
201
+ * @param string $size
201 202
  */
202 203
 function lsx_get_thumbnail($size,$image_src = false){
203 204
 	
@@ -252,6 +253,7 @@  discard block
 block discarded – undo
252 253
  * @package lsx
253 254
  * @subpackage extras
254 255
  * @category thumbnails
256
+ * @param boolean $image_src
255 257
  */
256 258
 function lsx_get_attachment_id_from_src($image_src) {
257 259
 	global $wpdb;
Please login to merge, or discard this patch.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	
15 15
   // Add post/page slug
16 16
   if (is_single() || is_page() && !is_front_page()) {
17
-    $classes[] = basename(get_permalink());
17
+	$classes[] = basename(get_permalink());
18 18
   }
19 19
   
20 20
   if(!class_exists('Lsx_Banners')){
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
   // Remove unnecessary classes
39 39
   $home_id_class = 'page-id-' . get_option('page_on_front');
40 40
   $remove_classes = array(
41
-    'page-template-default',
42
-    $home_id_class
41
+	'page-template-default',
42
+	$home_id_class
43 43
   );
44 44
   $classes = array_diff($classes, $remove_classes);
45 45
 
@@ -271,12 +271,12 @@  discard block
 block discarded – undo
271 271
 		 || (is_singular('jetpack-portfolio')) ) { ?>
272 272
 	        
273 273
 	        <?php 
274
-	        	$bg_image = '';
275
-	        	if(has_post_thumbnail()){
276
-	        		$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full');
277
-	        		$bg_image = $bg_image[0];
278
-	        	}
279
-	        ?>
274
+				$bg_image = '';
275
+				if(has_post_thumbnail()){
276
+					$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full');
277
+					$bg_image = $bg_image[0];
278
+				}
279
+			?>
280 280
 
281 281
 	   		<?php if ( ! empty( $bg_image ) ) : ?>
282 282
 	        
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
  * @category mobile
310 310
  */
311 311
 function lsx_allow_sms_protocol( $protocols ) {
312
-    $protocols[] = 'sms';
313
-    return $protocols;
312
+	$protocols[] = 'sms';
313
+	return $protocols;
314 314
 }
315 315
 add_filter( 'kses_allowed_protocols', 'lsx_allow_sms_protocol' );
316 316
 
@@ -322,27 +322,27 @@  discard block
 block discarded – undo
322 322
 		$http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
323 323
 		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
324 324
 
325
-        global $is_lynx, $is_gecko, $is_ie, $is_opera, $is_ns4, $is_safari, $is_chrome, $is_iphone;
326
-        if($is_lynx) $classes[] = 'lynx';
327
-        elseif($is_gecko) $classes[] = 'gecko';
328
-        elseif($is_opera) $classes[] = 'opera';
329
-        elseif($is_ns4) $classes[] = 'ns4';
330
-        elseif($is_safari) $classes[] = 'safari';
331
-        elseif($is_chrome) $classes[] = 'chrome';
332
-        elseif($is_ie) {
333
-                $classes[] = 'ie';
334
-                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
335
-                $classes[] = 'ie'.$browser_version[1];
336
-        } else $classes[] = 'unknown';
337
-        if($is_iphone) $classes[] = 'iphone';
338
-        if ( stristr( $http_user_agent, "mac") ) {
339
-                 $classes[] = 'osx';
340
-           } elseif ( stristr( $http_user_agent, "linux") ) {
341
-                 $classes[] = 'linux';
342
-           } elseif ( stristr( $http_user_agent, "windows") ) {
343
-                 $classes[] = 'windows';
344
-           }
345
-        return $classes;
325
+		global $is_lynx, $is_gecko, $is_ie, $is_opera, $is_ns4, $is_safari, $is_chrome, $is_iphone;
326
+		if($is_lynx) $classes[] = 'lynx';
327
+		elseif($is_gecko) $classes[] = 'gecko';
328
+		elseif($is_opera) $classes[] = 'opera';
329
+		elseif($is_ns4) $classes[] = 'ns4';
330
+		elseif($is_safari) $classes[] = 'safari';
331
+		elseif($is_chrome) $classes[] = 'chrome';
332
+		elseif($is_ie) {
333
+				$classes[] = 'ie';
334
+				if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
335
+				$classes[] = 'ie'.$browser_version[1];
336
+		} else $classes[] = 'unknown';
337
+		if($is_iphone) $classes[] = 'iphone';
338
+		if ( stristr( $http_user_agent, "mac") ) {
339
+				 $classes[] = 'osx';
340
+		   } elseif ( stristr( $http_user_agent, "linux") ) {
341
+				 $classes[] = 'linux';
342
+		   } elseif ( stristr( $http_user_agent, "windows") ) {
343
+				 $classes[] = 'windows';
344
+		   }
345
+		return $classes;
346 346
 }
347 347
 add_filter('body_class','mv_browser_body_class');
348 348
 
Please login to merge, or discard this patch.
Braces   +29 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Add and remove body_class() classes
@@ -192,10 +195,10 @@  discard block
 block discarded – undo
192 195
 	if(false === $image_src){
193 196
 		$post_id = get_the_ID(); 
194 197
 		$post_thumbnail_id = get_post_thumbnail_id( $post_id );
195
-	}elseif(false != $image_src	){
198
+	} elseif(false != $image_src	){
196 199
 		if(is_numeric($image_src)){
197 200
 			$post_thumbnail_id = $image_src;
198
-		}else{
201
+		} else{
199 202
 			$post_thumbnail_id = lsx_get_attachment_id_from_src($image_src);
200 203
 		}
201 204
 	}
@@ -323,18 +326,29 @@  discard block
 block discarded – undo
323 326
 		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
324 327
 
325 328
         global $is_lynx, $is_gecko, $is_ie, $is_opera, $is_ns4, $is_safari, $is_chrome, $is_iphone;
326
-        if($is_lynx) $classes[] = 'lynx';
327
-        elseif($is_gecko) $classes[] = 'gecko';
328
-        elseif($is_opera) $classes[] = 'opera';
329
-        elseif($is_ns4) $classes[] = 'ns4';
330
-        elseif($is_safari) $classes[] = 'safari';
331
-        elseif($is_chrome) $classes[] = 'chrome';
332
-        elseif($is_ie) {
329
+        if($is_lynx) {
330
+        	$classes[] = 'lynx';
331
+        } elseif($is_gecko) {
332
+        	$classes[] = 'gecko';
333
+        } elseif($is_opera) {
334
+        	$classes[] = 'opera';
335
+        } elseif($is_ns4) {
336
+        	$classes[] = 'ns4';
337
+        } elseif($is_safari) {
338
+        	$classes[] = 'safari';
339
+        } elseif($is_chrome) {
340
+        	$classes[] = 'chrome';
341
+        } elseif($is_ie) {
333 342
                 $classes[] = 'ie';
334
-                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
335
-                $classes[] = 'ie'.$browser_version[1];
336
-        } else $classes[] = 'unknown';
337
-        if($is_iphone) $classes[] = 'iphone';
343
+                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) {
344
+                                $classes[] = 'ie'.$browser_version[1];
345
+                }
346
+        } else {
347
+        	$classes[] = 'unknown';
348
+        }
349
+        if($is_iphone) {
350
+        	$classes[] = 'iphone';
351
+        }
338 352
         if ( stristr( $http_user_agent, "mac") ) {
339 353
                  $classes[] = 'osx';
340 354
            } elseif ( stristr( $http_user_agent, "linux") ) {
@@ -392,8 +406,7 @@  discard block
 block discarded – undo
392 406
 
393 407
 			if ( ! empty( $pagination ) ) {
394 408
 				$excerpt .= $pagination;
395
-			}
396
-			else {
409
+			} else {
397 410
 				$excerpt .= '<p><a class="moretag" href="'.get_permalink().'">'.__('Continue reading','lsx').'</a></p>';
398 411
 			}
399 412
 		}
Please login to merge, or discard this patch.
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Enable extra attributes (srcset, sizes) in img tag
6 6
  */
7
-function lsx_kses_allowed_html( $allowedtags, $context ) {
7
+function lsx_kses_allowed_html($allowedtags, $context) {
8 8
 	$allowedtags['img']['srcset'] = true;
9 9
 	$allowedtags['img']['sizes'] = true;
10 10
 
11 11
 	return $allowedtags;
12 12
 }
13
-add_filter( 'wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2 );
13
+add_filter('wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2);
14 14
 
15 15
 /**
16 16
  * Add and remove body_class() classes
@@ -19,21 +19,21 @@  discard block
 block discarded – undo
19 19
 	/*
20 20
 	 * Add the header layout class
21 21
 	 */
22
-	$header_layout = get_theme_mod('lsx_header_layout','inline');
23
-	$classes[] = 'header-'.$header_layout;
22
+	$header_layout = get_theme_mod('lsx_header_layout', 'inline');
23
+	$classes[] = 'header-' . $header_layout;
24 24
 		
25 25
 	
26 26
   // Add post/page slug
27
-  if (is_single() || is_page() && !is_front_page()) {
27
+  if (is_single() || is_page() && ! is_front_page()) {
28 28
     $classes[] = basename(get_permalink());
29 29
   }
30 30
   
31
-  if(!class_exists('Lsx_Banners')){
32
-		$post_types = array('page','post');
33
-		$post_types = apply_filters('lsx_allowed_post_type_banners',$post_types);  
31
+  if ( ! class_exists('Lsx_Banners')) {
32
+		$post_types = array('page', 'post');
33
+		$post_types = apply_filters('lsx_allowed_post_type_banners', $post_types);  
34 34
 
35
-		if((is_singular($post_types) && has_post_thumbnail()) 
36
-		|| (is_singular('jetpack-portfolio'))){
35
+		if ((is_singular($post_types) && has_post_thumbnail()) 
36
+		|| (is_singular('jetpack-portfolio'))) {
37 37
 			$classes[] = 'page-has-banner';
38 38
 		}
39 39
 	}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
   	$classes[] = 'has-top-menu';
43 43
   }
44 44
 
45
-	if ( get_theme_mod( 'lsx_preloader_content_status', '1' ) === '1' ) {
45
+	if (get_theme_mod('lsx_preloader_content_status', '1') === '1') {
46 46
 		$classes[] = 'preloader-content-enable';
47 47
 	}
48 48
 
@@ -66,30 +66,30 @@  discard block
 block discarded – undo
66 66
  * @param string $sep Optional separator.
67 67
  * @return string The filtered title.
68 68
  */
69
-function lsx_wp_title( $title, $sep ) {
69
+function lsx_wp_title($title, $sep) {
70 70
 	global $page, $paged;
71 71
 
72
-	if ( is_feed() ) {
72
+	if (is_feed()) {
73 73
 		return $title;
74 74
 	}
75 75
 
76 76
 	// Add the blog name
77
-	$title .= get_bloginfo( 'name' );
77
+	$title .= get_bloginfo('name');
78 78
 
79 79
 	// Add the blog description for the home/front page.
80
-	$site_description = get_bloginfo( 'description', 'display' );
81
-	if ( $site_description && ( is_home() || is_front_page() ) ) {
80
+	$site_description = get_bloginfo('description', 'display');
81
+	if ($site_description && (is_home() || is_front_page())) {
82 82
 		$title .= " $sep $site_description";
83 83
 	}
84 84
 
85 85
 	// Add a page number if necessary:
86
-	if ( $paged >= 2 || $page >= 2 ) {
87
-		$title .= " $sep " . sprintf( __( 'Page %s', 'lsx' ), max( $paged, $page ) );
86
+	if ($paged >= 2 || $page >= 2) {
87
+		$title .= " $sep " . sprintf(__('Page %s', 'lsx'), max($paged, $page));
88 88
 	}
89 89
 
90 90
 	return $title;
91 91
 }
92
-add_filter( 'wp_title', 'lsx_wp_title', 10, 2 );
92
+add_filter('wp_title', 'lsx_wp_title', 10, 2);
93 93
 
94 94
 
95 95
 /**
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
 function lsx_remove_self_closing_tags($input) {
111 111
   return str_replace(' />', '>', $input);
112 112
 }
113
-add_filter('get_avatar',          'lsx_remove_self_closing_tags'); // <img />
114
-add_filter('comment_id_fields',   'lsx_remove_self_closing_tags'); // <input />
113
+add_filter('get_avatar', 'lsx_remove_self_closing_tags'); // <img />
114
+add_filter('comment_id_fields', 'lsx_remove_self_closing_tags'); // <input />
115 115
 add_filter('post_thumbnail_html', 'lsx_remove_self_closing_tags'); // <img />
116 116
 
117 117
 
118
-if (!function_exists('lsx_get_attachment_id')) {
118
+if ( ! function_exists('lsx_get_attachment_id')) {
119 119
 	/**
120 120
 	 * Get the Attachment ID for a given image URL.
121 121
 	 *
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	function lsx_get_attachment_id($url) {
127 127
 		$dir = wp_upload_dir();
128 128
 		// baseurl never has a trailing slash
129
-		if (false === strpos($url, $dir['baseurl'].'/')) {
129
+		if (false === strpos($url, $dir['baseurl'] . '/')) {
130 130
 			// URL points to a place outside of upload directory
131 131
 			return false;
132 132
 		}
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 		$query['meta_query'][0]['key'] = '_wp_attached_file';
145 145
 		// query attachments
146 146
 		$ids = get_posts($query);
147
-		if (!empty($ids)) {
147
+		if ( ! empty($ids)) {
148 148
 			foreach ($ids as $id) {
149 149
 				// first entry of returned array is the URL
150
-				$temp_url = wp_get_attachment_image_src( $id, 'full' );
151
-				if ( array_shift( $temp_url ) === $url ) {
150
+				$temp_url = wp_get_attachment_image_src($id, 'full');
151
+				if (array_shift($temp_url) === $url) {
152 152
 					return $id;
153 153
 				}
154 154
 			}
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 		}
162 162
 		foreach ($ids as $id) {
163 163
 			$meta = wp_get_attachment_metadata($id);
164
-			foreach ( $meta['sizes'] as $size => $values ) {
165
-				if ( $values['file'] === $file && array_shift( wp_get_attachment_image_src( $id, $size ) ) === $url ) {
164
+			foreach ($meta['sizes'] as $size => $values) {
165
+				if ($values['file'] === $file && array_shift(wp_get_attachment_image_src($id, $size)) === $url) {
166 166
 					return $id;
167 167
 				}
168 168
 			}
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
  */
188 188
 function lsx_is_element_empty($element) {
189 189
 	$element = trim($element);
190
-	return empty($element)?false:true;
190
+	return empty($element) ? false : true;
191 191
 }
192 192
 
193 193
 
@@ -198,39 +198,39 @@  discard block
 block discarded – undo
198 198
  * @subpackage extras
199 199
  * @category thumbnails
200 200
  */
201
-function lsx_get_thumbnail($size,$image_src = false){
201
+function lsx_get_thumbnail($size, $image_src = false) {
202 202
 	
203
-	if(false === $image_src){
203
+	if (false === $image_src) {
204 204
 		$post_id = get_the_ID(); 
205
-		$post_thumbnail_id = get_post_thumbnail_id( $post_id );
206
-	}elseif(false != $image_src	){
207
-		if(is_numeric($image_src)){
205
+		$post_thumbnail_id = get_post_thumbnail_id($post_id);
206
+	}elseif (false != $image_src) {
207
+		if (is_numeric($image_src)) {
208 208
 			$post_thumbnail_id = $image_src;
209
-		}else{
209
+		} else {
210 210
 			$post_thumbnail_id = lsx_get_attachment_id_from_src($image_src);
211 211
 		}
212 212
 	}
213
-	$size = apply_filters('lsx_thumbnail_size',$size);
213
+	$size = apply_filters('lsx_thumbnail_size', $size);
214 214
 	$img = false;
215
-	if ( 'lsx-thumbnail-wide' === $size || 'thumbnail' === $size ) {
215
+	if ('lsx-thumbnail-wide' === $size || 'thumbnail' === $size) {
216 216
 		$srcset = false;
217
-		$img = wp_get_attachment_image_src($post_thumbnail_id,$size);
217
+		$img = wp_get_attachment_image_src($post_thumbnail_id, $size);
218 218
 		$img = $img[0];
219 219
 	} else {
220 220
 		$srcset = true;
221
-		$img = wp_get_attachment_image_srcset($post_thumbnail_id,$size);
222
-		if ( false == $img ) {
221
+		$img = wp_get_attachment_image_srcset($post_thumbnail_id, $size);
222
+		if (false == $img) {
223 223
 			$srcset = false;
224
-			$img = wp_get_attachment_image_src($post_thumbnail_id,$size);
224
+			$img = wp_get_attachment_image_src($post_thumbnail_id, $size);
225 225
 			$img = $img[0];
226 226
 		}
227 227
 	}
228
-	if ( $srcset ) {
229
-		$img = '<img alt="'.get_the_title(get_the_ID()).'" class="attachment-responsive wp-post-image lsx-responsive" srcset="'.$img.'" />';
228
+	if ($srcset) {
229
+		$img = '<img alt="' . get_the_title(get_the_ID()) . '" class="attachment-responsive wp-post-image lsx-responsive" srcset="' . $img . '" />';
230 230
 	} else {
231
-		$img = '<img alt="'.get_the_title(get_the_ID()).'" class="attachment-responsive wp-post-image lsx-responsive" src="'.$img.'" />';
231
+		$img = '<img alt="' . get_the_title(get_the_ID()) . '" class="attachment-responsive wp-post-image lsx-responsive" src="' . $img . '" />';
232 232
 	}
233
-	$img = apply_filters('lsx_lazyload_filter_images',$img);
233
+	$img = apply_filters('lsx_lazyload_filter_images', $img);
234 234
 	return $img;
235 235
 }
236 236
 
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
  * @subpackage extras
242 242
  * @category thumbnails
243 243
  */
244
-function lsx_thumbnail( $size = 'thumbnail', $image_src = false ) {
245
-	echo wp_kses_post( lsx_get_thumbnail( $size, $image_src ) );
244
+function lsx_thumbnail($size = 'thumbnail', $image_src = false) {
245
+	echo wp_kses_post(lsx_get_thumbnail($size, $image_src));
246 246
 }
247 247
 
248 248
 
@@ -252,13 +252,13 @@  discard block
 block discarded – undo
252 252
  * @subpackage extras
253 253
  * @category thumbnails
254 254
  */
255
-function lsx_get_attachment_id_from_src( $image_src ) {
256
-	$post_id = wp_cache_get( $image_src, 'lsx_get_attachment_id_from_src' );
255
+function lsx_get_attachment_id_from_src($image_src) {
256
+	$post_id = wp_cache_get($image_src, 'lsx_get_attachment_id_from_src');
257 257
 	
258
-	if ( false === $post_id ) {
258
+	if (false === $post_id) {
259 259
 		global $wpdb;
260
-		$post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src ) );
261
-		wp_cache_set( $image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600 );
260
+		$post_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src));
261
+		wp_cache_set($image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600);
262 262
 	}
263 263
 
264 264
 	return $post_id;
@@ -272,28 +272,28 @@  discard block
 block discarded – undo
272 272
  * @subpackage extras
273 273
  * @category banner
274 274
  */
275
-if (!function_exists('lsx_page_banner')) {
275
+if ( ! function_exists('lsx_page_banner')) {
276 276
 	function lsx_page_banner() {
277 277
 
278
-		$post_types = array('page','post');
279
-		$post_types = apply_filters('lsx_allowed_post_type_banners',$post_types);	
278
+		$post_types = array('page', 'post');
279
+		$post_types = apply_filters('lsx_allowed_post_type_banners', $post_types);	
280 280
 		
281
-		if ( (is_singular($post_types) && has_post_thumbnail())
282
-		 || (is_singular('jetpack-portfolio')) ) { ?>
281
+		if ((is_singular($post_types) && has_post_thumbnail())
282
+		 || (is_singular('jetpack-portfolio'))) { ?>
283 283
 	        
284 284
 	        <?php 
285 285
 	        	$bg_image = '';
286
-	        	if(has_post_thumbnail()){
287
-	        		$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full');
286
+	        	if (has_post_thumbnail()) {
287
+	        		$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
288 288
 	        		$bg_image = $bg_image[0];
289 289
 	        	}
290 290
 	        ?>
291 291
 
292
-	   		<?php if ( ! empty( $bg_image ) ) : ?>
292
+	   		<?php if ( ! empty($bg_image)) : ?>
293 293
 	        
294 294
 	        <div class="page-banner-wrap">
295 295
 		        <div class="page-banner">
296
-		        	<div class="page-banner-image" style="background-image:url(<?php echo esc_attr( $bg_image ); ?>);"></div>
296
+		        	<div class="page-banner-image" style="background-image:url(<?php echo esc_attr($bg_image); ?>);"></div>
297 297
 
298 298
 		        	<div class="container">
299 299
 			            <header class="page-header">
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 	    <?php } 
310 310
 	}
311 311
 }
312
-add_action( 'lsx_header_after', 'lsx_page_banner' );
312
+add_action('lsx_header_after', 'lsx_page_banner');
313 313
 
314 314
 
315 315
 /**
@@ -319,43 +319,43 @@  discard block
 block discarded – undo
319 319
  * @subpackage extras
320 320
  * @category mobile
321 321
  */
322
-function lsx_allow_sms_protocol( $protocols ) {
322
+function lsx_allow_sms_protocol($protocols) {
323 323
     $protocols[] = 'sms';
324 324
     return $protocols;
325 325
 }
326
-add_filter( 'kses_allowed_protocols', 'lsx_allow_sms_protocol' );
326
+add_filter('kses_allowed_protocols', 'lsx_allow_sms_protocol');
327 327
 
328 328
 
329 329
 /**
330 330
  * Adding browser and user-agent classes to body
331 331
  */
332 332
 function mv_browser_body_class($classes) {
333
-		$http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
334
-		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
333
+		$http_user_agent = sanitize_text_field(wp_unslash($_SERVER['HTTP_USER_AGENT']));
334
+		$http_user_agent = ! empty($http_user_agent) ? $http_user_agent : '';
335 335
 
336 336
         global $is_lynx, $is_gecko, $is_ie, $is_opera, $is_ns4, $is_safari, $is_chrome, $is_iphone;
337
-        if($is_lynx) $classes[] = 'lynx';
338
-        elseif($is_gecko) $classes[] = 'gecko';
339
-        elseif($is_opera) $classes[] = 'opera';
340
-        elseif($is_ns4) $classes[] = 'ns4';
341
-        elseif($is_safari) $classes[] = 'safari';
342
-        elseif($is_chrome) $classes[] = 'chrome';
343
-        elseif($is_ie) {
337
+        if ($is_lynx) $classes[] = 'lynx';
338
+        elseif ($is_gecko) $classes[] = 'gecko';
339
+        elseif ($is_opera) $classes[] = 'opera';
340
+        elseif ($is_ns4) $classes[] = 'ns4';
341
+        elseif ($is_safari) $classes[] = 'safari';
342
+        elseif ($is_chrome) $classes[] = 'chrome';
343
+        elseif ($is_ie) {
344 344
                 $classes[] = 'ie';
345
-                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
346
-                $classes[] = 'ie'.$browser_version[1];
345
+                if (preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
346
+                $classes[] = 'ie' . $browser_version[1];
347 347
         } else $classes[] = 'unknown';
348
-        if($is_iphone) $classes[] = 'iphone';
349
-        if ( stristr( $http_user_agent, "mac") ) {
348
+        if ($is_iphone) $classes[] = 'iphone';
349
+        if (stristr($http_user_agent, "mac")) {
350 350
                  $classes[] = 'osx';
351
-           } elseif ( stristr( $http_user_agent, "linux") ) {
351
+           } elseif (stristr($http_user_agent, "linux")) {
352 352
                  $classes[] = 'linux';
353
-           } elseif ( stristr( $http_user_agent, "windows") ) {
353
+           } elseif (stristr($http_user_agent, "windows")) {
354 354
                  $classes[] = 'windows';
355 355
            }
356 356
         return $classes;
357 357
 }
358
-add_filter('body_class','mv_browser_body_class');
358
+add_filter('body_class', 'mv_browser_body_class');
359 359
 
360 360
 
361 361
 /**
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
  * @param		$form		Object
369 369
  * @return		String
370 370
  */
371
-function lsx_form_submit_button($button, $form){
371
+function lsx_form_submit_button($button, $form) {
372 372
 	return "<button class='btn btn-primary' id='gform_submit_button_{$form["id"]}'><span>Submit</span></button>";
373 373
 }
374 374
 add_filter("gform_submit_button", "lsx_form_submit_button", 10, 2);
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	//return ' ... <a class="moretag" href="'. get_permalink($post->ID) . '">'.esc_html__('Continue reading','lsx').'</a>';
383 383
 	return '...';
384 384
 }
385
-add_filter( 'excerpt_more', 'lsx_excerpt_more' );
385
+add_filter('excerpt_more', 'lsx_excerpt_more');
386 386
 
387 387
 
388 388
 /**
@@ -391,44 +391,44 @@  discard block
 block discarded – undo
391 391
 function lsx_the_excerpt_filter($excerpt) {
392 392
 	$show_full_content = has_post_format(apply_filters('lsx_the_excerpt_filter_post_types', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio')));
393 393
 	
394
-	if (!$show_full_content) {
395
-		if ('' !== $excerpt  && !stristr($excerpt, 'moretag')) {
396
-			$pagination = wp_link_pages( array(
394
+	if ( ! $show_full_content) {
395
+		if ('' !== $excerpt && ! stristr($excerpt, 'moretag')) {
396
+			$pagination = wp_link_pages(array(
397 397
 							'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
398 398
 							'after' => '</div></div>',
399 399
 							'link_before' => '<span>',
400 400
 							'link_after' => '</span>',
401 401
 							'echo' => 0
402
-						) );
402
+						));
403 403
 
404
-			if ( ! empty( $pagination ) ) {
404
+			if ( ! empty($pagination)) {
405 405
 				$excerpt .= $pagination;
406 406
 			}
407 407
 			else {
408
-				$excerpt .= '<p><a class="moretag" href="'.get_permalink().'">'.esc_html__('Continue reading','lsx').'</a></p>';
408
+				$excerpt .= '<p><a class="moretag" href="' . get_permalink() . '">' . esc_html__('Continue reading', 'lsx') . '</a></p>';
409 409
 			}
410 410
 		}
411 411
 	}
412 412
 
413 413
 	return $excerpt;
414 414
 }
415
-add_filter( 'the_excerpt', 'lsx_the_excerpt_filter' , 1 , 20 );
415
+add_filter('the_excerpt', 'lsx_the_excerpt_filter', 1, 20);
416 416
 
417 417
 
418 418
 /**
419 419
  * Allow HTML tags in excerpt
420 420
  */
421
-if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) {
421
+if ( ! function_exists('wpse_custom_wp_trim_excerpt')) {
422 422
 	function wpse_custom_wp_trim_excerpt($wpse_excerpt) {
423 423
 		global $post;
424 424
 		$raw_excerpt = $wpse_excerpt;
425 425
 
426
-		if ( '' == $wpse_excerpt ) {
426
+		if ('' == $wpse_excerpt) {
427 427
 			$wpse_excerpt = get_the_content('');
428 428
 			$show_full_content = has_post_format(array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio'));
429 429
 
430
-			if (!$show_full_content) {
431
-				$wpse_excerpt = strip_shortcodes( $wpse_excerpt );
430
+			if ( ! $show_full_content) {
431
+				$wpse_excerpt = strip_shortcodes($wpse_excerpt);
432 432
 				$wpse_excerpt = apply_filters('the_content', $wpse_excerpt);
433 433
 				$wpse_excerpt = str_replace(']]>', ']]>', $wpse_excerpt);
434 434
 				$wpse_excerpt = strip_tags($wpse_excerpt, '<blockquote>,<p>,<br>,<b>,<strong>,<i>,<u>,<ul>,<li>,<span>,<div>');
@@ -456,12 +456,12 @@  discard block
 block discarded – undo
456 456
 				$wpse_excerpt = trim(force_balance_tags($excerpt_output));
457 457
 
458 458
 				if ($has_more) {
459
-					$excerpt_end = '<a class="moretag" href="'.get_permalink().'">'.esc_html__('More','lsx').'</a>';
459
+					$excerpt_end = '<a class="moretag" href="' . get_permalink() . '">' . esc_html__('More', 'lsx') . '</a>';
460 460
 					$excerpt_end = apply_filters('excerpt_more', ' ' . $excerpt_end); 
461 461
 
462 462
 					$pos = strrpos($wpse_excerpt, '</');
463 463
 
464
-					if ( false !== $pos ) {
464
+					if (false !== $pos) {
465 465
 						// Inside last HTML tag
466 466
 						$wpse_excerpt = substr_replace($wpse_excerpt, $excerpt_end, $pos, 0); /* Add read more next to last word */
467 467
 					} else {
@@ -484,4 +484,4 @@  discard block
 block discarded – undo
484 484
 }
485 485
 remove_filter('get_the_excerpt', 'wp_trim_excerpt');
486 486
 add_filter('get_the_excerpt', 'wpse_custom_wp_trim_excerpt');
487
-remove_filter( 'the_excerpt', 'wpautop' );
487
+remove_filter('the_excerpt', 'wpautop');
Please login to merge, or discard this patch.
inc/layout.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -5,6 +5,7 @@
 block discarded – undo
5 5
  * Layout hooks
6 6
  *
7 7
  * @package lsx
8
+ * @param string $class
8 9
  */
9 10
 
10 11
 function lsx_layout_selector( $class, $area = 'site' ) {
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Layout hooks
@@ -62,7 +65,7 @@  discard block
 block discarded – undo
62 65
 	$show_on_front = get_option('show_on_front');
63 66
 	if('page' == $show_on_front){
64 67
 		return lsx_layout_selector( 'main', 'home' );
65
-	}else{
68
+	} else{
66 69
 		return lsx_layout_selector( 'main', 'site' );
67 70
 	}
68 71
 
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Layout hooks
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @package lsx
8 8
  */
9 9
 
10
-function lsx_layout_selector( $class, $area = 'site' ) {
10
+function lsx_layout_selector($class, $area = 'site') {
11 11
 
12
-	$layout = get_theme_mod('lsx_layout','2cr');
13
-	$layout = apply_filters( 'lsx_layout', $layout );
12
+	$layout = get_theme_mod('lsx_layout', '2cr');
13
+	$layout = apply_filters('lsx_layout', $layout);
14 14
 
15 15
 	$default_size = 'sm';
16
-	$size = apply_filters( 'lsx_bootstrap_column_size', $default_size );
16
+	$size = apply_filters('lsx_bootstrap_column_size', $default_size);
17 17
 
18
-	switch ( $layout ) {
18
+	switch ($layout) {
19 19
 		case '1c':
20 20
 			$main_class = 'col-' . $size . '-12';
21 21
 			$sidebar_class = 'col-' . $size . '-12';
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 			break;
35 35
 	}
36 36
 
37
-	if ( 'main' == $class ) {
37
+	if ('main' == $class) {
38 38
 		return $main_class;
39 39
 	}
40 40
 
41
-	if ( 'sidebar' == $class ) {
41
+	if ('sidebar' == $class) {
42 42
 		return $sidebar_class;
43 43
 	}
44 44
 }
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
  * .main classes
48 48
  */
49 49
 function lsx_main_class() {
50
-	return lsx_layout_selector( 'main' );
50
+	return lsx_layout_selector('main');
51 51
 }
52 52
 
53 53
 function lsx_home_main_class() {
54
-	return lsx_layout_selector( 'main', 'home' );
54
+	return lsx_layout_selector('main', 'home');
55 55
 }
56 56
 
57 57
 /**
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
 function lsx_index_main_class() {
61 61
 
62 62
 	$show_on_front = get_option('show_on_front');
63
-	if('page' == $show_on_front){
64
-		return lsx_layout_selector( 'main', 'home' );
65
-	}else{
66
-		return lsx_layout_selector( 'main', 'site' );
63
+	if ('page' == $show_on_front) {
64
+		return lsx_layout_selector('main', 'home');
65
+	} else {
66
+		return lsx_layout_selector('main', 'site');
67 67
 	}
68 68
 
69 69
 }
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
  * .sidebar classes
73 73
  */
74 74
 function lsx_sidebar_class() {
75
-	return lsx_layout_selector( 'sidebar' );
75
+	return lsx_layout_selector('sidebar');
76 76
 }
77 77
 
78 78
 function lsx_home_sidebar_class() {
79
-	return lsx_layout_selector( 'sidebar', 'home' );
79
+	return lsx_layout_selector('sidebar', 'home');
80 80
 }
81 81
 
82 82
 /**
@@ -91,15 +91,15 @@  discard block
 block discarded – undo
91 91
 	$classes = 'banner navbar navbar-default';
92 92
 	
93 93
 	//Fixed header
94
-	$fixed_header = get_theme_mod('lsx_header_fixed',false);
95
-	if(false != $fixed_header){
94
+	$fixed_header = get_theme_mod('lsx_header_fixed', false);
95
+	if (false != $fixed_header) {
96 96
 		$classes .= ' navbar-static-top';
97 97
 	}
98 98
 	
99
-	if(false != $additional){
100
-		$classes .= ' '.$additional;
99
+	if (false != $additional) {
100
+		$classes .= ' ' . $additional;
101 101
 	}
102
-	echo esc_attr( $classes );
102
+	echo esc_attr($classes);
103 103
 }
104 104
 
105 105
 /**
@@ -114,37 +114,37 @@  discard block
 block discarded – undo
114 114
 	$classes = 'top-menu-default';
115 115
 	
116 116
 	//Fixed header
117
-	$fixed_header = get_theme_mod('lsx_header_fixed',false);
118
-	if(false != $fixed_header){
117
+	$fixed_header = get_theme_mod('lsx_header_fixed', false);
118
+	if (false != $fixed_header) {
119 119
 		$classes .= ' top-menu-fixed';
120 120
 	}
121 121
 	
122
-	if(false != $additional){
123
-		$classes .= ' '.$additional;
122
+	if (false != $additional) {
123
+		$classes .= ' ' . $additional;
124 124
 	}
125
-	echo esc_attr( $classes );
125
+	echo esc_attr($classes);
126 126
 }
127 127
 
128
-add_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
129
-if ( ! function_exists( 'lsx_add_footer_sidebar_area' ) ) { 
128
+add_action('lsx_footer_before', 'lsx_add_footer_sidebar_area');
129
+if ( ! function_exists('lsx_add_footer_sidebar_area')) { 
130 130
 	function lsx_add_footer_sidebar_area() {
131
-		if ( is_active_sidebar( 'sidebar-footer-cta' ) ) : ?>
131
+		if (is_active_sidebar('sidebar-footer-cta')) : ?>
132 132
 			<div id="footer-cta">
133 133
 				<div class="container">
134 134
 					<div class="lsx-full-width">
135 135
 						<div class="lsx-hero-unit">
136
-							<?php dynamic_sidebar( 'sidebar-footer-cta' ); ?>
136
+							<?php dynamic_sidebar('sidebar-footer-cta'); ?>
137 137
 						</div>
138 138
 					</div>
139 139
 				</div>
140 140
 			</div>
141 141
 		<?php endif; ?>
142 142
 
143
-		<?php if ( is_active_sidebar( 'sidebar-footer' ) ) : ?>
143
+		<?php if (is_active_sidebar('sidebar-footer')) : ?>
144 144
 			<div id="footer-widgets">
145 145
 				<div class="container">
146 146
 					<div class="row">
147
-						<?php dynamic_sidebar( 'sidebar-footer' ); ?>
147
+						<?php dynamic_sidebar('sidebar-footer'); ?>
148 148
 					</div>
149 149
 				</div>
150 150
 			</div>
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		<?php
168 168
 	else*/if (is_singular('post')) :
169 169
 		$format = get_post_format();
170
-		if ( false === $format ) {
170
+		if (false === $format) {
171 171
 			$format = 'standard';
172 172
 		}
173 173
 		$format_link = get_post_format_link($format);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		?>
176 176
 		<header class="archive-header">
177 177
 			<h1 class="archive-title">
178
-				<i class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></i>
178
+				<i class="format-link fa fa-<?php echo esc_attr($format) ?>"></i>
179 179
 				<span><?php the_title(); ?></span>
180 180
 			</h1>
181 181
 		</header>
@@ -189,25 +189,25 @@  discard block
 block discarded – undo
189 189
 	elseif (is_search()) :
190 190
 		?>
191 191
 		<header class="archive-header">
192
-			<h1 class="archive-title"><?php printf( esc_html__( 'Search Results for: %s', 'lsx' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
192
+			<h1 class="archive-title"><?php printf(esc_html__('Search Results for: %s', 'lsx'), '<span>' . get_search_query() . '</span>'); ?></h1>
193 193
 		</header>
194 194
 		<?php
195 195
 	elseif (is_author()) :
196 196
 		?>
197 197
 		<header class="archive-header">
198 198
 			<h1 class="archive-title">
199
-				<?php printf( esc_html__( 'Author: %s', 'lsx' ), get_the_author() ); ?>
199
+				<?php printf(esc_html__('Author: %s', 'lsx'), get_the_author()); ?>
200 200
 			</h1>
201 201
 
202 202
 			<?php if (get_the_author_meta('description')) { ?>
203
-			    <p class="author-desc"><?php echo esc_html( get_the_author_meta( 'description' ) ) ?></p>
203
+			    <p class="author-desc"><?php echo esc_html(get_the_author_meta('description')) ?></p>
204 204
 			<?php } ?>
205 205
 		</header>
206 206
 		<?php
207
-	elseif (is_archive() && class_exists('WooCommerce') && is_post_type_archive('product') ) :
207
+	elseif (is_archive() && class_exists('WooCommerce') && is_post_type_archive('product')) :
208 208
 		?>
209 209
 		<header class="archive-header">
210
-			<h1 class="archive-title"><?php esc_html_e( 'Shop', 'lsx' ); ?></h1>
210
+			<h1 class="archive-title"><?php esc_html_e('Shop', 'lsx'); ?></h1>
211 211
 			<?php echo term_description(); ?>
212 212
 		</header>
213 213
 		<?php
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		?>
216 216
 		<header class="archive-header">
217 217
 			<h1 class="archive-title">
218
-				<?php if ( has_post_format() && !is_category() && !is_tag() && !is_date() && !is_tax('post_format') ) { ?>
218
+				<?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?>
219 219
 					Type: <?php the_archive_title(); ?>
220 220
 				<?php } else { ?>
221 221
 					<?php the_archive_title(); ?>
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
 	if (in_array('blog', $classes)) { ?>
242 242
 		<header class="archive-header">
243
-			<h1 class="archive-title"><?php esc_html_e( 'Blog', 'lsx' ); ?></h1>
243
+			<h1 class="archive-title"><?php esc_html_e('Blog', 'lsx'); ?></h1>
244 244
 		</header>
245 245
 	<?php }
246 246
 }
@@ -253,16 +253,16 @@  discard block
 block discarded – undo
253 253
 	?>
254 254
 		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
255 255
 	<?php }
256
-add_action( 'wp_head', 'lsx_add_viewport_meta_tag' );
256
+add_action('wp_head', 'lsx_add_viewport_meta_tag');
257 257
 
258 258
 
259 259
 /**
260 260
  * Add a search form to just above the nav menu
261 261
  */
262 262
 function lsx_header_search_form() {
263
-	$search_form = get_theme_mod( 'lsx_header_search', 0 );
264
-	if($search_form || is_customize_preview()){
265
-		get_search_form( true );
263
+	$search_form = get_theme_mod('lsx_header_search', 0);
264
+	if ($search_form || is_customize_preview()) {
265
+		get_search_form(true);
266 266
 	}
267 267
 }
268
-add_action( 'lsx_nav_before', 'lsx_header_search_form', 0 );
269 268
\ No newline at end of file
269
+add_action('lsx_nav_before', 'lsx_header_search_form', 0);
270 270
\ No newline at end of file
Please login to merge, or discard this patch.
inc/lazyload.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -140,6 +140,9 @@
 block discarded – undo
140 140
 		return self::$noscripts[(int) $match[1]];
141 141
 	}
142 142
 
143
+	/**
144
+	 * @param string $new_class
145
+	 */
143 146
 	static function add_class( $html_string = '', $new_class ) {
144 147
 		$pattern = '/class=[\'"]([^\'"]*)[\'"]/';
145 148
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
3 5
 
4 6
 /*
5 7
  * LSX Lazy Load Images Class
@@ -25,8 +27,9 @@  discard block
 block discarded – undo
25 27
 	protected static $noscripts   = array();
26 28
 
27 29
 	static function init() {
28
-		if ( is_admin() )
29
-			return;
30
+		if ( is_admin() ) {
31
+					return;
32
+		}
30 33
 
31 34
 		if ( get_theme_mod( 'lsx_lazyload_status', '1' ) === false ) {
32 35
 			self::$enabled = false;
Please login to merge, or discard this patch.
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return;
2
+if ( ! defined('ABSPATH')) return;
3 3
 
4 4
 /*
5 5
  * LSX Lazy Load Images Class
@@ -25,143 +25,143 @@  discard block
 block discarded – undo
25 25
 	protected static $noscripts   = array();
26 26
 
27 27
 	static function init() {
28
-		if ( is_admin() )
28
+		if (is_admin())
29 29
 			return;
30 30
 
31
-		if ( get_theme_mod( 'lsx_lazyload_status', '1' ) === false ) {
31
+		if (get_theme_mod('lsx_lazyload_status', '1') === false) {
32 32
 			self::$enabled = false;
33 33
 			return;
34 34
 		}
35 35
 
36
-		if ( ! apply_filters( 'lsx_lazyload_is_enabled', true ) ) {
36
+		if ( ! apply_filters('lsx_lazyload_is_enabled', true)) {
37 37
 			self::$enabled = false;
38 38
 			return;
39 39
 		}
40 40
 
41
-		add_action( 'wp_enqueue_scripts', array( __CLASS__, 'add_scripts' ) );
42
-		add_action( 'wp_head', array( __CLASS__, 'setup_filters' ), 9999 );
43
-		add_filter( 'wp_kses_allowed_html', array( __CLASS__, 'kses_allowed_html' ), 10, 2 );
44
-		add_filter( 'kses_allowed_protocols', array( __CLASS__, 'kses_allowed_protocols' ) );
41
+		add_action('wp_enqueue_scripts', array(__CLASS__, 'add_scripts'));
42
+		add_action('wp_head', array(__CLASS__, 'setup_filters'), 9999);
43
+		add_filter('wp_kses_allowed_html', array(__CLASS__, 'kses_allowed_html'), 10, 2);
44
+		add_filter('kses_allowed_protocols', array(__CLASS__, 'kses_allowed_protocols'));
45 45
 	}
46 46
 
47 47
 	static function setup_filters() {
48 48
 		// WordPress
49
-		add_filter( 'the_content', array( __CLASS__, 'filter_images' ), 200 );
50
-		add_filter( 'widget_text', array( __CLASS__, 'filter_images' ), 200 );
51
-		add_filter( 'post_thumbnail_html', array( __CLASS__, 'filter_images' ), 200 );
52
-		add_filter( 'get_avatar', array( __CLASS__, 'filter_images' ), 200 );
49
+		add_filter('the_content', array(__CLASS__, 'filter_images'), 200);
50
+		add_filter('widget_text', array(__CLASS__, 'filter_images'), 200);
51
+		add_filter('post_thumbnail_html', array(__CLASS__, 'filter_images'), 200);
52
+		add_filter('get_avatar', array(__CLASS__, 'filter_images'), 200);
53 53
 		
54 54
 		// LSX
55
-		add_filter( 'lsx_lazyload_filter_images', array( __CLASS__, 'filter_images' ), 200 );
55
+		add_filter('lsx_lazyload_filter_images', array(__CLASS__, 'filter_images'), 200);
56 56
 
57 57
 		// Envira Gallery
58
-		add_filter( 'envira_gallery_output_image', array( __CLASS__, 'filter_images' ), 200 );
58
+		add_filter('envira_gallery_output_image', array(__CLASS__, 'filter_images'), 200);
59 59
 	}
60 60
 
61 61
 	static function add_scripts() {
62
-		wp_enqueue_script( 'lazysizes', get_template_directory_uri() .'/js/vendor/lazysizes.min.js', array( 'jquery' ), LSX_VERSION, true );
62
+		wp_enqueue_script('lazysizes', get_template_directory_uri() . '/js/vendor/lazysizes.min.js', array('jquery'), LSX_VERSION, true);
63 63
 		// Plugin that enables use lazysizes in brackground images
64 64
 		//wp_enqueue_script( 'lazysizes', get_template_directory_uri() .'/js/vendor/ls.unveilhooks.min.js', array( 'jquery', 'lazysizes' ), LSX_VERSION, true );
65 65
 	}
66 66
 
67
-	static function filter_images( $content ) {
68
-		if ( ! self::is_enabled() ) {
67
+	static function filter_images($content) {
68
+		if ( ! self::is_enabled()) {
69 69
 			return $content;
70 70
 		}
71 71
 
72
-		$http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
73
-		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
72
+		$http_user_agent = sanitize_text_field(wp_unslash($_SERVER['HTTP_USER_AGENT']));
73
+		$http_user_agent = ! empty($http_user_agent) ? $http_user_agent : '';
74 74
 
75
-		if ( is_feed()
75
+		if (is_feed()
76 76
 			|| is_preview()
77
-			|| intval( get_query_var( 'print' ) ) == 1
78
-			|| intval( get_query_var( 'printpage' ) ) == 1
79
-			|| strpos( $http_user_agent, 'Opera Mini' ) !== false
77
+			|| intval(get_query_var('print')) == 1
78
+			|| intval(get_query_var('printpage')) == 1
79
+			|| strpos($http_user_agent, 'Opera Mini') !== false
80 80
 		) {
81 81
 			return $content;
82 82
 		}
83 83
 
84 84
 		$skip_images_regex = '/class=".*(lazyload|disable-lazyload).*"/';
85
-		$placeholder_image = apply_filters( 'lsx_lazyload_placeholder_image', 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' );
85
+		$placeholder_image = apply_filters('lsx_lazyload_placeholder_image', 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
86 86
 
87 87
 		$matches = array();
88 88
 		$search = array();
89 89
 		$replace = array();
90 90
 		
91
-		$content = preg_replace_callback( '~<noscript.+?</noscript>~s', 'self::noscripts_remove', $content );
92
-		preg_match_all( '/<img[^>]*>/', $content, $matches );
91
+		$content = preg_replace_callback('~<noscript.+?</noscript>~s', 'self::noscripts_remove', $content);
92
+		preg_match_all('/<img[^>]*>/', $content, $matches);
93 93
 
94
-		foreach ( $matches[0] as $img_html ) {
95
-			if ( ! ( preg_match( $skip_images_regex, $img_html ) ) ) {
94
+		foreach ($matches[0] as $img_html) {
95
+			if ( ! (preg_match($skip_images_regex, $img_html))) {
96 96
 				$add_class = false;
97 97
 
98
-				if ( ! preg_match( '/src=[\'"]([^\'"]+)[\'"]/', $img_html ) && preg_match( '/srcset=[\'"]([^\'"]+)[\'"]/', $img_html ) ) {
99
-					$replace_html = preg_replace( '/<img(.*?)srcset=/i', '<img$1srcset="' . $placeholder_image . '" data-srcset=', $img_html );
98
+				if ( ! preg_match('/src=[\'"]([^\'"]+)[\'"]/', $img_html) && preg_match('/srcset=[\'"]([^\'"]+)[\'"]/', $img_html)) {
99
+					$replace_html = preg_replace('/<img(.*?)srcset=/i', '<img$1srcset="' . $placeholder_image . '" data-srcset=', $img_html);
100 100
 
101
-					if ( preg_match( '/sizes=[\'"]([^\'"]+)[\'"]/', $img_html ) ) {
102
-						$replace_html = preg_replace( '/sizes=/i', 'data-sizes=', $replace_html );
101
+					if (preg_match('/sizes=[\'"]([^\'"]+)[\'"]/', $img_html)) {
102
+						$replace_html = preg_replace('/sizes=/i', 'data-sizes=', $replace_html);
103 103
 					} else {
104
-						$replace_html = preg_replace( '/data-srcset=/i', 'data-sizes="auto" data-srcset=', $replace_html );
104
+						$replace_html = preg_replace('/data-srcset=/i', 'data-sizes="auto" data-srcset=', $replace_html);
105 105
 					}
106 106
 
107 107
 					$add_class = true;
108
-				} elseif ( preg_match( '/src=[\'"]([^\'"]+)[\'"]/', $img_html ) ) {
109
-					$replace_html = preg_replace( '/<img(.*?)src=/i', '<img$1src="' . $placeholder_image . '" data-src=', $img_html );
108
+				} elseif (preg_match('/src=[\'"]([^\'"]+)[\'"]/', $img_html)) {
109
+					$replace_html = preg_replace('/<img(.*?)src=/i', '<img$1src="' . $placeholder_image . '" data-src=', $img_html);
110 110
 
111
-					if ( preg_match( '/srcset=[\'"]([^\'"]+)[\'"]/', $img_html ) ) {
112
-						if ( preg_match( '/sizes=[\'"]([^\'"]+)[\'"]/', $img_html ) ) {
113
-							$replace_html = preg_replace( '/srcset=/i', 'data-srcset=', $replace_html );
114
-							$replace_html = preg_replace( '/sizes=/i', 'data-sizes=', $replace_html );
111
+					if (preg_match('/srcset=[\'"]([^\'"]+)[\'"]/', $img_html)) {
112
+						if (preg_match('/sizes=[\'"]([^\'"]+)[\'"]/', $img_html)) {
113
+							$replace_html = preg_replace('/srcset=/i', 'data-srcset=', $replace_html);
114
+							$replace_html = preg_replace('/sizes=/i', 'data-sizes=', $replace_html);
115 115
 						} else {
116
-							$replace_html = preg_replace( '/srcset=/i', 'data-sizes="auto" data-srcset=', $replace_html );
116
+							$replace_html = preg_replace('/srcset=/i', 'data-sizes="auto" data-srcset=', $replace_html);
117 117
 						}
118 118
 					}
119 119
 
120 120
 					$add_class = true;
121 121
 				}
122 122
 
123
-				if ( $add_class ) {
124
-					$replace_html = self::add_class( $replace_html, 'lazyload' );
123
+				if ($add_class) {
124
+					$replace_html = self::add_class($replace_html, 'lazyload');
125 125
 					$replace_html .= '<noscript>' . $img_html . '</noscript>';
126 126
 					
127
-					array_push( $search, $img_html );
128
-					array_push( $replace, $replace_html );
127
+					array_push($search, $img_html);
128
+					array_push($replace, $replace_html);
129 129
 				}
130 130
 			}
131 131
 		}
132 132
 
133
-		$content = str_replace( $search, $replace, $content );
134
-		$content = preg_replace_callback( '~' . chr(20) . '([0-9]+)' . chr(20) . '~', 'self::noscripts_restore', $content );
133
+		$content = str_replace($search, $replace, $content);
134
+		$content = preg_replace_callback('~' . chr(20) . '([0-9]+)' . chr(20) . '~', 'self::noscripts_restore', $content);
135 135
 		return $content;
136 136
 	}
137 137
 
138
-	static function noscripts_remove( $match ) {
138
+	static function noscripts_remove($match) {
139 139
 		self::$noscript_id++;
140 140
 		self::$noscripts[self::$noscript_id] = $match[0];
141 141
 		return chr(20) . self::$noscript_id . chr(20);
142 142
 	}
143 143
 
144
-	static function noscripts_restore( $match ) {
144
+	static function noscripts_restore($match) {
145 145
 		return self::$noscripts[(int) $match[1]];
146 146
 	}
147 147
 
148
-	static function add_class( $html_string = '', $new_class ) {
148
+	static function add_class($html_string = '', $new_class) {
149 149
 		$pattern = '/class=[\'"]([^\'"]*)[\'"]/';
150 150
 
151
-		if ( preg_match( $pattern, $html_string, $matches ) ) {
152
-			$defined_classes = explode( ' ', $matches[1] );
151
+		if (preg_match($pattern, $html_string, $matches)) {
152
+			$defined_classes = explode(' ', $matches[1]);
153 153
 
154
-			if ( ! in_array( $new_class, $defined_classes ) ) {
154
+			if ( ! in_array($new_class, $defined_classes)) {
155 155
 				$defined_classes[] = $new_class;
156 156
 
157 157
 				$html_string = str_replace(
158 158
 					$matches[0],
159
-					sprintf( 'class="%s"', implode( ' ', $defined_classes ) ),
159
+					sprintf('class="%s"', implode(' ', $defined_classes)),
160 160
 					$html_string
161 161
 				);
162 162
 			}
163 163
 		} else {
164
-			$html_string = preg_replace( '/(\<.+\s)/', sprintf( '$1class="%s" ', $new_class ), $html_string );
164
+			$html_string = preg_replace('/(\<.+\s)/', sprintf('$1class="%s" ', $new_class), $html_string);
165 165
 		}
166 166
 
167 167
 		return $html_string;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		return self::$enabled;
172 172
 	}
173 173
 
174
-	static function kses_allowed_html( $allowedtags, $context ) {
174
+	static function kses_allowed_html($allowedtags, $context) {
175 175
 		$allowedtags['noscript'] = array();
176 176
 		
177 177
 		$allowedtags['img']['data-src'] = true;
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 		return $allowedtags;
182 182
 	}
183 183
 
184
-	static function kses_allowed_protocols( $allowedprotocols ) {
184
+	static function kses_allowed_protocols($allowedprotocols) {
185 185
 		$allowedprotocols[] = 'data';
186 186
 		return $allowedprotocols;
187 187
 	}
188 188
 }
189 189
 
190
-add_action( 'init', array( 'LSX_LazyLoadImages', 'init' ) );
190
+add_action('init', array('LSX_LazyLoadImages', 'init'));
Please login to merge, or discard this patch.
inc/sanitize.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
  * @subpackage sanitize
98 98
  *
99 99
  * @param array $input
100
- * @return array $output
100
+ * @return string|false $output
101 101
  */
102 102
 function lsx_sanitize_checkbox( $input ) {
103 103
 	if ( $input ) {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
  * @param  mixed    $setting    The setting for which the sanitizing is occurring.
18 18
  * @return mixed                The sanitized value.
19 19
 */
20
-function lsx_sanitize_choices( $value, $setting ) {
21
-	if ( is_object( $setting ) ) {
20
+function lsx_sanitize_choices($value, $setting) {
21
+	if (is_object($setting)) {
22 22
 		$setting = $setting->id;
23 23
 	}
24
-	$choices = lsx_customizer_sanitize_get_choices( $setting );
25
-	$allowed_choices = array_keys( $choices );
26
-	if ( ! in_array( $value, $allowed_choices ) ) {
27
-		$value = lsx_customizer_sanitize_get_default( $setting );
24
+	$choices = lsx_customizer_sanitize_get_choices($setting);
25
+	$allowed_choices = array_keys($choices);
26
+	if ( ! in_array($value, $allowed_choices)) {
27
+		$value = lsx_customizer_sanitize_get_default($setting);
28 28
 	}
29 29
 	return $value;
30 30
 }
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
  * @return mixed $field
40 40
  */
41 41
 
42
-function lsx_customizer_sanitize_get_choices( $id ) {
42
+function lsx_customizer_sanitize_get_choices($id) {
43 43
 	global $lsx_customizer;
44 44
 	//LSX_Theme_Customizer
45 45
 	
46 46
 	$field = $lsx_customizer->get_control($id);
47 47
 	
48
-	if ( isset( $field['choices'] ) ) {
48
+	if (isset($field['choices'])) {
49 49
 		return $field['choices'];
50 50
 	}
51 51
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
  * @return mixed $default
62 62
  */
63 63
 
64
-function lsx_customizer_sanitize_get_default( $id ) {
64
+function lsx_customizer_sanitize_get_default($id) {
65 65
 	global $lsx_customizer;
66 66
 	//LSX_Theme_Customizer
67 67
 
68 68
 	$setting = $lsx_customizer->get_setting($id);
69 69
 
70
-	if ( isset( $setting['default'] ) ) {
70
+	if (isset($setting['default'])) {
71 71
 		return $setting['default'];
72 72
 	}
73 73
 }
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
  * @param obj $setting
83 83
  * @return string $default
84 84
  */
85
-function lsx_sanitize_email( $email, $setting ) {
85
+function lsx_sanitize_email($email, $setting) {
86 86
 	// Sanitize $input as a hex value without the hash prefix.
87
-	$email = sanitize_email( $email );
87
+	$email = sanitize_email($email);
88 88
 
89 89
 	// If $email is a valid email, return it; otherwise, return the default.
90
-	return ( ! is_null( $email ) ? $email : $setting->default );
90
+	return ( ! is_null($email) ? $email : $setting->default);
91 91
 }
92 92
 
93 93
 /**
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
  * @param array $input
100 100
  * @return array $output
101 101
  */
102
-function lsx_sanitize_checkbox( $input ) {
103
-	if ( $input ) {
102
+function lsx_sanitize_checkbox($input) {
103
+	if ($input) {
104 104
 		$output = '1';
105 105
 	} else {
106 106
 		$output = false;
Please login to merge, or discard this patch.
inc/template-tags.php 4 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@  discard block
 block discarded – undo
7 7
  * @author Novrian <[email protected]>
8 8
  * @copyright (c) 2013. Novrian Y.F.
9 9
  * @license MIT License
10
- * @param string $sep Your custom separator
11 10
  */
12 11
 function lsx_breadcrumbs() {
13 12
   if (!function_exists('yoast_breadcrumb') && !function_exists('woocommerce_breadcrumb')) {
@@ -262,7 +261,7 @@  discard block
 block discarded – undo
262 261
 	/**
263 262
 	 * Display navigation to next/previous set of posts when applicable.
264 263
 	 *
265
-	 * @return void
264
+	 * @return null|boolean
266 265
 	 */
267 266
 	function lsx_paging_nav() {
268 267
 		// Don't print empty markup if there's only one page.
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Yoast Breadcrumbs on Twitter Bootstrap
@@ -24,7 +27,7 @@  discard block
 block discarded – undo
24 27
   		woocommerce_breadcrumb();
25 28
   		$output = ob_get_clean();
26 29
   		$output = str_replace('woocommerce-breadcrumb', 'woocommerce-breadcrumb breadcrumbs-container', $output);
27
-  }elseif(function_exists('yoast_breadcrumb')){
30
+  } elseif(function_exists('yoast_breadcrumb')){
28 31
 	  	// Default Yoast Breadcrumbs Separator
29 32
 	  	$old_sep = '\&raquo\;';
30 33
 	  	
@@ -272,9 +275,9 @@  discard block
 block discarded – undo
272 275
 		
273 276
 		if(current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')){
274 277
 			return true;
275
-		}elseif(function_exists('wp_pagenavi')){
278
+		} elseif(function_exists('wp_pagenavi')){
276 279
 			wp_pagenavi();
277
-		}else{
280
+		} else{
278 281
 			
279 282
 			$labels = array(
280 283
 				'next' 		=> '<span class="meta-nav">&larr;</span> '.__( 'Older posts', 'lsx' ),
@@ -354,9 +357,9 @@  discard block
 block discarded – undo
354 357
 
355 358
 		if ( function_exists('has_custom_logo') && has_custom_logo() ) {
356 359
 			the_custom_logo();
357
-		}elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
360
+		} elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
358 361
 			jetpack_the_site_logo();
359
-		}else{
362
+		} else{
360 363
 			// shouldn't show both together.. its just strange
361 364
 			if(true == get_theme_mod('site_logo_header_text',1)){
362 365
 				lsx_site_title();
@@ -498,7 +501,7 @@  discard block
 block discarded – undo
498 501
 		$post_type_object = get_post_type_object($post_type);
499 502
 		if(null != $post_type_object){
500 503
 			$title = $post_type_object->labels->name;
501
-		}else{
504
+		} else{
502 505
 			$title = ucwords($post_type);
503 506
 		}
504 507
 		
@@ -640,8 +643,9 @@  discard block
 block discarded – undo
640 643
  * @category 	urls
641 644
  */
642 645
 function lsx_get_my_url() {
643
-	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
644
-		return false;
646
+	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) {
647
+			return false;
648
+	}
645 649
 
646 650
 	return esc_url_raw( $matches[1] );
647 651
 }
@@ -658,14 +662,14 @@  discard block
 block discarded – undo
658 662
 	$part = (string) $part;
659 663
 	if ( '' !== $part ){
660 664
 		$template = "{$slug}-{$part}.php";
661
-	}else{
665
+	} else{
662 666
 		$template = "{$slug}.php";
663 667
 	}
664 668
 	$file_path = apply_filters('lsx_content_path',false,$slug,$part);
665 669
 
666 670
 	if ( false !== $file_path && '' == locate_template( array( $template ) ) && file_exists( $file_path.$template) ) {
667 671
 		load_template( $file_path.$template, false );
668
-	}else{
672
+	} else{
669 673
 		get_template_part($slug,$part);
670 674
 	}
671 675
 }
672 676
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 function lsx_breadcrumbs() {
13 13
   if (!function_exists('yoast_breadcrumb') && !function_exists('woocommerce_breadcrumb')) {
14
-    return null;
14
+	return null;
15 15
   }
16 16
   
17 17
   $show_on_front = get_option('show_on_front');
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * Displays logo when applicable
69 69
 	 *
70 70
 	 * @return void
71
-	*/
71
+	 */
72 72
 	function lsx_site_title() {
73 73
 		?>
74 74
 			<div class="site-branding">
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		
463 463
 		//print_r(get_nav_menu_locations());
464 464
 
465
-	    if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?>
465
+		if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?>
466 466
 			<nav class="primary-navbar collapse navbar-collapse">
467 467
 		    	<?php
468 468
 				wp_nav_menu( array(
@@ -574,9 +574,9 @@  discard block
 block discarded – undo
574 574
 				if(null != $tag_cloud){
575 575
 					echo '<h2>' . esc_html( $taxonomy ) . '</h2>';
576 576
 					echo '<aside id="' . esc_attr( $taxonomy_id ) . '" class="widget widget_' . esc_attr( $taxonomy_id ) . '">' . esc_html( $tag_cloud ) . '</aside>';
577
-		        }
578
-	        }
579
-        } 
577
+				}
578
+			}
579
+		} 
580 580
 }
581 581
 
582 582
 /**
Please login to merge, or discard this patch.
Spacing   +166 added lines, -166 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Yoast Breadcrumbs on Twitter Bootstrap
@@ -10,21 +10,21 @@  discard block
 block discarded – undo
10 10
  * @param string $sep Your custom separator
11 11
  */
12 12
 function lsx_breadcrumbs() {
13
-  if (!function_exists('yoast_breadcrumb') && !function_exists('woocommerce_breadcrumb')) {
13
+  if ( ! function_exists('yoast_breadcrumb') && ! function_exists('woocommerce_breadcrumb')) {
14 14
     return null;
15 15
   }
16 16
   
17 17
   $show_on_front = get_option('show_on_front');
18
-  if ( ('posts' == $show_on_front && is_home()) || ('page' == $show_on_front && is_front_page()) ) {
18
+  if (('posts' == $show_on_front && is_home()) || ('page' == $show_on_front && is_front_page())) {
19 19
   	return;
20 20
   }
21 21
 
22
-  if(function_exists('woocommerce_breadcrumb')){
22
+  if (function_exists('woocommerce_breadcrumb')) {
23 23
   		ob_start();
24 24
   		woocommerce_breadcrumb();
25 25
   		$output = ob_get_clean();
26 26
   		$output = str_replace('woocommerce-breadcrumb', 'woocommerce-breadcrumb breadcrumbs-container', $output);
27
-  }elseif(function_exists('yoast_breadcrumb')){
27
+  }elseif (function_exists('yoast_breadcrumb')) {
28 28
 	  	// Default Yoast Breadcrumbs Separator
29 29
 	  	$old_sep = '\&raquo\;';
30 30
 	  	
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 	  	$output = '<div class="breadcrumbs-container">' . $output . '</div>';
43 43
   }
44 44
   
45
-  $output = apply_filters('lsx_breadcrumbs',$output);
45
+  $output = apply_filters('lsx_breadcrumbs', $output);
46 46
 
47
-  echo wp_kses_post( $output );
47
+  echo wp_kses_post($output);
48 48
 }
49
-add_action( 'lsx_content_top', 'lsx_breadcrumbs', 100 );
49
+add_action('lsx_content_top', 'lsx_breadcrumbs', 100);
50 50
 
51 51
 /**
52 52
  * Replaces the seperator with a blank space.
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 function lsx_breadcrumbs_seperator_filter($seperator) {
56 56
 	return '';
57 57
 }
58
-add_filter( 'wpseo_breadcrumb_separator', 'lsx_breadcrumbs_seperator_filter' );
58
+add_filter('wpseo_breadcrumb_separator', 'lsx_breadcrumbs_seperator_filter');
59 59
 
60 60
 /**
61 61
  * Custom template tags for this theme.
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  *
64 64
  * @package lsx
65 65
  */
66
-if ( ! function_exists( 'lsx_site_title' ) ) :
66
+if ( ! function_exists('lsx_site_title')) :
67 67
 	/**
68 68
 	 * Displays logo when applicable
69 69
 	 *
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	function lsx_site_title() {
73 73
 		?>
74 74
 			<div class="site-branding">
75
-				<h1 class="site-title"><a title="<?php bloginfo( 'name' ); ?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
76
-				<p class="site-description"><?php bloginfo( 'description' ); ?></p>
75
+				<h1 class="site-title"><a title="<?php bloginfo('name'); ?>" href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
76
+				<p class="site-description"><?php bloginfo('description'); ?></p>
77 77
 			</div>		
78 78
 		<?php 
79 79
 	}
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 /**
83 83
  * Add customisable post meta.
84 84
  */
85
-if ( ! function_exists( 'lsx_post_meta' ) ) {
85
+if ( ! function_exists('lsx_post_meta')) {
86 86
 	function lsx_post_meta() {
87
-		if ( ( is_page() && ! ( is_home() || is_front_page() ) ) && ! is_page_template( 'page-templates/template-blog.php' ) ) {
87
+		if ((is_page() && ! (is_home() || is_front_page())) && ! is_page_template('page-templates/template-blog.php')) {
88 88
 			return;
89 89
 		}
90 90
 		?>
@@ -99,83 +99,83 @@  discard block
 block discarded – undo
99 99
 /**
100 100
  * Add customisable post meta: post date
101 101
  */
102
-if ( ! function_exists( 'lsx_post_meta_date' ) ) {
102
+if ( ! function_exists('lsx_post_meta_date')) {
103 103
 	function lsx_post_meta_date() {
104 104
 		$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
105 105
 				
106
-		$time_string = sprintf( $time_string,
107
-			esc_attr( get_the_date( 'c' ) ),
106
+		$time_string = sprintf($time_string,
107
+			esc_attr(get_the_date('c')),
108 108
 			get_the_date(),
109
-			esc_attr( get_the_modified_date( 'c' ) ),
109
+			esc_attr(get_the_modified_date('c')),
110 110
 			get_the_modified_date()
111 111
 		);
112 112
 
113
-		printf( '<span class="post-meta-time"><span>%1$s</span> <a href="%2$s" rel="bookmark">%3$s</a></span>',
114
-			esc_html_x( 'Posted on:', 'Used before publish date.', 'lsx' ),
115
-			esc_url( get_permalink() ),
116
-			wp_kses_post( $time_string )
113
+		printf('<span class="post-meta-time"><span>%1$s</span> <a href="%2$s" rel="bookmark">%3$s</a></span>',
114
+			esc_html_x('Posted on:', 'Used before publish date.', 'lsx'),
115
+			esc_url(get_permalink()),
116
+			wp_kses_post($time_string)
117 117
 		);
118 118
 	}
119 119
 }
120
-add_action( 'lsx_content_post_meta', 'lsx_post_meta_date', 10 );
120
+add_action('lsx_content_post_meta', 'lsx_post_meta_date', 10);
121 121
 
122 122
 /**
123 123
  * Add customisable post meta: post author
124 124
  */
125
-if ( ! function_exists( 'lsx_post_meta_author' ) ) {
125
+if ( ! function_exists('lsx_post_meta_author')) {
126 126
 	function lsx_post_meta_author() {
127
-		printf( '<span class="post-meta-author"><span>%1$s</span> <a href="%2$s">%3$s</a></span>',
128
-			esc_html_x( 'Posted by:', 'Used before post author name.', 'lsx' ),
129
-			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
127
+		printf('<span class="post-meta-author"><span>%1$s</span> <a href="%2$s">%3$s</a></span>',
128
+			esc_html_x('Posted by:', 'Used before post author name.', 'lsx'),
129
+			esc_url(get_author_posts_url(get_the_author_meta('ID'))),
130 130
 			get_the_author()
131 131
 		);
132 132
 	}
133 133
 }
134
-add_action( 'lsx_content_post_meta', 'lsx_post_meta_author', 20 );
134
+add_action('lsx_content_post_meta', 'lsx_post_meta_author', 20);
135 135
 
136 136
 /**
137 137
  * Add customisable post meta: post category(ies)
138 138
  */
139
-if ( ! function_exists( 'lsx_post_meta_category' ) ) {
139
+if ( ! function_exists('lsx_post_meta_category')) {
140 140
 	function lsx_post_meta_category() {
141
-		$post_categories = wp_get_post_categories( get_the_ID() );
141
+		$post_categories = wp_get_post_categories(get_the_ID());
142 142
 		$cats = array();
143 143
 
144
-		foreach( $post_categories as $c ) {
145
-			$cat = get_category( $c );
146
-			$cats[] = '<a href="' . get_category_link( $cat->term_id ) . '" title="' . sprintf( esc_html__( 'View all posts in %s' , 'lsx' ), $cat->name ) . '" ' . '>' . $cat->name . '</a>';
144
+		foreach ($post_categories as $c) {
145
+			$cat = get_category($c);
146
+			$cats[] = '<a href="' . get_category_link($cat->term_id) . '" title="' . sprintf(esc_html__('View all posts in %s', 'lsx'), $cat->name) . '" ' . '>' . $cat->name . '</a>';
147 147
 		}
148 148
 
149
-		if ( ! empty( $cats ) ) {
149
+		if ( ! empty($cats)) {
150 150
 			?>
151
-			<span class="post-meta-categories"><span><?php esc_html_e( 'Posted in:', 'lsx' ); ?></span> <?php echo wp_kses_post( implode( ', ', $cats ) ); ?></span>
151
+			<span class="post-meta-categories"><span><?php esc_html_e('Posted in:', 'lsx'); ?></span> <?php echo wp_kses_post(implode(', ', $cats)); ?></span>
152 152
 			<?php
153 153
 		}
154 154
 	}
155 155
 }
156
-add_action( 'lsx_content_post_meta', 'lsx_post_meta_category', 30 );
156
+add_action('lsx_content_post_meta', 'lsx_post_meta_category', 30);
157 157
 
158 158
 /**
159 159
  * Add customisable post meta: post tag(s)
160 160
  */
161
-if ( ! function_exists( 'lsx_post_tags' ) ) {
161
+if ( ! function_exists('lsx_post_tags')) {
162 162
 	function lsx_post_tags() {
163
-		if ( has_tag() ) :
163
+		if (has_tag()) :
164 164
 			?>
165 165
 			<div class="post-tags">
166
-				<span><?php esc_html_e( 'Tagged as:', 'lsx' ); ?></span> <?php echo wp_kses_post( get_the_tag_list( '' ) ); ?>
166
+				<span><?php esc_html_e('Tagged as:', 'lsx'); ?></span> <?php echo wp_kses_post(get_the_tag_list('')); ?>
167 167
 			</div>
168 168
 			<?php
169 169
 		endif;
170 170
 	}
171 171
 }
172
-add_action( 'lsx_content_post_tags', 'lsx_post_tags', 10 );
172
+add_action('lsx_content_post_tags', 'lsx_post_tags', 10);
173 173
 
174 174
 /**
175 175
  * Add customisable post info: related posts
176 176
  */
177 177
 function lsx_related_posts() {
178
-	if ( is_singular( 'post' ) && class_exists( 'Jetpack_RelatedPosts' ) ) {
178
+	if (is_singular('post') && class_exists('Jetpack_RelatedPosts')) {
179 179
 		?>
180 180
 			<div class="row row-related-posts">
181 181
 				<div class="col-md-12">
@@ -185,15 +185,15 @@  discard block
 block discarded – undo
185 185
 		<?php
186 186
 	}
187 187
 }
188
-add_action( 'lsx_entry_bottom', 'lsx_related_posts', 10 );
188
+add_action('lsx_entry_bottom', 'lsx_related_posts', 10);
189 189
 
190 190
 /**
191 191
  * Translate post format to Font Awesome class
192 192
  */
193 193
 
194
-if ( ! function_exists( 'lsx_translate_format_to_fontawesome' ) ) {
195
-	function lsx_translate_format_to_fontawesome( $format ) {
196
-		switch ( $format ) {
194
+if ( ! function_exists('lsx_translate_format_to_fontawesome')) {
195
+	function lsx_translate_format_to_fontawesome($format) {
196
+		switch ($format) {
197 197
 			case 'image':
198 198
 				$format = 'camera';
199 199
 				break;
@@ -238,45 +238,45 @@  discard block
 block discarded – undo
238 238
  * to be added/modified where necessary.
239 239
  */
240 240
 
241
-if ( ! function_exists( 'lsx_portfolio_meta' ) ) {
241
+if ( ! function_exists('lsx_portfolio_meta')) {
242 242
 	function lsx_portfolio_meta() {
243 243
 		?>
244 244
 		<div id="portfolio-meta" class="portfolio-meta info-box-sticky info-box sticky-wrapper">
245 245
 			<?php 
246
-				$client = get_post_meta(get_the_ID(),'lsx-client',true);
247
-				if(false != $client){ ?>
246
+				$client = get_post_meta(get_the_ID(), 'lsx-client', true);
247
+				if (false != $client) { ?>
248 248
 					<div class="portfolio-client">
249
-						<span><span class="fa fa-user"></span><?php esc_html_e( 'Client','lsx' ); ?></span>
250
-						<span><?php echo esc_html( $client ); ?></span>
249
+						<span><span class="fa fa-user"></span><?php esc_html_e('Client', 'lsx'); ?></span>
250
+						<span><?php echo esc_html($client); ?></span>
251 251
 					</div>				
252 252
 			<?php }	?>
253 253
 
254 254
 			<?php 
255
-				$portfolio_type = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', ', ', '' );
255
+				$portfolio_type = get_the_term_list(get_the_ID(), 'jetpack-portfolio-type', '', ', ', '');
256 256
 				
257
-				if($portfolio_type){
257
+				if ($portfolio_type) {
258 258
 					?>
259 259
 					<div class="portfolio-industry">
260
-						<span><span class="fa fa-folder-open"></span><?php esc_html_e( 'Industry', 'lsx' ); ?></span>
261
-						<?php echo wp_kses_post( $portfolio_type ); ?>
260
+						<span><span class="fa fa-folder-open"></span><?php esc_html_e('Industry', 'lsx'); ?></span>
261
+						<?php echo wp_kses_post($portfolio_type); ?>
262 262
 					</div>			
263 263
 			<?php } ?>
264 264
 
265 265
 			<?php 
266
-				$services = get_the_term_list( get_the_ID(), 'jetpack-portfolio-tag', '', ', ', '' );
267
-				if(false != $services){ ?>
266
+				$services = get_the_term_list(get_the_ID(), 'jetpack-portfolio-tag', '', ', ', '');
267
+				if (false != $services) { ?>
268 268
 					<div class="portfolio-services">
269
-						<span><span class="fa fa-cog"></span><?php esc_html_e( 'Services', 'lsx' ); ?></span>
270
-						<?php echo wp_kses_post( $services ); ?>
269
+						<span><span class="fa fa-cog"></span><?php esc_html_e('Services', 'lsx'); ?></span>
270
+						<?php echo wp_kses_post($services); ?>
271 271
 					</div>				
272 272
 			<?php }	?>
273 273
 
274 274
 			<?php 
275
-				$website = esc_url( get_post_meta(get_the_ID(),'lsx-website',true) );
276
-				if(false != $website){ ?>
275
+				$website = esc_url(get_post_meta(get_the_ID(), 'lsx-website', true));
276
+				if (false != $website) { ?>
277 277
 					<div class="portfolio-website">
278
-						<span><span class="fa fa-link"></span><?php esc_html_e( 'Website', 'lsx' ); ?></span>
279
-						<a target="_blank" href="<?php echo esc_url( $website ); ?>"><?php echo esc_html( $website ) ?></a>
278
+						<span><span class="fa fa-link"></span><?php esc_html_e('Website', 'lsx'); ?></span>
279
+						<a target="_blank" href="<?php echo esc_url($website); ?>"><?php echo esc_html($website) ?></a>
280 280
 					</div>				
281 281
 			<?php }	?>
282 282
 
@@ -290,29 +290,29 @@  discard block
 block discarded – undo
290 290
  *
291 291
  */
292 292
 
293
-if ( ! function_exists( 'lsx_portfolio_gallery' ) ) {
293
+if ( ! function_exists('lsx_portfolio_gallery')) {
294 294
 	function lsx_portfolio_gallery() {
295 295
 
296
-		$media = get_attached_media( 'image' );
296
+		$media = get_attached_media('image');
297 297
 		$media_array = array();
298 298
 		$post_thumbnail_id = get_post_thumbnail_id(get_the_ID());
299 299
 		
300
-		if(!empty($media)){
301
-			foreach($media as $media_item){
302
-				if($post_thumbnail_id != $media_item->ID) {
300
+		if ( ! empty($media)) {
301
+			foreach ($media as $media_item) {
302
+				if ($post_thumbnail_id != $media_item->ID) {
303 303
 					$media_array[] = $media_item->ID;
304 304
 				}
305 305
 			}
306 306
 				
307
-			if(!empty($media_array)){
308
-				echo wp_kses_post( gallery_shortcode( array( 'size' => 'full', 'ids' => implode( ',', $media_array ) ) ) );
307
+			if ( ! empty($media_array)) {
308
+				echo wp_kses_post(gallery_shortcode(array('size' => 'full', 'ids' => implode(',', $media_array))));
309 309
 			}
310 310
 		}
311 311
 		
312 312
 	}
313 313
 }
314 314
 
315
-if ( ! function_exists( 'lsx_paging_nav' ) ) :
315
+if ( ! function_exists('lsx_paging_nav')) :
316 316
 	/**
317 317
 	 * Display navigation to next/previous set of posts when applicable.
318 318
 	 *
@@ -320,33 +320,33 @@  discard block
 block discarded – undo
320 320
 	 */
321 321
 	function lsx_paging_nav() {
322 322
 		// Don't print empty markup if there's only one page.
323
-		if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
323
+		if ($GLOBALS['wp_query']->max_num_pages < 2) {
324 324
 			return;
325 325
 		}
326 326
 		
327
-		if(current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')){
327
+		if (current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')) {
328 328
 			return true;
329
-		}elseif(function_exists('wp_pagenavi')){
329
+		}elseif (function_exists('wp_pagenavi')) {
330 330
 			wp_pagenavi();
331
-		}else{
331
+		} else {
332 332
 			
333 333
 			$labels = array(
334
-				'next' 		=> '<span class="meta-nav">&larr;</span> '.esc_html__( 'Older posts', 'lsx' ),
335
-				'previous' 	=> esc_html__( 'Newer posts', 'lsx' ).' <span class="meta-nav">&rarr;</span>',
336
-				'title' 	=> esc_html__( 'Posts navigation', 'lsx' )
334
+				'next' 		=> '<span class="meta-nav">&larr;</span> ' . esc_html__('Older posts', 'lsx'),
335
+				'previous' 	=> esc_html__('Newer posts', 'lsx') . ' <span class="meta-nav">&rarr;</span>',
336
+				'title' 	=> esc_html__('Posts navigation', 'lsx')
337 337
 			);
338
-			$labels = apply_filters('lsx_post_navigation_labels',$labels);
338
+			$labels = apply_filters('lsx_post_navigation_labels', $labels);
339 339
 			?>
340 340
 			<nav class="navigation paging-navigation" role="navigation">
341 341
 				<div class="lsx-breaker"></div>
342
-				<h1 class="screen-reader-text"><?php echo esc_html( $labels['title'] ); ?></h1>
342
+				<h1 class="screen-reader-text"><?php echo esc_html($labels['title']); ?></h1>
343 343
 				<div class="nav-links">
344
-					<?php if ( get_next_posts_link() ) : ?>
345
-					<div class="nav-previous"><?php next_posts_link( $labels['next'] ); ?></div>
344
+					<?php if (get_next_posts_link()) : ?>
345
+					<div class="nav-previous"><?php next_posts_link($labels['next']); ?></div>
346 346
 					<?php endif; ?>
347 347
 		
348
-					<?php if ( get_previous_posts_link() ) : ?>
349
-					<div class="nav-next"><?php previous_posts_link( $labels['previous'] ); ?></div>
348
+					<?php if (get_previous_posts_link()) : ?>
349
+					<div class="nav-next"><?php previous_posts_link($labels['previous']); ?></div>
350 350
 					<?php endif; ?>
351 351
 					
352 352
 					<div class="clearfix"></div>
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 	}
358 358
 endif;
359 359
 
360
-if ( ! function_exists( 'lsx_post_nav' ) ) :
360
+if ( ! function_exists('lsx_post_nav')) :
361 361
 /**
362 362
  * Display navigation to next/previous post when applicable.
363 363
  *
@@ -365,10 +365,10 @@  discard block
 block discarded – undo
365 365
  */
366 366
 function lsx_post_nav() {
367 367
 	// Don't print empty markup if there's nowhere to navigate.
368
-	$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
369
-	$next     = get_adjacent_post( false, '', false );
368
+	$previous = (is_attachment()) ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
369
+	$next     = get_adjacent_post(false, '', false);
370 370
 
371
-	if ( ! $next && ! $previous ) {
371
+	if ( ! $next && ! $previous) {
372 372
 		return;
373 373
 	}
374 374
 	?>
@@ -378,14 +378,14 @@  discard block
 block discarded – undo
378 378
 		<div class="nav-links pager row">
379 379
 
380 380
 			<?php
381
-				$previous_post = get_previous_post_link( '%link', '<div class="previous col-md-6"><p class="nav-links-description">'._x( 'Previous Post', 'Previous post link', 'lsx' ).'</p><h3>%title</h3></div>' );
382
-				$previous_post = str_replace('<a','<a',$previous_post);
383
-				echo wp_kses_post( $previous_post );
381
+				$previous_post = get_previous_post_link('%link', '<div class="previous col-md-6"><p class="nav-links-description">' . _x('Previous Post', 'Previous post link', 'lsx') . '</p><h3>%title</h3></div>');
382
+				$previous_post = str_replace('<a', '<a', $previous_post);
383
+				echo wp_kses_post($previous_post);
384 384
 			?>
385 385
 			<?php
386
-				$next_post = get_next_post_link( '%link', '<div class="next col-md-6"><p class="nav-links-description">'._x( 'Next Post', 'Next post link', 'lsx' ).'</p><h3>%title</h3></div>' );
387
-				$next_post = str_replace('<a','<a',$next_post);
388
-				echo wp_kses_post( $next_post );
386
+				$next_post = get_next_post_link('%link', '<div class="next col-md-6"><p class="nav-links-description">' . _x('Next Post', 'Next post link', 'lsx') . '</p><h3>%title</h3></div>');
387
+				$next_post = str_replace('<a', '<a', $next_post);
388
+				echo wp_kses_post($next_post);
389 389
 			?>
390 390
 
391 391
 		</div><!-- .nav-links -->
@@ -401,16 +401,16 @@  discard block
 block discarded – undo
401 401
  * @subpackage	template-tags
402 402
  * @category	header
403 403
  */
404
-if(!function_exists('lsx_site_identity')){
405
-	function lsx_site_identity(){
404
+if ( ! function_exists('lsx_site_identity')) {
405
+	function lsx_site_identity() {
406 406
 
407
-		if ( function_exists('has_custom_logo') && has_custom_logo() ) {
407
+		if (function_exists('has_custom_logo') && has_custom_logo()) {
408 408
 			the_custom_logo();
409
-		}elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
409
+		}elseif (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
410 410
 			jetpack_the_site_logo();
411
-		}else{
411
+		} else {
412 412
 			// shouldn't show both together.. its just strange
413
-			if(true == get_theme_mod('site_logo_header_text',1)){
413
+			if (true == get_theme_mod('site_logo_header_text', 1)) {
414 414
 				lsx_site_title();
415 415
 			}
416 416
 		}
@@ -425,29 +425,29 @@  discard block
 block discarded – undo
425 425
  * @subpackage	template-tags
426 426
  * @category	navigation
427 427
  */
428
-if(!function_exists('lsx_navbar_header')){
429
-	function lsx_navbar_header(){ ?>
428
+if ( ! function_exists('lsx_navbar_header')) {
429
+	function lsx_navbar_header() { ?>
430 430
 	   	<div class="navbar-header" itemscope itemtype="http://schema.org/WebPage">
431 431
 	   	
432 432
 	   		<?php 
433
-	   		$nav_menu = get_theme_mod('nav_menu_locations',false);
433
+	   		$nav_menu = get_theme_mod('nav_menu_locations', false);
434 434
 			//print_r(get_nav_menu_locations());
435 435
 
436
-	   		if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?>
436
+	   		if (false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']) { ?>
437 437
 		   		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".primary-navbar">
438
-		        	<span class="sr-only"><?php esc_html_e( 'Toggle navigation', 'lsx' ); ?></span>
438
+		        	<span class="sr-only"><?php esc_html_e('Toggle navigation', 'lsx'); ?></span>
439 439
 		        	<span class="icon-bar"></span>
440 440
 		        	<span class="icon-bar"></span>
441 441
 		        	<span class="icon-bar"></span>
442 442
 		   		</button>
443
-	   			<span class="mobile-menu-title"><?php esc_html_e( 'Menu', 'lsx' ); ?></span>
443
+	   			<span class="mobile-menu-title"><?php esc_html_e('Menu', 'lsx'); ?></span>
444 444
 	   		<?php } ?>
445 445
 			<?php lsx_site_identity(); ?>
446 446
 	    </div>
447 447
 	<?php }
448 448
 }
449 449
 //the if statement is for backwards compatability with previous versions of the theme.
450
-add_action('lsx_nav_before','lsx_navbar_header');
450
+add_action('lsx_nav_before', 'lsx_navbar_header');
451 451
 
452 452
 /**
453 453
  * Outputs the Nav Menu
@@ -456,16 +456,16 @@  discard block
 block discarded – undo
456 456
  * @subpackage	template-tags
457 457
  * @category	navigation
458 458
  */
459
-if(!function_exists('lsx_nav_menu')){
460
-	function lsx_nav_menu(){
461
-		$nav_menu = get_theme_mod('nav_menu_locations',false);
459
+if ( ! function_exists('lsx_nav_menu')) {
460
+	function lsx_nav_menu() {
461
+		$nav_menu = get_theme_mod('nav_menu_locations', false);
462 462
 		
463 463
 		//print_r(get_nav_menu_locations());
464 464
 
465
-	    if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?>
465
+	    if (false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']) { ?>
466 466
 			<nav class="primary-navbar collapse navbar-collapse">
467 467
 		    	<?php
468
-				wp_nav_menu( array(
468
+				wp_nav_menu(array(
469 469
 					'theme_location' => 'primary',
470 470
 					'menu' => $nav_menu['primary'],
471 471
 					'depth' => 3,
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
  * @subpackage	template-tags
487 487
  * @category	sitemap
488 488
  */
489
-function lsx_sitemap_pages(){
489
+function lsx_sitemap_pages() {
490 490
 	$page_args = array(
491 491
 		'post_type'		=>	'page',
492 492
 		'posts_per_page'=>	99,
@@ -494,13 +494,13 @@  discard block
 block discarded – undo
494 494
 		'post_type'		=>	'page',
495 495
 	);
496 496
 	$pages = new WP_Query($page_args);
497
-	if($pages->have_posts()){
497
+	if ($pages->have_posts()) {
498 498
 
499
-		echo '<h2>' . esc_html__( 'Pages', 'lsx' ) . '</h2>';
499
+		echo '<h2>' . esc_html__('Pages', 'lsx') . '</h2>';
500 500
 
501 501
 		echo '<ul>';
502
-		while($pages->have_posts()){ $pages->the_post();
503
-			echo '<li class="page_item page-item-' . esc_attr( get_the_ID() ) . '"><a href="' . esc_url( get_permalink() ) . '" title="">' . get_the_title() . '</a></li>';
502
+		while ($pages->have_posts()) { $pages->the_post();
503
+			echo '<li class="page_item page-item-' . esc_attr(get_the_ID()) . '"><a href="' . esc_url(get_permalink()) . '" title="">' . get_the_title() . '</a></li>';
504 504
 		}
505 505
 		echo '</ul>';
506 506
 		
@@ -515,13 +515,13 @@  discard block
 block discarded – undo
515 515
  * @subpackage	template-tags
516 516
  * @category	sitemap
517 517
  */
518
-function lsx_sitemap_custom_post_type(){
518
+function lsx_sitemap_custom_post_type() {
519 519
 	$args = array(
520 520
 		'public'				=> true,
521 521
 		'_builtin' 				=> false
522 522
 	);
523
-	$post_types = get_post_types($args , 'names');
524
-	foreach($post_types as $post_type){	
523
+	$post_types = get_post_types($args, 'names');
524
+	foreach ($post_types as $post_type) {	
525 525
 
526 526
 		$post_type_args = array(
527 527
 			'post_type'		=>	'page',
@@ -532,19 +532,19 @@  discard block
 block discarded – undo
532 532
 		$post_type_items = new WP_Query($post_type_args);
533 533
 		
534 534
 		$post_type_object = get_post_type_object($post_type);
535
-		if(null != $post_type_object){
535
+		if (null != $post_type_object) {
536 536
 			$title = $post_type_object->labels->name;
537
-		}else{
537
+		} else {
538 538
 			$title = ucwords($post_type);
539 539
 		}
540 540
 		
541
-		if($post_type_items->have_posts()){
541
+		if ($post_type_items->have_posts()) {
542 542
 	
543
-			echo '<h2>' . esc_html( $title ) . '</h2>';
543
+			echo '<h2>' . esc_html($title) . '</h2>';
544 544
 	
545 545
 			echo '<ul>';
546
-			while($post_type_items->have_posts()){ $post_type_items->the_post();
547
-				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>';
546
+			while ($post_type_items->have_posts()) { $post_type_items->the_post();
547
+				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>';
548 548
 			}
549 549
 			echo '</ul>';
550 550
 	
@@ -560,20 +560,20 @@  discard block
 block discarded – undo
560 560
  * @subpackage	template-tags
561 561
  * @category	sitemap
562 562
  */
563
-function lsx_sitemap_taxonomy_clouds(){
563
+function lsx_sitemap_taxonomy_clouds() {
564 564
 
565
-		$taxonomy_args =  array(
565
+		$taxonomy_args = array(
566 566
 			'public'				=> true,
567 567
 			'_builtin' 				=> false
568 568
 		);
569 569
 		$taxonomies = get_taxonomies($taxonomy_args);
570
-		if(!empty($taxonomies)){
571
-			foreach($taxonomies as $taxonomy_id => $taxonomy) {
570
+		if ( ! empty($taxonomies)) {
571
+			foreach ($taxonomies as $taxonomy_id => $taxonomy) {
572 572
 
573
-				$tag_cloud = wp_tag_cloud(array('taxonomy'=>$taxonomy_id,'echo'=>false));
574
-				if(null != $tag_cloud){
575
-					echo '<h2>' . esc_html( $taxonomy ) . '</h2>';
576
-					echo '<aside id="' . esc_attr( $taxonomy_id ) . '" class="widget widget_' . esc_attr( $taxonomy_id ) . '">' . esc_html( $tag_cloud ) . '</aside>';
573
+				$tag_cloud = wp_tag_cloud(array('taxonomy'=>$taxonomy_id, 'echo'=>false));
574
+				if (null != $tag_cloud) {
575
+					echo '<h2>' . esc_html($taxonomy) . '</h2>';
576
+					echo '<aside id="' . esc_attr($taxonomy_id) . '" class="widget widget_' . esc_attr($taxonomy_id) . '">' . esc_html($tag_cloud) . '</aside>';
577 577
 		        }
578 578
 	        }
579 579
         } 
@@ -586,15 +586,15 @@  discard block
 block discarded – undo
586 586
  * @subpackage	hooks
587 587
  * @category	forms
588 588
  */
589
-add_action( 'lsx_footer_before', 'lsx_footer_subscription_cta', 10 );
589
+add_action('lsx_footer_before', 'lsx_footer_subscription_cta', 10);
590 590
 function lsx_footer_subscription_cta() {
591
-	if(!function_exists('lsx_is_form_enabled')){ return; }
591
+	if ( ! function_exists('lsx_is_form_enabled')) { return; }
592 592
 	$subscribe_form_id = lsx_is_form_enabled('subscribe');
593
-	if(false == $subscribe_form_id) { return; }
593
+	if (false == $subscribe_form_id) { return; }
594 594
 
595 595
 	//add Caldera Forms Fields Scripts
596
-	if( defined( 'CFCORE_VER' ) ){
597
-		wp_enqueue_script( 'cf-frontend-fields', CFCORE_URL . 'assets/js/fields.min.js', array('jquery'), CFCORE_VER );
596
+	if (defined('CFCORE_VER')) {
597
+		wp_enqueue_script('cf-frontend-fields', CFCORE_URL . 'assets/js/fields.min.js', array('jquery'), CFCORE_VER);
598 598
 	}
599 599
 
600 600
 	?>
@@ -602,8 +602,8 @@  discard block
 block discarded – undo
602 602
 		<div class="container">
603 603
 			<div class="row">
604 604
 				<div class="col-md-12">
605
-					<h2><?php esc_html_e( 'Subscribe to Our Newsletter', 'lsx' ); ?></h2>
606
-					<?php echo do_shortcode( '[caldera_form id="'.$subscribe_form_id.'"]' ); ?>
605
+					<h2><?php esc_html_e('Subscribe to Our Newsletter', 'lsx'); ?></h2>
606
+					<?php echo do_shortcode('[caldera_form id="' . $subscribe_form_id . '"]'); ?>
607 607
 				</div>
608 608
 			</div>
609 609
 		</div>
@@ -619,13 +619,13 @@  discard block
 block discarded – undo
619 619
  * @category	menu
620 620
  */
621 621
 function lsx_add_top_menu() {
622
-	if ( has_nav_menu( 'top-menu' ) || has_nav_menu(' top-menu-left' ) ) : ?>
622
+	if (has_nav_menu('top-menu') || has_nav_menu(' top-menu-left')) : ?>
623 623
 		<div id="top-menu" class="<?php lsx_top_menu_classes(); ?>">
624 624
 			<div class="container">
625
-				<?php if ( has_nav_menu( 'top-menu' ) ) : ?>
625
+				<?php if (has_nav_menu('top-menu')) : ?>
626 626
 					<nav class="top-menu">
627 627
 						<?php
628
-							wp_nav_menu( array(
628
+							wp_nav_menu(array(
629 629
 								'theme_location' => 'top-menu',
630 630
 								'walker' => new Lsx_Bootstrap_Navwalker())
631 631
 							);
@@ -633,10 +633,10 @@  discard block
 block discarded – undo
633 633
 					</nav>
634 634
 				<?php endif; ?>
635 635
 
636
-				<?php if ( has_nav_menu( 'top-menu-left' ) ) : ?>
636
+				<?php if (has_nav_menu('top-menu-left')) : ?>
637 637
 					<nav class="top-menu pull-left">
638 638
 						<?php
639
-							wp_nav_menu( array(
639
+							wp_nav_menu(array(
640 640
 								'theme_location' => 'top-menu-left',
641 641
 								'walker' => new Lsx_Bootstrap_Navwalker())
642 642
 							);
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
 		</div>
648 648
 	<?php endif;
649 649
 }
650
-add_action( 'lsx_header_top', 'lsx_add_top_menu' );
650
+add_action('lsx_header_top', 'lsx_add_top_menu');
651 651
 
652 652
 /**
653 653
  * Checks if a caldera form with your slug exists
@@ -656,24 +656,24 @@  discard block
 block discarded – undo
656 656
  * @subpackage	template-tag
657 657
  * @category 	forms
658 658
  */
659
-if ( class_exists('Caldera_Forms') && !function_exists( 'lsx_is_form_enabled' ) ) {
659
+if (class_exists('Caldera_Forms') && ! function_exists('lsx_is_form_enabled')) {
660 660
 	function lsx_is_form_enabled($slug = false) {
661
-		if(false == $slug){ return false; }
661
+		if (false == $slug) { return false; }
662 662
 	
663 663
 		$match = false;
664
-		$forms = get_option( '_caldera_forms' , false );
665
-		if(false !== $forms ) {
666
-			foreach($forms as $form_id=>$form_maybe){
667
-				if( trim(strtolower($slug)) == strtolower($form_maybe['name']) ){
664
+		$forms = get_option('_caldera_forms', false);
665
+		if (false !== $forms) {
666
+			foreach ($forms as $form_id=>$form_maybe) {
667
+				if (trim(strtolower($slug)) == strtolower($form_maybe['name'])) {
668 668
 					$match = $form_id;
669 669
 					break;
670 670
 				}
671 671
 			}
672 672
 		}
673
-		if( false === $match ){
674
-			$is_form = Caldera_Forms::get_form( strtolower( $slug ) );
675
-			if( !empty( $is_form ) ){
676
-				return strtolower( $slug );
673
+		if (false === $match) {
674
+			$is_form = Caldera_Forms::get_form(strtolower($slug));
675
+			if ( ! empty($is_form)) {
676
+				return strtolower($slug);
677 677
 			}
678 678
 		}
679 679
 	
@@ -689,10 +689,10 @@  discard block
 block discarded – undo
689 689
  * @category 	urls
690 690
  */
691 691
 function lsx_get_my_url() {
692
-	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
692
+	if ( ! preg_match('/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches))
693 693
 		return false;
694 694
 
695
-	return esc_url_raw( $matches[1] );
695
+	return esc_url_raw($matches[1]);
696 696
 }
697 697
 
698 698
 /**
@@ -702,19 +702,19 @@  discard block
 block discarded – undo
702 702
  * @subpackage 	extras
703 703
  * @category 	urls
704 704
  */
705
-function lsx_get_template_part($slug,$part) {
705
+function lsx_get_template_part($slug, $part) {
706 706
 	$template = array();
707 707
 	$part = (string) $part;
708
-	if ( '' !== $part ){
708
+	if ('' !== $part) {
709 709
 		$template = "{$slug}-{$part}.php";
710
-	}else{
710
+	} else {
711 711
 		$template = "{$slug}.php";
712 712
 	}
713
-	$file_path = apply_filters('lsx_content_path',false,$slug,$part);
713
+	$file_path = apply_filters('lsx_content_path', false, $slug, $part);
714 714
 
715
-	if ( false !== $file_path && '' == locate_template( array( $template ) ) && file_exists( $file_path.$template) ) {
716
-		load_template( $file_path.$template, false );
717
-	}else{
718
-		get_template_part($slug,$part);
715
+	if (false !== $file_path && '' == locate_template(array($template)) && file_exists($file_path . $template)) {
716
+		load_template($file_path . $template, false);
717
+	} else {
718
+		get_template_part($slug, $part);
719 719
 	}
720 720
 }
721 721
\ No newline at end of file
Please login to merge, or discard this patch.
header.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@
 block discarded – undo
60 60
 			    	<strong><?php _e( 'Get your Tourism Establishment Online', 'lsx' ); ?></strong>
61 61
 			    	
62 62
 			    	<?php 
63
-			    	if(is_singular('landing-page')){ 
64
-			    			$email_address = get_post_meta(get_the_ID(),'email_address',true);
65
-			    			if(false === $email_address){
63
+					if(is_singular('landing-page')){ 
64
+							$email_address = get_post_meta(get_the_ID(),'email_address',true);
65
+							if(false === $email_address){
66 66
 								$email_address = '[email protected]';
67 67
 							}
68
-			    	} ?>
68
+					} ?>
69 69
 			    	
70 70
 			    	<span class="email-address"><?php _e( 'Questions? Email Us: ', 'lsx' ); ?><a href="mailto:<?php echo $email_address; ?>"><?php echo $email_address; ?></a></span>
71 71
 			    </div>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 <html <?php language_attributes(); ?>>
13 13
 <head>
14 14
 <?php lsx_head_top(); ?>
15
-<meta charset="<?php bloginfo( 'charset' ); ?>">
15
+<meta charset="<?php bloginfo('charset'); ?>">
16 16
 <link rel="profile" href="http://gmpg.org/xfn/11">
17
-<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
17
+<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
18 18
 <?php lsx_head_bottom(); ?>
19 19
 <?php wp_head(); ?>
20 20
 </head>
21
-<body <?php body_class( 'lsx' ); ?>>
21
+<body <?php body_class('lsx'); ?>>
22 22
 <?php lsx_body_top(); ?>
23 23
 
24
-<?php if ( !is_singular('landing-page') ) { ?>
24
+<?php if ( ! is_singular('landing-page')) { ?>
25 25
 
26 26
 	<?php lsx_header_before(); ?>
27 27
 		 	<header class="<?php lsx_header_classes(); ?>">
@@ -57,17 +57,17 @@  discard block
 block discarded – undo
57 57
 			    </div>
58 58
 
59 59
 			    <div class="header-links">
60
-			    	<strong><?php esc_html_e( 'Get your Tourism Establishment Online', 'lsx' ); ?></strong>
60
+			    	<strong><?php esc_html_e('Get your Tourism Establishment Online', 'lsx'); ?></strong>
61 61
 			    	
62 62
 			    	<?php 
63
-			    	if(is_singular('landing-page')){ 
64
-			    			$email_address = get_post_meta(get_the_ID(),'email_address',true);
65
-			    			if(false === $email_address){
63
+			    	if (is_singular('landing-page')) { 
64
+			    			$email_address = get_post_meta(get_the_ID(), 'email_address', true);
65
+			    			if (false === $email_address) {
66 66
 								$email_address = '[email protected]';
67 67
 							}
68 68
 			    	} ?>
69 69
 			    	
70
-			    	<span class="email-address"><?php esc_html_e( 'Questions? Email Us: ', 'lsx' ); ?><a href="mailto:<?php echo esc_attr( $email_address ); ?>"><?php echo esc_html( $email_address ); ?></a></span>
70
+			    	<span class="email-address"><?php esc_html_e('Questions? Email Us: ', 'lsx'); ?><a href="mailto:<?php echo esc_attr($email_address); ?>"><?php echo esc_html($email_address); ?></a></span>
71 71
 			    </div>
72 72
 		  	</div>
73 73
 
Please login to merge, or discard this patch.
single-jetpack-portfolio.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@
 block discarded – undo
21 21
 
22 22
 			<?php lsx_content_top(); ?>
23 23
 			
24
-			<?php while ( have_posts() ) : the_post(); ?>
24
+			<?php while (have_posts()) : the_post(); ?>
25 25
 
26
-				<?php get_template_part( 'content', 'portfolio-single' ); ?>
26
+				<?php get_template_part('content', 'portfolio-single'); ?>
27 27
 
28 28
 			<?php endwhile; ?>
29 29
 
Please login to merge, or discard this patch.
sidebar.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 		
23 23
 		if('posts' == $show_on_front && is_home()){
24 24
 			$sidebar = 'home';
25
-		}else{
25
+		} else{
26 26
 			$sidebar = 'sidebar-1';
27 27
 		}
28 28
 	}
@@ -38,9 +38,12 @@  discard block
 block discarded – undo
38 38
 	
39 39
 		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
40 40
 		
41
-	<?php else : ?>
41
+	<?php else {
42
+	: ?>
42 43
 	
43
-		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
44
+		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class());
45
+}
46
+?>" role="complementary">
44 47
 		
45 48
 	<?php endif ; ?>
46 49
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 // Allow Plugins and themes to disable the sidebar incase of very customized layouts.
9
-$sidebar_enabled = apply_filters('lsx_sidebar_enable',true);
10
-if(true !== $sidebar_enabled){return true;}
9
+$sidebar_enabled = apply_filters('lsx_sidebar_enable', true);
10
+if (true !== $sidebar_enabled) {return true; }
11 11
 ?>
12 12
 <?php
13 13
 	$show_on_front = get_option('show_on_front');
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 		$sidebar = 'home';
18 18
 	} else {
19 19
 
20
-		$layout = get_theme_mod('lsx_layout','2cr');
21
-		$layout = apply_filters( 'lsx_layout', $layout );
20
+		$layout = get_theme_mod('lsx_layout', '2cr');
21
+		$layout = apply_filters('lsx_layout', $layout);
22 22
 		
23
-		if('posts' == $show_on_front && is_home()){
23
+		if ('posts' == $show_on_front && is_home()) {
24 24
 			$sidebar = 'home';
25
-		}else{
25
+		} else {
26 26
 			$sidebar = 'sidebar-1';
27 27
 		}
28 28
 	}
29
-	if ( '1c' !== $layout ) : ?>
29
+	if ('1c' !== $layout) : ?>
30 30
 
31 31
 	<?php lsx_sidebars_before(); ?>
32 32
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	
35 35
 		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_home_sidebar_class()); ?>" role="complementary">
36 36
 		
37
-	<?php elseif ( is_page_template('page-templates/template-blog.php') ) : ?>
37
+	<?php elseif (is_page_template('page-templates/template-blog.php')) : ?>
38 38
 	
39 39
 		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
40 40
 		
@@ -42,25 +42,25 @@  discard block
 block discarded – undo
42 42
 	
43 43
 		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
44 44
 		
45
-	<?php endif ; ?>
45
+	<?php endif; ?>
46 46
 
47 47
 		<?php lsx_sidebar_top(); ?>
48 48
 
49
-		<?php if ( ! dynamic_sidebar( $sidebar ) ) : ?>
49
+		<?php if ( ! dynamic_sidebar($sidebar)) : ?>
50 50
 
51 51
 			<aside id="search" class="widget widget_search">
52 52
 				<?php get_search_form(); ?>
53 53
 			</aside>
54 54
 
55 55
 			<aside id="archives" class="widget">
56
-				<h1 class="widget-title"><?php esc_attr_e( 'Archives', 'lsx' ); ?></h1>
56
+				<h1 class="widget-title"><?php esc_attr_e('Archives', 'lsx'); ?></h1>
57 57
 				<ul>
58
-					<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
58
+					<?php wp_get_archives(array('type' => 'monthly')); ?>
59 59
 				</ul>
60 60
 			</aside>
61 61
 
62 62
 			<aside id="meta" class="widget">
63
-				<h1 class="widget-title"><?php esc_attr_e( 'Meta', 'lsx' ); ?></h1>
63
+				<h1 class="widget-title"><?php esc_attr_e('Meta', 'lsx'); ?></h1>
64 64
 				<ul>
65 65
 					<?php wp_register(); ?>
66 66
 					<li><?php wp_loginout(); ?></li>
Please login to merge, or discard this patch.
sidebar-sitemap.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 	$layout = get_theme_mod('lsx_layout','2cr');
13 13
 	if('posts' == $show_on_front && is_home()){
14 14
 		$sidebar = 'home';
15
-	}else{
15
+	} else{
16 16
 		$sidebar = 'sidebar-1';
17 17
 	}
18 18
 	
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@
 block discarded – undo
9 9
 <?php
10 10
 	$show_on_front = get_option('show_on_front');
11 11
 
12
-	$layout = get_theme_mod('lsx_layout','2cr');
13
-	if('posts' == $show_on_front && is_home()){
12
+	$layout = get_theme_mod('lsx_layout', '2cr');
13
+	if ('posts' == $show_on_front && is_home()) {
14 14
 		$sidebar = 'home';
15
-	}else{
15
+	} else {
16 16
 		$sidebar = 'sidebar-1';
17 17
 	}
18 18
 	
19
-	if ( '1c' !== $layout ) : ?>
19
+	if ('1c' !== $layout) : ?>
20 20
 
21 21
 	<?php lsx_sidebars_before(); ?>
22 22
 
23 23
 	<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
24 24
 
25 25
 		<?php lsx_sidebar_top(); ?>
26
-		<h2><?php esc_attr_e( 'Categories', 'lsx' ); ?></h2>
26
+		<h2><?php esc_attr_e('Categories', 'lsx'); ?></h2>
27 27
         <aside id="categories" class="widget widget_categories">
28 28
         	<?php echo wp_tag_cloud(array('taxonomy'=>'category')); ?>
29 29
         </aside>		
Please login to merge, or discard this patch.