Completed
Push — master ( 02e1e3...df1849 )
by
unknown
01:57
created
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.