Completed
Push — master ( 9f9e0e...869e28 )
by
unknown
01:48
created
public/includes/assets.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 			$postid 			= get_the_ID();
74 74
 			
75 75
 			$post_date = get_the_time('U', $postid);
76
-            $delta = time() - $post_date;
76
+			$delta = time() - $post_date;
77 77
 
78 78
 			$strings = array(
79 79
 				'save' 				=> __('Save','lasso'),
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 			
209 209
 			
210 210
 			if (!$using_restapiv2) {
211
-               // enqueue REST API V1
211
+			   // enqueue REST API V1
212 212
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
213 213
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
214 214
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			if ($show_color) {
219 219
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
220 220
 			} else {
221
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
221
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
222 222
 			}
223 223
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
224 224
 
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 ) {
@@ -343,8 +348,9 @@  discard block
 block discarded – undo
343 348
 */
344 349
 function lasso_clean_string( $string = '' ) {
345 350
 
346
-	if ( empty( $string ) )
347
-		return;
351
+	if ( empty( $string ) ) {
352
+			return;
353
+	}
348 354
 
349 355
 	return sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $string ) ) );
350 356
 }
@@ -383,11 +389,13 @@  discard block
 block discarded – undo
383 389
 if ( !function_exists( 'lasso_user_can' ) ):
384 390
 	function lasso_user_can( $action = '', $postid = 0 ) {
385 391
         $result = false;
386
-		if ( empty( $action ) )
387
-			$action = 'edit_posts';
392
+		if ( empty( $action ) ) {
393
+					$action = 'edit_posts';
394
+		}
388 395
 
389
-		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts')
390
-			$postid = get_the_ID();
396
+		if ( empty( $postid ) && $action != 'edit_posts' && $action != 'publish_posts' && $action != 'delete_posts') {
397
+					$postid = get_the_ID();
398
+		}
391 399
 
392 400
 		if ( is_user_logged_in() && current_user_can( $action, $postid ) ) {
393 401
 			// check against post types:
Please login to merge, or discard this patch.