@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | <?php } ?> |
401 | 401 | </ul> |
402 | 402 | <?php*/ |
403 | - }else{ |
|
403 | + } else{ |
|
404 | 404 | $this->current_importer->display_page(); |
405 | 405 | }; ?> |
406 | 406 | </div> |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | |
437 | 437 | <?php if('tour'===$this->tab_slug){ ?> |
438 | 438 | | <a class="import search-toggle" href="#import"><?php esc_attr_e('WETU','wetu-importer'); ?></a> |
439 | - <?php }else if(!empty($this->queued_imports)) { ?> |
|
439 | + <?php } else if(!empty($this->queued_imports)) { ?> |
|
440 | 440 | | <a class="import search-toggle" href="#import"><?php esc_attr_e('WETU Queue','wetu-importer'); ?></a> |
441 | 441 | <?php } ?> |
442 | 442 | </p> |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | foreach($team_members->posts as $member){ ?> |
527 | 527 | <li><input class="team" <?php $this->checked($selected,$member); ?> type="checkbox" value="<?php echo $member; ?>" /> <?php echo get_the_title($member); ?></li> |
528 | 528 | <?php } |
529 | - }else{ ?> |
|
529 | + } else{ ?> |
|
530 | 530 | <li><input class="team" type="checkbox" value="0" /> <?php _e('None','wetu-importer'); ?></li> |
531 | 531 | <?php } |
532 | 532 | ?> |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | if (in_array($needle, $haystack)) { |
592 | 592 | if(true === $wrap || 'true' === $wrap) { |
593 | 593 | $html = $type . '="' . $type . '"'; |
594 | - }else{ |
|
594 | + } else{ |
|
595 | 595 | $html = $type; |
596 | 596 | } |
597 | 597 | } |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | |
644 | 644 | if(false !== $id && '0' !== $id && false !== $prev && true === $unique){ |
645 | 645 | update_post_meta($id,$meta_key,$value,$prev); |
646 | - }else{ |
|
646 | + } else{ |
|
647 | 647 | add_post_meta($id,$meta_key,$value,$unique); |
648 | 648 | } |
649 | 649 | } |
@@ -684,18 +684,15 @@ discard block |
||
684 | 684 | if ( is_wp_error($term) ) |
685 | 685 | { |
686 | 686 | echo $term->get_error_message(); |
687 | - } |
|
688 | - else |
|
687 | + } else |
|
689 | 688 | { |
690 | 689 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
691 | 690 | } |
692 | - } |
|
693 | - else |
|
691 | + } else |
|
694 | 692 | { |
695 | 693 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
696 | 694 | } |
697 | - } |
|
698 | - else |
|
695 | + } else |
|
699 | 696 | { |
700 | 697 | $result[]=trim($k); |
701 | 698 | } |
@@ -709,10 +706,8 @@ discard block |
||
709 | 706 | { |
710 | 707 | if(false !== $parent){ $parent = array('parent'=>$parent); } |
711 | 708 | $term = wp_insert_term(trim($name), $taxonomy,$parent); |
712 | - if ( is_wp_error($term) ){echo $term->get_error_message();} |
|
713 | - else { wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); } |
|
714 | - } |
|
715 | - else |
|
709 | + if ( is_wp_error($term) ){echo $term->get_error_message();} else { wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); } |
|
710 | + } else |
|
716 | 711 | { |
717 | 712 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
718 | 713 | } |
@@ -732,7 +727,7 @@ discard block |
||
732 | 727 | foreach($terms as $term){ |
733 | 728 | $return .= '<li><input class="'.$taxonomy.'" '.$this->checked($selected,$term->term_id,false).' type="checkbox" value="'.$term->term_id.'" /> '.$term->name.'</li>'; |
734 | 729 | } |
735 | - }else{ |
|
730 | + } else{ |
|
736 | 731 | $return .= '<li><input type="checkbox" value="" /> '.__('None','wetu-importer').'</li>'; |
737 | 732 | } |
738 | 733 | $return .= '</ul>'; |
@@ -751,13 +746,13 @@ discard block |
||
751 | 746 | |
752 | 747 | if(isset($data[0]['position']['driving_latitude'])){ |
753 | 748 | $latitude = $data[0]['position']['driving_latitude']; |
754 | - }elseif(isset($data[0]['position']['latitude'])){ |
|
749 | + } elseif(isset($data[0]['position']['latitude'])){ |
|
755 | 750 | $latitude = $data[0]['position']['latitude']; |
756 | 751 | } |
757 | 752 | |
758 | 753 | if(isset($data[0]['position']['driving_longitude'])){ |
759 | 754 | $longitude = $data[0]['position']['driving_longitude']; |
760 | - }elseif(isset($data[0]['position']['longitude'])){ |
|
755 | + } elseif(isset($data[0]['position']['longitude'])){ |
|
761 | 756 | $longitude = $data[0]['position']['longitude']; |
762 | 757 | } |
763 | 758 | |
@@ -789,7 +784,7 @@ discard block |
||
789 | 784 | if(false !== $id && '0' !== $id){ |
790 | 785 | $prev = get_post_meta($id,'location',true); |
791 | 786 | update_post_meta($id,'location',$location_data,$prev); |
792 | - }else{ |
|
787 | + } else{ |
|
793 | 788 | add_post_meta($id,'location',$location_data,true); |
794 | 789 | } |
795 | 790 | } |
@@ -805,7 +800,7 @@ discard block |
||
805 | 800 | if('tour' === $this->tab_slug){ |
806 | 801 | $key = array_rand($data[0]['content']['images']); |
807 | 802 | $this->featured_image = $this->attach_image($data[0]['content']['images'][$key],$id); |
808 | - }else{ |
|
803 | + } else{ |
|
809 | 804 | $this->featured_image = $this->attach_image($data[0]['content']['images'][0],$id); |
810 | 805 | } |
811 | 806 | |
@@ -831,7 +826,7 @@ discard block |
||
831 | 826 | if('tour' === $this->tab_slug){ |
832 | 827 | $key = array_rand($data[0]['content']['images']); |
833 | 828 | $this->banner_image = $this->attach_image($data[0]['content']['images'][$key],$id,array('width'=>'1920','height'=>'600','cropping'=>'c')); |
834 | - }else{ |
|
829 | + } else{ |
|
835 | 830 | $this->banner_image = $this->attach_image($data[0]['content']['images'][1],$id,array('width'=>'1920','height'=>'600','cropping'=>'c')); |
836 | 831 | } |
837 | 832 | |
@@ -997,8 +992,7 @@ discard block |
||
997 | 992 | if ( !empty( $filename) && " " != $filename ) |
998 | 993 | { |
999 | 994 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension |
1000 | - } |
|
1001 | - else |
|
995 | + } else |
|
1002 | 996 | { |
1003 | 997 | $file_array['name'] = $url_filename; // just use original URL filename |
1004 | 998 | } |
@@ -1072,7 +1066,7 @@ discard block |
||
1072 | 1066 | } |
1073 | 1067 | if(false !== $found && $needle_count === count($found)){ |
1074 | 1068 | return true; |
1075 | - }else{ |
|
1069 | + } else{ |
|
1076 | 1070 | return false; |
1077 | 1071 | } |
1078 | 1072 | } |