@@ -436,48 +436,37 @@ discard block |
||
| 436 | 436 | if ($code == "aesop_video") { |
| 437 | 437 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
| 438 | 438 | echo aesop_video_shortcode($atts); |
| 439 | - } |
|
| 440 | - else if ($code == "aesop_image") { |
|
| 439 | + } else if ($code == "aesop_image") { |
|
| 441 | 440 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
| 442 | 441 | echo aesop_image_shortcode($atts); |
| 443 | - } |
|
| 444 | - else if ($code == "aesop_quote") { |
|
| 442 | + } else if ($code == "aesop_quote") { |
|
| 445 | 443 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
| 446 | 444 | echo aesop_quote_shortcode($atts); |
| 447 | - } |
|
| 448 | - else if ($code == "aesop_parallax") { |
|
| 445 | + } else if ($code == "aesop_parallax") { |
|
| 449 | 446 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
| 450 | 447 | echo aesop_parallax_shortcode($atts); |
| 451 | - } |
|
| 452 | - else if ($code == "aesop_character") { |
|
| 448 | + } else if ($code == "aesop_character") { |
|
| 453 | 449 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
| 454 | 450 | echo aesop_character_shortcode($atts); |
| 455 | - } |
|
| 456 | - else if ($code == "aesop_collection") { |
|
| 451 | + } else if ($code == "aesop_collection") { |
|
| 457 | 452 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
| 458 | 453 | echo aesop_collection_shortcode($atts); |
| 459 | - } |
|
| 460 | - else if ($code == "aesop_chapter") { |
|
| 454 | + } else if ($code == "aesop_chapter") { |
|
| 461 | 455 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
| 462 | 456 | echo aesop_chapter_shortcode($atts); |
| 463 | - } |
|
| 464 | - else if ($code == "aesop_content") { |
|
| 457 | + } else if ($code == "aesop_content") { |
|
| 465 | 458 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
| 466 | 459 | echo aesop_content_shortcode($atts, $atts['content_data']); |
| 467 | - } |
|
| 468 | - else if ($code == "aesop_gallery") { |
|
| 460 | + } else if ($code == "aesop_gallery") { |
|
| 469 | 461 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
| 470 | 462 | echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
| 471 | - } |
|
| 472 | - else if ($code == "aesop_audio") { |
|
| 463 | + } else if ($code == "aesop_audio") { |
|
| 473 | 464 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
| 474 | 465 | echo aesop_audio_shortcode($atts); |
| 475 | - } |
|
| 476 | - else if ($code == "aesop_document") { |
|
| 466 | + } else if ($code == "aesop_document") { |
|
| 477 | 467 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-document.php'); |
| 478 | 468 | echo aesop_document_shortcode($atts); |
| 479 | - } |
|
| 480 | - else if ($code == "aesop_timeline_stop") { |
|
| 469 | + } else if ($code == "aesop_timeline_stop") { |
|
| 481 | 470 | require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-timeline.php'); |
| 482 | 471 | echo aesop_timeline_stop_shortcode($atts); |
| 483 | 472 | } |
@@ -487,11 +476,9 @@ discard block |
||
| 487 | 476 | }*/ |
| 488 | 477 | else if ($code == "aesop_wpimg") { |
| 489 | 478 | self::wpimg($atts); |
| 490 | - } |
|
| 491 | - else if ($code == "aesop_wpimg-block") { |
|
| 479 | + } else if ($code == "aesop_wpimg-block") { |
|
| 492 | 480 | self::wpimg_block($atts); |
| 493 | - } |
|
| 494 | - else { |
|
| 481 | + } else { |
|
| 495 | 482 | $code = '['.$code.' '; |
| 496 | 483 | foreach ($atts as $key => $value) { |
| 497 | 484 | $code = ''.$key.'="'.$value.'" '; |
@@ -607,8 +594,9 @@ discard block |
||
| 607 | 594 | $postid = isset( $_POST['postid'] ) ? $_POST['postid'] : false; |
| 608 | 595 | |
| 609 | 596 | // bail out if the current user can't publish posts |
| 610 | - if ( !lasso_user_can( 'delete_post', $postid ) ) |
|
| 611 | - return; |
|
| 597 | + if ( !lasso_user_can( 'delete_post', $postid ) ) { |
|
| 598 | + return; |
|
| 599 | + } |
|
| 612 | 600 | |
| 613 | 601 | if (!wp_verify_nonce( $_POST[ 'nonce' ], 'lasso_delete_post' )) { |
| 614 | 602 | wp_send_json_error(); |
@@ -704,15 +692,14 @@ discard block |
||
| 704 | 692 | } |
| 705 | 693 | |
| 706 | 694 | $result = wp_set_object_terms( $postid, $value, $taxonomy ); |
| 707 | - } |
|
| 708 | - else { |
|
| 695 | + } else { |
|
| 709 | 696 | //remove all terms from post |
| 710 | 697 | $result = wp_set_object_terms( $postid, null, $taxonomy ); |
| 711 | 698 | } |
| 712 | 699 | |
| 713 | 700 | if ( ! is_wp_error( $result ) ) { |
| 714 | 701 | return true; |
| 715 | - }else{ |
|
| 702 | + } else{ |
|
| 716 | 703 | return false; |
| 717 | 704 | } |
| 718 | 705 | } |
@@ -782,9 +769,9 @@ discard block |
||
| 782 | 769 | $gallery_ids = isset( $_POST['gallery_ids'] ) ? $_POST['gallery_ids'] : false; |
| 783 | 770 | if ( $_POST[ 'gallery_type' ] ) { |
| 784 | 771 | $type = $_POST[ 'gallery_type' ]; |
| 785 | - }elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) { |
|
| 772 | + } elseif ( ! empty( $options ) && $options[ 'galleryType' ] ) { |
|
| 786 | 773 | $type = $options[ 'galleryType' ]; |
| 787 | - }else{ |
|
| 774 | + } else{ |
|
| 788 | 775 | $type = false; |
| 789 | 776 | } |
| 790 | 777 | |
@@ -863,13 +850,15 @@ discard block |
||
| 863 | 850 | |
| 864 | 851 | $month_numbers = range(1,12); |
| 865 | 852 | |
| 866 | - foreach($month_numbers as $month) |
|
| 867 | - $english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011)); |
|
| 853 | + foreach($month_numbers as $month) { |
|
| 854 | + $english_months[] = strftime('%B',mktime(0,0,0,$month,1,2011)); |
|
| 855 | + } |
|
| 868 | 856 | |
| 869 | 857 | setlocale(LC_ALL, get_locale()); |
| 870 | 858 | |
| 871 | - foreach($month_numbers as $month) |
|
| 872 | - $foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011))); |
|
| 859 | + foreach($month_numbers as $month) { |
|
| 860 | + $foreign_months[] = utf8_encode(strftime('%B',mktime(0,0,0,$month,1,2011))); |
|
| 861 | + } |
|
| 873 | 862 | |
| 874 | 863 | return str_replace($foreign_months, $english_months, $foreignMonthName); |
| 875 | 864 | } |