Completed
Push — master ( a8b899...5cb871 )
by
unknown
02:32
created
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.
admin/includes/menus/settings.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
49
-			return;
48
+		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) {
49
+					return;
50
+		}
50 51
 
51 52
 		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
52 53
 
@@ -86,8 +87,9 @@  discard block
 block discarded – undo
86 87
 	 */
87 88
 	function lasso_editor_settings_form() {
88 89
 
89
-		if ( !is_user_logged_in() )
90
-			return;
90
+		if ( !is_user_logged_in() ) {
91
+					return;
92
+		}
91 93
 
92 94
 		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
93 95
 		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
@@ -137,7 +139,9 @@  discard block
 block discarded – undo
137 139
 						$post_types = get_post_types( $args, 'objects' );
138 140
 						 
139 141
 						foreach ( $post_types  as $post_type ) {
140
-						   if ($post_type->name == 'attachment') continue;
142
+						   if ($post_type->name == 'attachment') {
143
+						   	continue;
144
+						   }
141 145
 						   $checked ="";
142 146
 						   if (  in_array( $post_type->name, $allowed_post_types )  ) {
143 147
 								$checked = 'checked="checked"';
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
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 if( !function_exists('lasso_editor_get_option')):
16 16
 	function lasso_editor_get_option( $option, $section, $default = '' ) {
17 17
 
18
-		if ( empty( $option ) )
19
-			return;
18
+		if ( empty( $option ) ) {
19
+					return;
20
+		}
20 21
 
21 22
 		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
22 23
 
@@ -44,11 +45,12 @@  discard block
 block discarded – undo
44 45
 
45 46
 	$q = new wp_query( array( 'post_type' => 'ai_galleries', 'post_status' => 'publish' ) );
46 47
 
47
-	if ( $q->have_posts() )
48
-		return true;
49
-	else
50
-		return false;
51
-}
48
+	if ( $q->have_posts() ) {
49
+			return true;
50
+	} else {
51
+			return false;
52
+	}
53
+	}
52 54
 
53 55
 /**
54 56
  * Return a CSS class of an automatically supported theme
@@ -194,13 +196,15 @@  discard block
 block discarded – undo
194 196
 */
195 197
 function lasso_get_post_objects( $postid = '', $taxonomy = 'category') {
196 198
 
197
-	if ( empty( $postid ) )
198
-		$postid = get_the_ID();
199
+	if ( empty( $postid ) ) {
200
+			$postid = get_the_ID();
201
+	}
199 202
 
200 203
 	$objects = 'category' == $taxonomy ? get_the_category( $postid ) : get_the_tags( $postid );
201 204
 
202
-	if ( empty( $objects) )
203
-		return;
205
+	if ( empty( $objects) ) {
206
+			return;
207
+	}
204 208
 
205 209
 	$out = '';
206 210
 	foreach( $objects as $object ) {
@@ -222,8 +226,9 @@  discard block
 block discarded – undo
222 226
 
223 227
 	$objects = 'category' == $taxonomy ? get_categories(array('hide_empty' => 0)) : get_tags(array('hide_empty' => 0));
224 228
 
225
-	if ( empty( $objects) )
226
-		return;
229
+	if ( empty( $objects) ) {
230
+			return;
231
+	}
227 232
 
228 233
 	$out = "";
229 234
 	foreach( $objects as $object ) {
@@ -345,8 +350,9 @@  discard block
 block discarded – undo
345 350
 */
346 351
 function lasso_clean_string( $string = '' ) {
347 352
 
348
-	if ( empty( $string ) )
349
-		return;
353
+	if ( empty( $string ) ) {
354
+			return;
355
+	}
350 356
 
351 357
 	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
352 358
 }
@@ -385,11 +391,13 @@  discard block
 block discarded – undo
385 391
 if ( !function_exists( 'lasso_user_can' ) ):
386 392
 	function lasso_user_can( $action = '', $postid = 0 ) {
387 393
         $result = false;
388
-		if ( empty( $action ) )
389
-			$action = 'edit_posts';
394
+		if ( empty( $action ) ) {
395
+					$action = 'edit_posts';
396
+		}
390 397
 
391
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
392
-			$postid = get_the_ID();
398
+		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts') {
399
+					$postid = get_the_ID();
400
+		}
393 401
 
394 402
 		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
395 403
 			// check against post types:
Please login to merge, or discard this patch.
lasso.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
 
64 64
 function lasso_editor_get_option( $option, $section, $default = '' ) {
65 65
 
66
-	if ( empty( $option ) )
67
-		return;
66
+	if ( empty( $option ) ) {
67
+			return;
68
+	}
68 69
 
69 70
 	if ( function_exists( 'is_multisite' ) && is_multisite() ) {
70 71
 
Please login to merge, or discard this patch.
includes/process/update_object.php 1 patch
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 			}
161 161
 	
162 162
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
163
-		}
164
-		else  {
163
+		} else  {
165 164
 			//remove all terms from post
166 165
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
167 166
 
@@ -169,7 +168,7 @@  discard block
 block discarded – undo
169 168
 
170 169
 		if ( ! is_wp_error( $result ) ) {
171 170
 			return true;
172
-		}else{
171
+		} else{
173 172
 			return false;
174 173
 		}
175 174
 	}
@@ -204,7 +203,7 @@  discard block
 block discarded – undo
204 203
 			$result = wp_set_object_terms( $postid, $cats, $taxonomy );
205 204
 			if ( ! is_wp_error( $result ) ) {
206 205
 				return true;
207
-			}else{
206
+			} else{
208 207
 				return false;
209 208
 			}
210 209
 		}
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Braces   +12 added lines, -23 removed lines patch added patch discarded remove patch
@@ -372,44 +372,34 @@  discard block
 block discarded – undo
372 372
 		if ($code == "aesop_video") {
373 373
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
374 374
 		    echo aesop_video_shortcode($atts);
375
-		}
376
-		else if ($code == "aesop_image") {
375
+		} else if ($code == "aesop_image") {
377 376
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
378 377
 		    echo aesop_image_shortcode($atts);
379
-		}
380
-		else if ($code == "aesop_quote") {
378
+		} else if ($code == "aesop_quote") {
381 379
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
382 380
 		    echo aesop_quote_shortcode($atts);
383
-		}
384
-		else if ($code == "aesop_parallax") {
381
+		} else if ($code == "aesop_parallax") {
385 382
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
386 383
 		    echo aesop_parallax_shortcode($atts);
387
-		}
388
-		else if ($code == "aesop_character") {
384
+		} else if ($code == "aesop_character") {
389 385
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
390 386
 		    echo aesop_character_shortcode($atts);
391
-		}
392
-		else if ($code == "aesop_collection") {
387
+		} else if ($code == "aesop_collection") {
393 388
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
394 389
 		    echo aesop_collection_shortcode($atts);
395
-		}
396
-		else if ($code == "aesop_chapter") {
390
+		} else if ($code == "aesop_chapter") {
397 391
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
398 392
 		    echo aesop_chapter_shortcode($atts);
399
-		}
400
-		else if ($code == "aesop_content") {
393
+		} else if ($code == "aesop_content") {
401 394
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
402 395
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
403
-		}
404
-		else if ($code == "aesop_gallery") {
396
+		} else if ($code == "aesop_gallery") {
405 397
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
406 398
 		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
407
-		}
408
-		else if ($code == "aesop_audio") {
399
+		} else if ($code == "aesop_audio") {
409 400
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
410 401
 		    echo aesop_audio_shortcode($atts);
411
-		}
412
-		else {
402
+		} else {
413 403
 			$code = '['.$code.' ';
414 404
 			foreach ($atts as $key => $value) {
415 405
 			    $code = ''.$key.'="'.$value.'" ';
@@ -436,15 +426,14 @@  discard block
 block discarded – undo
436 426
 			}
437 427
 	
438 428
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
439
-		}
440
-		else  {
429
+		} else  {
441 430
 			//remove all terms from post
442 431
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
443 432
 		}
444 433
 
445 434
 		if ( ! is_wp_error( $result ) ) {
446 435
 			return true;
447
-		}else{
436
+		} else{
448 437
 			return false;
449 438
 		}
450 439
 	}
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -188,8 +188,11 @@  discard block
 block discarded – undo
188 188
 						<?php if ( class_exists ('Aesop_Events') ) { ?>
189 189
 						     <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>"  class="lasso-toolbar--component__event"></li>
190 190
 						<?php }?>
191
-					<?php else: ?>
192
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
191
+					<?php else {
192
+	: ?>
193
+						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );
194
+}
195
+?>" class="image lasso-toolbar--component__image"></li>
193 196
 						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
194 197
 						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
195 198
 					<?php endif; ?>
@@ -712,8 +715,9 @@  discard block
 block discarded – undo
712 715
 
713 716
 	$blob = array();
714 717
 
715
-	if ( empty( $codes ) )
716
-		return;
718
+	if ( empty( $codes ) ) {
719
+			return;
720
+	}
717 721
 
718 722
 	foreach ( $codes as $slug => $shortcode ) {
719 723
 		$return = '';
Please login to merge, or discard this patch.