Completed
Push — master ( 8f4a49...efac85 )
by
unknown
02:18
created
public/includes/option-engine.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -121,8 +121,9 @@  discard block
 block discarded – undo
121 121
 
122 122
 	ob_start();
123 123
 
124
-	if ( empty( $name ) || empty( $options ) || !is_array( $options ) )
125
-		return;
124
+	if ( empty( $name ) || empty( $options ) || !is_array( $options ) ) {
125
+			return;
126
+	}
126 127
 
127 128
 	$nonce = wp_create_nonce('lasso-process-post-meta');
128 129
 	$key   = sprintf('_lasso_%s_settings', $name );
@@ -160,8 +161,9 @@  discard block
 block discarded – undo
160 161
 	$before = '<div class="lasso--postsettings__option">';
161 162
 	$after 	= '</div>';
162 163
 
163
-	if ( empty( $name ) || empty( $options ) )
164
-		return;
164
+	if ( empty( $name ) || empty( $options ) ) {
165
+			return;
166
+	}
165 167
 
166 168
 	foreach ( (array) $options as $option ) {
167 169
 
@@ -195,8 +197,9 @@  discard block
 block discarded – undo
195 197
 */
196 198
 function lasso_option_engine_option( $name = '', $option = '', $type = '') {
197 199
 
198
-	if ( empty( $type ) || empty( $option ) )
199
-		return;
200
+	if ( empty( $type ) || empty( $option ) ) {
201
+			return;
202
+	}
200 203
 
201 204
 	$id = isset( $option['id'] ) ? $option['id'] : false;
202 205
 	$id = $id ? lasso_clean_string( $id ) : false;
Please login to merge, or discard this patch.
admin/includes/menus/welcome.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,23 +71,26 @@
 block discarded – undo
71 71
 			  				<p><?php _e( 'We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso' );?></p>
72 72
 			  			</li>
73 73
 
74
-			  		<?php else :
74
+			  		<?php else {
75
+	:
75 76
 
76 77
 					$checks = self::lasso_preflight_check();
78
+}
77 79
 
78 80
 					if ( $checks && !defined( 'LASSO_AGENCY_MODE' ) ):
79 81
 
80 82
 						foreach ( (array) $checks as $key => $check ) {
81 83
 
82 84
 							echo $check;
83
-						}
84
-
85
-						else:
85
+						} else {
86
+							:
86 87
 
87 88
 							// pre-flight is go for flight
88 89
 						?>
89 90
 						<li class="success">
90
-							<h3><?php _e( 'You\'re Ready to Rock!', 'lasso' );?></h3>
91
+							<h3><?php _e( 'You\'re Ready to Rock!', 'lasso' );
92
+						}
93
+						?></h3>
91 94
 							<?php if ( lasso_get_supported_theme_class() ) { ?>
92 95
 							<p><?php _e( 'Your theme is automatically supported. No additional setup is needed.', 'lasso' );?></p>
93 96
 							<?php } ?>
Please login to merge, or discard this patch.
public/includes/wrap-shortcodes.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,9 +76,13 @@
 block discarded – undo
76 76
 
77 77
 /* a helper function */
78 78
 function strpos_arr($haystack, $needle) {
79
-    if(!is_array($needle)) $needle = array($needle);
79
+    if(!is_array($needle)) {
80
+    	$needle = array($needle);
81
+    }
80 82
     foreach($needle as $what) {
81
-        if(($pos = strpos($haystack, $what))!==false) return $pos;
83
+        if(($pos = strpos($haystack, $what))!==false) {
84
+        	return $pos;
85
+        }
82 86
     }
83 87
     return false;
84 88
 }
85 89
\ No newline at end of file
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Braces   +32 added lines, -20 removed lines patch added patch discarded remove patch
@@ -107,8 +107,9 @@  discard block
 block discarded – undo
107 107
 
108 108
 	ob_start();
109 109
 
110
-	if ( !lasso_user_can() )
111
-		return;
110
+	if ( !lasso_user_can() ) {
111
+			return;
112
+	}
112 113
 
113 114
 	// let users add custom css classes
114 115
 	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
@@ -131,8 +132,9 @@  discard block
 block discarded – undo
131 132
 
132 133
 	ob_start();
133 134
 
134
-	if ( !lasso_user_can() )
135
-		return;
135
+	if ( !lasso_user_can() ) {
136
+			return;
137
+	}
136 138
 	
137 139
 	$is_mobile = wp_is_mobile();
138 140
 
@@ -199,8 +201,11 @@  discard block
 block discarded – undo
199 201
 						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
200 202
 						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
201 203
 						<?php }?>
202
-					<?php else: ?>
203
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
204
+					<?php else {
205
+	: ?>
206
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
207
+}
208
+?>" class="image lasso-toolbar--component__image"></li>
204 209
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
205 210
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
206 211
 					<?php endif; ?>
@@ -255,8 +260,9 @@  discard block
 block discarded – undo
255 260
 
256 261
 	ob_start();
257 262
 
258
-	if ( !lasso_user_can() )
259
-		return;
263
+	if ( !lasso_user_can() ) {
264
+			return;
265
+	}
260 266
 
261 267
 	// let users add custom css classes
262 268
 	$custom_classes = apply_filters( 'lasso_component_classes', '' );
@@ -282,8 +288,9 @@  discard block
 block discarded – undo
282 288
 
283 289
 	ob_start();
284 290
 
