Completed
Push — master ( 1ca606...3ee43f )
by
unknown
03:22
created
inc/jetpack.php 1 patch
Braces   +14 added lines, -13 removed lines patch added patch discarded remove patch
@@ -221,13 +221,15 @@  discard block
 block discarded – undo
221 221
 
222 222
 
223 223
 	if ( (!isset( $_POST['lsx_website_nonce'] ) || !wp_verify_nonce( $_POST['lsx_website_nonce'], basename( __FILE__ ) ))
224
-	|| (!isset( $_POST['lsx_client_nonce'] ) || !wp_verify_nonce( $_POST['lsx_client_nonce'], basename( __FILE__ ) )) )
225
-		return $post_id;
224
+	|| (!isset( $_POST['lsx_client_nonce'] ) || !wp_verify_nonce( $_POST['lsx_client_nonce'], basename( __FILE__ ) )) ) {
225
+			return $post_id;
226
+	}
226 227
 
227 228
 	$post_type = get_post_type_object( $post->post_type );
228 229
 
229
-	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
230
-		return $post_id;
230
+	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {
231
+			return $post_id;
232
+	}
231 233
 
232 234
 
233 235
 	$meta_keys = array('lsx-website','lsx-client');
@@ -238,14 +240,13 @@  discard block
 block discarded – undo
238 240
 
239 241
 		$meta_value = get_post_meta( $post_id, $meta_key, true );
240 242
 
241
-		if ( $new_meta_value && '' == $meta_value )
242
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
243
-
244
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
245
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
246
-
247
-		elseif ( '' == $new_meta_value && $meta_value )
248
-		delete_post_meta( $post_id, $meta_key, $meta_value );
243
+		if ( $new_meta_value && '' == $meta_value ) {
244
+					add_post_meta( $post_id, $meta_key, $new_meta_value, true );
245
+		} elseif ( $new_meta_value && $new_meta_value != $meta_value ) {
246
+				update_post_meta( $post_id, $meta_key, $new_meta_value );
247
+		} elseif ( '' == $new_meta_value && $meta_value ) {
248
+				delete_post_meta( $post_id, $meta_key, $meta_value );
249
+		}
249 250
 
250 251
 	}
251 252
 }
@@ -398,7 +399,7 @@  discard block
 block discarded – undo
398 399
 		
399 400
 		if('jetpack-portfolio' == get_post_type()){
400 401
 			get_template_part( 'content', 'portfolio' );
401
-		}else{
402
+		} else{
402 403
 			get_template_part( 'content', get_post_type() );
403 404
 		}
404 405
 	}
Please login to merge, or discard this patch.
inc/lazyload.php 1 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.
inc/comment-walker.php 1 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
  * lsx Comment Walker
@@ -67,7 +70,7 @@  discard block
 block discarded – undo
67 70
 	foreach($fields as &$field){
68 71
 		if(stristr('class=', $field)){
69 72
 			$field = str_replace('class="', 'class="form-control ', $field);
70
-		}else{
73
+		} else{
71 74
 			$field = str_replace('<input', '<input class="form-control" ', $field);
72 75
 		}
73 76
 	}
Please login to merge, or discard this patch.
inc/template-tags.php 1 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.
inc/extras.php 1 patch
Braces   +30 added lines, -17 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
@@ -204,10 +207,10 @@  discard block
 block discarded – undo
204 207
 	if(false === $image_src){
205 208
 		$post_id = get_the_ID(); 
206 209
 		$post_thumbnail_id = get_post_thumbnail_id( $post_id );
207
-	}elseif(false != $image_src	){
210
+	} elseif(false != $image_src	){
208 211
 		if(is_numeric($image_src)){
209 212
 			$post_thumbnail_id = $image_src;
210
-		}else{
213
+		} else{
211 214
 			$post_thumbnail_id = lsx_get_attachment_id_from_src($image_src);
212 215
 		}
213 216
 	}
@@ -217,7 +220,7 @@  discard block
 block discarded – undo
217 220
 		$srcset = false;
218 221
 		$img = wp_get_attachment_image_src($post_thumbnail_id,$size);
219 222
 		$img = $img[0];
220
-	}else{
223
+	} else{
221 224
 		$srcset = true;
222 225
 		$img = wp_get_attachment_image_srcset($post_thumbnail_id,$size);
223 226
 		if($img == false) {
@@ -327,18 +330,29 @@  discard block
 block discarded – undo
327 330
  */
328 331
 function mv_browser_body_class($classes) {
329 332
         global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
330
-        if($is_lynx) $classes[] = 'lynx';
331
-        elseif($is_gecko) $classes[] = 'gecko';
332
-        elseif($is_opera) $classes[] = 'opera';
333
-        elseif($is_NS4) $classes[] = 'ns4';
334
-        elseif($is_safari) $classes[] = 'safari';
335
-        elseif($is_chrome) $classes[] = 'chrome';
336
-        elseif($is_IE) {
333
+        if($is_lynx) {
334
+        	$classes[] = 'lynx';
335
+        } elseif($is_gecko) {
336
+        	$classes[] = 'gecko';
337
+        } elseif($is_opera) {
338
+        	$classes[] = 'opera';
339
+        } elseif($is_NS4) {
340
+        	$classes[] = 'ns4';
341
+        } elseif($is_safari) {
342
+        	$classes[] = 'safari';
343
+        } elseif($is_chrome) {
344
+        	$classes[] = 'chrome';
345
+        } elseif($is_IE) {
337 346
                 $classes[] = 'ie';
338
-                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $browser_version))
339
-                $classes[] = 'ie'.$browser_version[1];
340
-        } else $classes[] = 'unknown';
341
-        if($is_iphone) $classes[] = 'iphone';
347
+                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $browser_version)) {
348
+                                $classes[] = 'ie'.$browser_version[1];
349
+                }
350
+        } else {
351
+        	$classes[] = 'unknown';
352
+        }
353
+        if($is_iphone) {
354
+        	$classes[] = 'iphone';
355
+        }
342 356
         if ( stristr( $_SERVER['HTTP_USER_AGENT'],"mac") ) {
343 357
                  $classes[] = 'osx';
344 358
            } elseif ( stristr( $_SERVER['HTTP_USER_AGENT'],"linux") ) {
@@ -396,8 +410,7 @@  discard block
 block discarded – undo
396 410
 
397 411
 			if ( ! empty( $pagination ) ) {
398 412
 				$excerpt .= $pagination;
399
-			}
400
-			else {
413
+			} else {
401 414
 				$excerpt .= '<p><a class="moretag" href="'.get_permalink().'">'.__('Continue reading','lsx').'</a></p>';
402 415
 			}
403 416
 		}
