@@ -357,10 +357,10 @@ discard block |
||
357 | 357 | if('import' === $post_status) { |
358 | 358 | if(is_array($this->queued_imports) && in_array($row->post_id,$this->queued_imports)){ |
359 | 359 | $searched_items[sanitize_title($row->name) . '-' . $row->meta_value] = $this->format_row($row); |
360 | - }else{ |
|
360 | + } else{ |
|
361 | 361 | continue; |
362 | 362 | } |
363 | - }else if (false !== $post_status) { |
|
363 | + } else if (false !== $post_status) { |
|
364 | 364 | |
365 | 365 | $current_status = get_post_status($row->post_id); |
366 | 366 | if ($current_status !== $post_status) { |
@@ -468,10 +468,10 @@ discard block |
||
468 | 468 | $return = $this->import_row($adata, $wetu_id, $post_id, $team_members, $content, $safari_brands); |
469 | 469 | $this->remove_from_queue($return); |
470 | 470 | $this->format_completed_row($return); |
471 | - }else{ |
|
471 | + } else{ |
|
472 | 472 | if(isset($adata['error'])){ |
473 | 473 | $this->format_error($adata['error']); |
474 | - }else{ |
|
474 | + } else{ |
|
475 | 475 | $this->format_error(esc_html__('There was a problem importing your destination.','wet-importer')); |
476 | 476 | } |
477 | 477 | } |
@@ -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 | |
@@ -829,7 +824,7 @@ discard block |
||
829 | 824 | if(is_array($data[0]['content']['images']) && !empty($data[0]['content']['images'])){ |
830 | 825 | if(isset($data[0]['destination_image']) && is_array($data[0]['destination_image'])) { |
831 | 826 | $temp_banner = $this->attach_image($data[0]['destination_image'], $id, array('width' => '1920', 'height' => '600', 'cropping' => 'c')); |
832 | - }else{ |
|
827 | + } else{ |
|
833 | 828 | if ('tour' === $this->tab_slug) { |
834 | 829 | $key = array_rand($data[0]['content']['images']); |
835 | 830 | $temp_banner = $this->attach_image($data[0]['content']['images'][$key], $id, array('width' => '1920', 'height' => '600', 'cropping' => 'c')); |
@@ -1005,8 +1000,7 @@ discard block |
||
1005 | 1000 | if ( !empty( $filename) && " " != $filename ) |
1006 | 1001 | { |
1007 | 1002 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension |
1008 | - } |
|
1009 | - else |
|
1003 | + } else |
|
1010 | 1004 | { |
1011 | 1005 | $file_array['name'] = $url_filename; // just use original URL filename |
1012 | 1006 | } |
@@ -1087,7 +1081,7 @@ discard block |
||
1087 | 1081 | } |
1088 | 1082 | if(false !== $found && $needle_count === count($found)){ |
1089 | 1083 | return true; |
1090 | - }else{ |
|
1084 | + } else{ |
|
1091 | 1085 | return false; |
1092 | 1086 | } |
1093 | 1087 | } |