@@ -426,47 +426,36 @@ discard block |
||
| 426 | 426 | if ($code == "aesop_video") { |
| 427 | 427 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
| 428 | 428 | echo aesop_video_shortcode($atts); |
| 429 | - } |
|
| 430 | - else if ($code == "aesop_image") { |
|
| 429 | + } else if ($code == "aesop_image") { |
|
| 431 | 430 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
| 432 | 431 | echo aesop_image_shortcode($atts); |
| 433 | - } |
|
| 434 | - else if ($code == "aesop_quote") { |
|
| 432 | + } else if ($code == "aesop_quote") { |
|
| 435 | 433 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
| 436 | 434 | echo aesop_quote_shortcode($atts); |
| 437 | - } |
|
| 438 | - else if ($code == "aesop_parallax") { |
|
| 435 | + } else if ($code == "aesop_parallax") { |
|
| 439 | 436 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
| 440 | 437 | echo aesop_parallax_shortcode($atts); |
| 441 | - } |
|
| 442 | - else if ($code == "aesop_character") { |
|
| 438 | + } else if ($code == "aesop_character") { |
|
| 443 | 439 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
| 444 | 440 | echo aesop_character_shortcode($atts); |
| 445 | - } |
|
| 446 | - else if ($code == "aesop_collection") { |
|
| 441 | + } else if ($code == "aesop_collection") { |
|
| 447 | 442 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
| 448 | 443 | echo aesop_collection_shortcode($atts); |
| 449 | - } |
|
| 450 | - else if ($code == "aesop_chapter") { |
|
| 444 | + } else if ($code == "aesop_chapter") { |
|
| 451 | 445 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
| 452 | 446 | echo aesop_chapter_shortcode($atts); |
| 453 | - } |
|
| 454 | - else if ($code == "aesop_content") { |
|
| 447 | + } else if ($code == "aesop_content") { |
|
| 455 | 448 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
| 456 | 449 | echo aesop_content_shortcode($atts, $atts['content_data']); |
| 457 | - } |
|
| 458 | - else if ($code == "aesop_gallery") { |
|
| 450 | + } else if ($code == "aesop_gallery") { |
|
| 459 | 451 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
| 460 | 452 | echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
| 461 | - } |
|
| 462 | - else if ($code == "aesop_audio") { |
|
| 453 | + } else if ($code == "aesop_audio") { |
|
| 463 | 454 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
| 464 | 455 | echo aesop_audio_shortcode($atts); |
| 465 | - } |
|
| 466 | - else if ($code == "aesop_wpimg") { |
|
| 456 | + } else if ($code == "aesop_wpimg") { |
|
| 467 | 457 | self::wpimg($atts); |
| 468 | - } |
|
| 469 | - else { |
|
| 458 | + } else { |
|
| 470 | 459 | $code = '['.$code.' '; |
| 471 | 460 | foreach ($atts as $key => $value) { |
| 472 | 461 | $code = ''.$key.'="'.$value.'" '; |
@@ -539,8 +528,9 @@ discard block |
||
| 539 | 528 | $postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false; |
| 540 | 529 | |
| 541 | 530 | // bail out if the current user can't publish posts |
| 542 | - if ( !lasso_user_can( 'delete_post', $postid ) ) |
|
| 543 | - return; |
|
| 531 | + if ( !lasso_user_can( 'delete_post', $postid ) ) { |
|
| 532 | + return; |
|
| 533 | + } |
|
| 544 | 534 | |
| 545 | 535 | if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) { |
| 546 | 536 | wp_send_json_error(); |
@@ -636,15 +626,14 @@ discard block |
||
| 636 | 626 | } |
| 637 | 627 | |
| 638 | 628 | $result = wp_set_object_terms( $postid, $value, $taxonomy ); |
| 639 | - } |
|
| 640 | - else { |
|
| 629 | + } else { |
|
| 641 | 630 | //remove all terms from post |
| 642 | 631 | $result = wp_set_object_terms( $postid, null, $taxonomy ); |
| 643 | 632 | } |
| 644 | 633 | |
| 645 | 634 | if ( ! is_wp_error( $result ) ) { |
| 646 | 635 | return true; |
| 647 | - }else{ |
|
| 636 | + } else{ |
|
| 648 | 637 | return false; |
| 649 | 638 | } |
| 650 | 639 | } |
@@ -714,9 +703,9 @@ discard block |
||
| 714 | 703 | $gallery_ids = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false; |
| 715 | 704 | if ( $_POST[ 'gallery_type' ] ) { |
| 716 | 705 | $type = $_POST[ 'gallery_type' ]; |
| 717 | - }elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) { |
|
| 706 | + } elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) { |
|
| 718 | 707 | $type = $options[ 'galleryType' ]; |
| 719 | - }else{ |
|
| 708 | + } else{ |
|
| 720 | 709 | $type = false; |
| 721 | 710 | } |
| 722 | 711 | |
@@ -795,13 +784,15 @@ discard block |
||
| 795 | 784 | |
| 796 | 785 | $month_numbers = range(1,12); |
| 797 | 786 | |
| 798 | - foreach($month_numbers as $month) |
|
| 799 | - $english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011)); |
|
| 787 | + foreach($month_numbers as $month) { |
|
| 788 | + $english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011)); |
|
| 789 | + } |
|
| 800 | 790 | |
| 801 | 791 | setlocale(LC_ALL, get_locale()); |
| 802 | 792 | |
| 803 | - foreach($month_numbers as $month) |
|
| 804 | - $foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011))); |
|
| 793 | + foreach($month_numbers as $month) { |
|
| 794 | + $foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011))); |
|
| 795 | + } |
|
| 805 | 796 | |
| 806 | 797 | return str_replace($foreign_months, $english_months, $foreignMonthName); |
| 807 | 798 | } |