285
-	if ( !lasso_user_can() )
286
-		return;
291
+	if ( !lasso_user_can() ) {
292
+			return;
293
+	}
287 294
 
288 295
 	// has post thumbnail
289 296
 	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
@@ -311,8 +318,9 @@  discard block
 block discarded – undo
311 318
 
312 319
 	ob_start();
313 320
 
314
-	if ( !lasso_user_can() )
315
-		return;
321
+	if ( !lasso_user_can() ) {
322
+			return;
323
+	}
316 324
 
317 325
 	global $post;
318 326
 
@@ -442,8 +450,9 @@  discard block
 block discarded – undo
442 450
 
443 451
 	ob_start();
444 452
 
445
-	if ( !lasso_user_can('edit_posts') )
446
-		return;
453
+	if ( !lasso_user_can('edit_posts') ) {
454
+			return;
455
+	}
447 456
 
448 457
 	$status = get_post_status( get_the_ID() );
449 458
 
@@ -572,8 +581,9 @@  discard block
 block discarded – undo
572 581
 
573 582
 	ob_start();
574 583
 
575
-	if ( !lasso_user_can() )
576
-		return;
584
+	if ( !lasso_user_can() ) {
585
+			return;
586
+	}
577 587
 
578 588
 	// let users add custom css classes
579 589
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -593,8 +603,9 @@  discard block
 block discarded – undo
593 603
 
594 604
 	ob_start();
595 605
 
596
-	if ( !lasso_user_can() )
597
-		return;
606
+	if ( !lasso_user_can() ) {
607
+			return;
608
+	}
598 609
 
599 610
 	// let users add custom css classes
600 611
 	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
@@ -665,8 +676,9 @@  discard block
 block discarded – undo
665 676
 
666 677
 	$blob = array();
667 678
 
668
-	if ( empty( $codes ) )
669
-		return;
679
+	if ( empty( $codes ) ) {
680
+			return;
681
+	}
670 682
 
671 683
 	foreach ( $codes as $slug => $shortcode ) {
672 684
 		$return = '';
Please login to merge, or discard this patch.
includes/process/update_object.php 1 patch
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -144,8 +144,7 @@  discard block
 block discarded – undo
144 144
 			}
145 145
 	
146 146
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
147
-		}
148
-		else  {
147
+		} else  {
149 148
 			//remove all terms from post
150 149
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
151 150
 
@@ -153,7 +152,7 @@  discard block
 block discarded – undo
153 152
 
154 153
 		if ( ! is_wp_error( $result ) ) {
155 154
 			return true;
156
-		}else{
155
+		} else{
157 156
 			return false;
158 157
 		}
159 158
 
Please login to merge, or discard this patch.
public/includes/helpers.php 1 patch
Braces   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function lasso_editor_get_option( $option, $section, $default = '' ) {
16 16
 
17
-	if ( empty( $option ) )
18
-		return;
17
+	if ( empty( $option ) ) {
18
+			return;
19
+	}
19 20
 
20 21
 	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
21 22
 
@@ -42,11 +43,12 @@  discard block
 block discarded – undo
42 43
 
43 44
 	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
44 45
 
45
-	if ( $q->have_posts() )
46
-		return true;
47
-	else
48
-		return false;
49
-}
46
+	if ( $q->have_posts() ) {
47
+			return true;
48
+	} else {
49
+			return false;
50
+	}
51
+	}
50 52
 
51 53
 /**
52 54
  * Return a CSS class of an automatically supported theme
@@ -192,13 +194,15 @@  discard block
 block discarded – undo
192 194
 */
193 195
 function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
194 196
 
195
-	if ( empty( $postid ) )
196
-		$postid = get_the_ID();
197
+	if ( empty( $postid ) ) {
198
+			$postid = get_the_ID();
199
+	}
197 200
 
198 201
 	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
199 202
 
200
-	if ( empty( $objects) )
201
-		return;
203
+	if ( empty( $objects) ) {
204
+			return;
205
+	}
202 206
 
203 207
 	$out = '';
204 208
 	foreach( $objects as $object ) {
@@ -220,8 +224,9 @@  discard block
 block discarded – undo
220 224
 
221 225
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
222 226
 
223
-	if ( empty( $objects) )
224
-		return;
227
+	if ( empty( $objects) ) {
228
+			return;
229
+	}
225 230
 
226 231
 	$out = "";
227 232
 	foreach( $objects as $object ) {
@@ -335,8 +340,9 @@  discard block
 block discarded – undo
335 340
 */
336 341
 function lasso_clean_string( $string = '' ) {
337 342
 
338
-	if ( empty( $string ) )
339
-		return;
343
+	if ( empty( $string ) ) {
344
+			return;
345
+	}
340 346
 
341 347
 	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
342 348
 }
@@ -375,11 +381,13 @@  discard block
 block discarded – undo
375 381
 if ( !function_exists( 'lasso_user_can' ) ):
376 382
 	function lasso_user_can( $action = '', $postid = 0 ) {
377 383
         $result = false;
378
-		if ( empty( $action ) )
379
-			$action = 'edit_posts';
384
+		if ( empty( $action ) ) {
385
+					$action = 'edit_posts';
386
+		}
380 387
 
381
-		if ( empty( $postid ) )
382
-			$postid = get_the_ID();
388
+		if ( empty( $postid ) ) {
389
+					$postid = get_the_ID();
390
+		}
383 391
 
384 392
 		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
385 393
 			// check against post types:
Please login to merge, or discard this patch.