Completed
Push — master ( c34fb4...51d4c2 )
by
unknown
01:31
created
public/includes/lasso.php 1 patch
Braces   +21 added lines, -29 removed lines patch added patch discarded remove patch
@@ -407,44 +407,34 @@  discard block
 block discarded – undo
407 407
 		if ($code == "aesop_video") {
408 408
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php');
409 409
 		    echo aesop_video_shortcode($atts);
410
-		}
411
-		else if ($code == "aesop_image") {
410
+		} else if ($code == "aesop_image") {
412 411
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
413 412
 		    echo aesop_image_shortcode($atts);
414
-		}
415
-		else if ($code == "aesop_quote") {
413
+		} else if ($code == "aesop_quote") {
416 414
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
417 415
 		    echo aesop_quote_shortcode($atts);
418
-		}
419
-		else if ($code == "aesop_parallax") {
416
+		} else if ($code == "aesop_parallax") {
420 417
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
421 418
 		    echo aesop_parallax_shortcode($atts);
422
-		}
423
-		else if ($code == "aesop_character") {
419
+		} else if ($code == "aesop_character") {
424 420
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
425 421
 		    echo aesop_character_shortcode($atts);
426
-		}
427
-		else if ($code == "aesop_collection") {
422
+		} else if ($code == "aesop_collection") {
428 423
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
429 424
 		    echo aesop_collection_shortcode($atts);
430
-		}
431
-		else if ($code == "aesop_chapter") {
425
+		} else if ($code == "aesop_chapter") {
432 426
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
433 427
 		    echo aesop_chapter_shortcode($atts);
434
-		}
435
-		else if ($code == "aesop_content") {
428
+		} else if ($code == "aesop_content") {
436 429
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php');
437 430
 		    echo aesop_content_shortcode($atts, $atts['content_data']);
438
-		}
439
-		else if ($code == "aesop_gallery") {
431
+		} else if ($code == "aesop_gallery") {
440 432
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
441 433
 		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
442
-		}
443
-		else if ($code == "aesop_audio") {
434
+		} else if ($code == "aesop_audio") {
444 435
 		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php');
445 436
 		    echo aesop_audio_shortcode($atts);
446
-		}
447
-		else {
437
+		} else {
448 438
 			$code = '['.$code.' ';
449 439
 			foreach ($atts as $key => $value) {
450 440
 			    $code = ''.$key.'="'.$value.'" ';
@@ -472,8 +462,9 @@  discard block
 block discarded – undo
472 462
 		$postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false;
473 463
 
474 464
 		// bail out if the current user can't publish posts
475
-		if ( !lasso_user_can( 'delete_post', $postid ) )
476
-			return;
465
+		if ( !lasso_user_can( 'delete_post', $postid ) ) {
466
+					return;
467
+		}
477 468
 		
478 469
 		if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) {
479 470
 			wp_send_json_error();
@@ -569,15 +560,14 @@  discard block
 block discarded – undo
569 560
 			}
570 561
 	
571 562
 			$result = wp_set_object_terms( $postid, $value, $taxonomy );
572
-		}
573
-		else  {
563
+		} else  {
574 564
 			//remove all terms from post
575 565
 			$result = wp_set_object_terms( $postid, null, $taxonomy );
576 566
 		}
577 567
 
578 568
 		if ( ! is_wp_error( $result ) ) {
579 569
 			return true;
580
-		}else{
570
+		} else{
581 571
 			return false;
582 572
 		}
583 573
 	}
@@ -588,13 +578,15 @@  discard block
 block discarded – undo
588 578
 
589 579
 		  $month_numbers = range(1,12);
590 580
 
591
-		  foreach($month_numbers as $month)
592
-			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
581
+		  foreach($month_numbers as $month) {
582
+		  			$english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011));
583
+		  }
593 584
 
594 585
 		  setlocale(LC_ALL, get_locale());
595 586
 
596
-		  foreach($month_numbers as $month)
597
-			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
587
+		  foreach($month_numbers as $month) {
588
+		  			$foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011)));
589
+		  }
598 590
 
599 591
 		  return str_replace($foreign_months, $english_months, $foreignMonthName);
600 592
 	}
Please login to merge, or discard this patch.