@@ -425,44 +425,34 @@ discard block |
||
| 425 | 425 | if ($code == "aesop_video") { |
| 426 | 426 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
| 427 | 427 | echo aesop_video_shortcode($atts); |
| 428 | - } |
|
| 429 | - else if ($code == "aesop_image") { |
|
| 428 | + } else if ($code == "aesop_image") { |
|
| 430 | 429 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
| 431 | 430 | echo aesop_image_shortcode($atts); |
| 432 | - } |
|
| 433 | - else if ($code == "aesop_quote") { |
|
| 431 | + } else if ($code == "aesop_quote") { |
|
| 434 | 432 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
| 435 | 433 | echo aesop_quote_shortcode($atts); |
| 436 | - } |
|
| 437 | - else if ($code == "aesop_parallax") { |
|
| 434 | + } else if ($code == "aesop_parallax") { |
|
| 438 | 435 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
| 439 | 436 | echo aesop_parallax_shortcode($atts); |
| 440 | - } |
|
| 441 | - else if ($code == "aesop_character") { |
|
| 437 | + } else if ($code == "aesop_character") { |
|
| 442 | 438 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
| 443 | 439 | echo aesop_character_shortcode($atts); |
| 444 | - } |
|
| 445 | - else if ($code == "aesop_collection") { |
|
| 440 | + } else if ($code == "aesop_collection") { |
|
| 446 | 441 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
| 447 | 442 | echo aesop_collection_shortcode($atts); |
| 448 | - } |
|
| 449 | - else if ($code == "aesop_chapter") { |
|
| 443 | + } else if ($code == "aesop_chapter") { |
|
| 450 | 444 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
| 451 | 445 | echo aesop_chapter_shortcode($atts); |
| 452 | - } |
|
| 453 | - else if ($code == "aesop_content") { |
|
| 446 | + } else if ($code == "aesop_content") { |
|
| 454 | 447 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
| 455 | 448 | echo aesop_content_shortcode($atts, $atts['content_data']); |
| 456 | - } |
|
| 457 | - else if ($code == "aesop_gallery") { |
|
| 449 | + } else if ($code == "aesop_gallery") { |
|
| 458 | 450 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
| 459 | 451 | echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
| 460 | - } |
|
| 461 | - else if ($code == "aesop_audio") { |
|
| 452 | + } else if ($code == "aesop_audio") { |
|
| 462 | 453 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
| 463 | 454 | echo aesop_audio_shortcode($atts); |
| 464 | - } |
|
| 465 | - else if ($code == "aesop_document") { |
|
| 455 | + } else if ($code == "aesop_document") { |
|
| 466 | 456 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php'); |
| 467 | 457 | echo aesop_document_shortcode($atts); |
| 468 | 458 | } |
@@ -472,8 +462,7 @@ discard block |
||
| 472 | 462 | }*/ |
| 473 | 463 | else if ($code == "aesop_wpimg") { |
| 474 | 464 | self::wpimg($atts); |
| 475 | - } |
|
| 476 | - else { |
|
| 465 | + } else { |
|
| 477 | 466 | $code = '['.$code.' '; |
| 478 | 467 | foreach ($atts as $key => $value) { |
| 479 | 468 | $code = ''.$key.'="'.$value.'" '; |
@@ -557,8 +546,9 @@ discard block |
||
| 557 | 546 | $postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false; |
| 558 | 547 | |
| 559 | 548 | // bail out if the current user can't publish posts |
| 560 | - if ( !lasso_user_can( 'delete_post', $postid ) ) |
|
| 561 | - return; |
|
| 549 | + if ( !lasso_user_can( 'delete_post', $postid ) ) { |
|
| 550 | + return; |
|
| 551 | + } |
|
| 562 | 552 | |
| 563 | 553 | if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) { |
| 564 | 554 | wp_send_json_error(); |
@@ -654,15 +644,14 @@ discard block |
||
| 654 | 644 | } |
| 655 | 645 | |
| 656 | 646 | $result = wp_set_object_terms( $postid, $value, $taxonomy ); |
| 657 | - } |
|
| 658 | - else { |
|
| 647 | + } else { |
|
| 659 | 648 | //remove all terms from post |
| 660 | 649 | $result = wp_set_object_terms( $postid, null, $taxonomy ); |
| 661 | 650 | } |
| 662 | 651 | |
| 663 | 652 | if ( ! is_wp_error( $result ) ) { |
| 664 | 653 | return true; |
| 665 | - }else{ |
|
| 654 | + } else{ |
|
| 666 | 655 | return false; |
| 667 | 656 | } |
| 668 | 657 | } |
@@ -732,9 +721,9 @@ discard block |
||
| 732 | 721 | $gallery_ids = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false; |
| 733 | 722 | if ( $_POST[ 'gallery_type' ] ) { |
| 734 | 723 | $type = $_POST[ 'gallery_type' ]; |
| 735 | - }elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) { |
|
| 724 | + } elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) { |
|
| 736 | 725 | $type = $options[ 'galleryType' ]; |
| 737 | - }else{ |
|
| 726 | + } else{ |
|
| 738 | 727 | $type = false; |
| 739 | 728 | } |
| 740 | 729 | |
@@ -813,13 +802,15 @@ discard block |
||
| 813 | 802 | |
| 814 | 803 | $month_numbers = range(1,12); |
| 815 | 804 | |
| 816 | - foreach($month_numbers as $month) |
|
| 817 | - $english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011)); |
|
| 805 | + foreach($month_numbers as $month) { |
|
| 806 | + $english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011)); |
|
| 807 | + } |
|
| 818 | 808 | |
| 819 | 809 | setlocale(LC_ALL, get_locale()); |
| 820 | 810 | |
| 821 | - foreach($month_numbers as $month) |
|
| 822 | - $foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011))); |
|
| 811 | + foreach($month_numbers as $month) { |
|
| 812 | + $foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011))); |
|
| 813 | + } |
|
| 823 | 814 | |
| 824 | 815 | return str_replace($foreign_months, $english_months, $foreignMonthName); |
| 825 | 816 | } |