Please login to merge, or discard this patch.
inc/scripts.php 1 patch
Braces   +14 added lines, -5 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
  * Enqueue scripts and styles.
@@ -29,7 +32,7 @@  discard block
 block discarded – undo
29 32
 	wp_enqueue_script('imagesLoaded', get_template_directory_uri().'/js/vendor/imagesloaded.pkgd.min.js', array('jquery','masonry'));	
30 33
 	if(defined('WP_DEBUG') && true === WP_DEBUG){
31 34
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.js', array('masonry'), null, false);
32
-	}else{
35
+	} else{
33 36
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.min.js', array('masonry'), null, false);
34 37
 	}
35 38
 	
@@ -107,9 +110,15 @@  discard block
 block discarded – undo
107 110
  */
108 111
 function lsx_scripts_defer_parsing( $url ) {
109 112
 	if ( ! ( is_admin() ) ) {
110
-		if ( FALSE === strpos( $url, '.js' ) ) return $url;
111
-		if ( strpos( $url, 'jquery.js' ) ) return $url;
112
-		if ( strpos( $url, ' defer ' ) ) return $url;
113
+		if ( FALSE === strpos( $url, '.js' ) ) {
114
+			return $url;
115
+		}
116
+		if ( strpos( $url, 'jquery.js' ) ) {
117
+			return $url;
118
+		}
119
+		if ( strpos( $url, ' defer ' ) ) {
120
+			return $url;
121
+		}
113 122
 		return "$url' defer onload='";
114 123
 	}
115 124
 
Please login to merge, or discard this patch.
inc/customizer.php 1 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
  * Customizer Configuration File
@@ -164,7 +167,7 @@  discard block
 block discarded – undo
164 167
 				$control = new $control_class( $wp_customize, $slug, array_merge( $default_args, $args ) );
165 168
 				$wp_customize->add_control( $control );
166 169
 			
167
-			}else{
170
+			} else{
168 171
 				
169 172
 				if( isset( $args['control'] ) ){
170 173
 					unset( $args['control'] );
Please login to merge, or discard this patch.
inc/the-events-calendar.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,29 +40,29 @@
 block discarded – undo
40 40
 		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>',$output);
41 41
 		 		if(isset($wp_query->query_vars['eventDisplay']) && 'all' === $wp_query->query_vars['eventDisplay']){
42 42
 		 			$output = str_replace($closing_div,get_the_title($wp_query->query_vars['post_parent']).$closing_div,$output);
43
-		 		}else{
43
+		 		} else{
44 44
 		 			$single_event = get_queried_object();
45 45
 		 			$output = str_replace($closing_div,apply_filters('the_title',$single_event->post_title).$closing_div,$output);		 			
46 46
 		 		}
47
-		 	}elseif( is_tax()) {
47
+		 	} elseif( is_tax()) {
48 48
 		 		$tax_event = get_queried_object();
49 49
 		 		$output = str_replace('Page','<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>',$output);
50 50
 		 		$output = str_replace($closing_div,'&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name).$closing_div,$output);
51
-		 	}else{
51
+		 	} else{
52 52
 		 		$output = str_replace('Page',__('Events','lsx'),$output);
53 53
 		 	}		 	
54
-		 }elseif(function_exists('yoast_breadcrumb')){
54
+		 } elseif(function_exists('yoast_breadcrumb')){
55 55
 		 	$closing_div = '</div>';
56 56
 		 	$last_breadcrumb = '<span class="breadcrumb_last">'.__('Events','lsx').'</span>';
57 57
 		 	
58 58
 		 	if( is_single()) {
59 59
 		 		$single_event = get_queried_object();
60 60
 		 		$output = str_replace($closing_div,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$single_event->post_title),$output);
61
-		 	}elseif( is_tax()) {
61
+		 	} elseif( is_tax()) {
62 62
 		 		$tax_event = get_queried_object();
63 63
 		 		$output = str_replace($last_breadcrumb,'<a href="'.get_post_type_archive_link( 'tribe_events' ).'">'.__('Events','lsx').'</a>&nbsp;/&nbsp;'.apply_filters('the_title',$tax_event->name),$output);
64 64
 		 		
65
-		 	}else{
65
+		 	} else{
66 66
 		 		$output = str_replace('Page',__('Events','lsx'),$output);
67 67
 		 	}		 	
68 68
 		 }		
Please login to merge, or discard this patch.
inc/customizer-layout.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 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
  * Customize Swatch Control Class
Please login to merge, or discard this patch.