@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | if (isset($temp_options['api']['wetu_api_password']) && '' !== $temp_options['api']['wetu_api_password']) { |
| 228 | 228 | $this->api_password = $temp_options['api']['wetu_api_password']; |
| 229 | 229 | } |
| 230 | - }else{ |
|
| 230 | + } else{ |
|
| 231 | 231 | $this->api_key = WETU_API_KEY; |
| 232 | 232 | } |
| 233 | 233 | |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | <?php } ?> |
| 412 | 412 | </ul> |
| 413 | 413 | <?php*/ |
| 414 | - }else{ |
|
| 414 | + } else{ |
|
| 415 | 415 | $this->current_importer->display_page(); |
| 416 | 416 | }; ?> |
| 417 | 417 | </div> |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | |
| 448 | 448 | <?php if('tour'===$this->tab_slug){ ?> |
| 449 | 449 | | <a class="import search-toggle" href="#import"><?php esc_attr_e('WETU','wetu-importer'); ?></a> |
| 450 | - <?php }else if(!empty($this->queued_imports)) { ?> |
|
| 450 | + <?php } else if(!empty($this->queued_imports)) { ?> |
|
| 451 | 451 | | <a class="import search-toggle" href="#import"><?php esc_attr_e('WETU Queue','wetu-importer'); ?></a> |
| 452 | 452 | <?php } ?> |
| 453 | 453 | </p> |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | foreach($team_members->posts as $member){ ?> |
| 538 | 538 | <li><input class="team" <?php $this->checked($selected,$member); ?> type="checkbox" value="<?php echo $member; ?>" /> <?php echo get_the_title($member); ?></li> |
| 539 | 539 | <?php } |
| 540 | - }else{ ?> |
|
| 540 | + } else{ ?> |
|
| 541 | 541 | <li><input class="team" type="checkbox" value="0" /> <?php _e('None','wetu-importer'); ?></li> |
| 542 | 542 | <?php } |
| 543 | 543 | ?> |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | if (in_array($needle, $haystack)) { |
| 603 | 603 | if(true === $wrap || 'true' === $wrap) { |
| 604 | 604 | $html = $type . '="' . $type . '"'; |
| 605 | - }else{ |
|
| 605 | + } else{ |
|
| 606 | 606 | $html = $type; |
| 607 | 607 | } |
| 608 | 608 | } |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | |
| 655 | 655 | if(false !== $id && '0' !== $id && false !== $prev && true === $unique){ |
| 656 | 656 | update_post_meta($id,$meta_key,$value,$prev); |
| 657 | - }else{ |
|
| 657 | + } else{ |
|
| 658 | 658 | add_post_meta($id,$meta_key,$value,$unique); |
| 659 | 659 | } |
| 660 | 660 | } |
@@ -695,18 +695,15 @@ discard block |
||
| 695 | 695 | if ( is_wp_error($term) ) |
| 696 | 696 | { |
| 697 | 697 | echo $term->get_error_message(); |
| 698 | - } |
|
| 699 | - else |
|
| 698 | + } else |
|
| 700 | 699 | { |
| 701 | 700 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
| 702 | 701 | } |
| 703 | - } |
|
| 704 | - else |
|
| 702 | + } else |
|
| 705 | 703 | { |
| 706 | 704 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
| 707 | 705 | } |
| 708 | - } |
|
| 709 | - else |
|
| 706 | + } else |
|
| 710 | 707 | { |
| 711 | 708 | $result[]=trim($k); |
| 712 | 709 | } |
@@ -720,10 +717,8 @@ discard block |
||
| 720 | 717 | { |
| 721 | 718 | if(false !== $parent){ $parent = array('parent'=>$parent); } |
| 722 | 719 | $term = wp_insert_term(trim($name), $taxonomy,$parent); |
| 723 | - if ( is_wp_error($term) ){echo $term->get_error_message();} |
|
| 724 | - else { wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); } |
|
| 725 | - } |
|
| 726 | - else |
|
| 720 | + if ( is_wp_error($term) ){echo $term->get_error_message();} else { wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); } |
|
| 721 | + } else |
|
| 727 | 722 | { |
| 728 | 723 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
| 729 | 724 | } |
@@ -743,7 +738,7 @@ discard block |
||
| 743 | 738 | foreach($terms as $term){ |
| 744 | 739 | $return .= '<li><input class="'.$taxonomy.'" '.$this->checked($selected,$term->term_id,false).' type="checkbox" value="'.$term->term_id.'" /> '.$term->name.'</li>'; |
| 745 | 740 | } |
| 746 | - }else{ |
|
| 741 | + } else{ |
|
| 747 | 742 | $return .= '<li><input type="checkbox" value="" /> '.__('None','wetu-importer').'</li>'; |
| 748 | 743 | } |
| 749 | 744 | $return .= '</ul>'; |
@@ -762,13 +757,13 @@ discard block |
||
| 762 | 757 | |
| 763 | 758 | if(isset($data[0]['position']['driving_latitude'])){ |
| 764 | 759 | $latitude = $data[0]['position']['driving_latitude']; |
| 765 | - }elseif(isset($data[0]['position']['latitude'])){ |
|
| 760 | + } elseif(isset($data[0]['position']['latitude'])){ |
|
| 766 | 761 | $latitude = $data[0]['position']['latitude']; |
| 767 | 762 | } |
| 768 | 763 | |
| 769 | 764 | if(isset($data[0]['position']['driving_longitude'])){ |
| 770 | 765 | $longitude = $data[0]['position']['driving_longitude']; |
| 771 | - }elseif(isset($data[0]['position']['longitude'])){ |
|
| 766 | + } elseif(isset($data[0]['position']['longitude'])){ |
|
| 772 | 767 | $longitude = $data[0]['position']['longitude']; |
| 773 | 768 | } |
| 774 | 769 | |
@@ -800,7 +795,7 @@ discard block |
||
| 800 | 795 | if(false !== $id && '0' !== $id){ |
| 801 | 796 | $prev = get_post_meta($id,'location',true); |
| 802 | 797 | update_post_meta($id,'location',$location_data,$prev); |
| 803 | - }else{ |
|
| 798 | + } else{ |
|
| 804 | 799 | add_post_meta($id,'location',$location_data,true); |
| 805 | 800 | } |
| 806 | 801 | } |
@@ -816,7 +811,7 @@ discard block |
||
| 816 | 811 | if('tour' === $this->tab_slug){ |
| 817 | 812 | $key = array_rand($data[0]['content']['images']); |
| 818 | 813 | $this->featured_image = $this->attach_image($data[0]['content']['images'][$key],$id); |
| 819 | - }else{ |
|
| 814 | + } else{ |
|
| 820 | 815 | $this->featured_image = $this->attach_image($data[0]['content']['images'][0],$id); |
| 821 | 816 | } |
| 822 | 817 | |
@@ -840,7 +835,7 @@ discard block |
||
| 840 | 835 | if(is_array($data[0]['content']['images']) && !empty($data[0]['content']['images'])){ |
| 841 | 836 | if(isset($data[0]['destination_image']) && is_array($data[0]['destination_image'])) { |
| 842 | 837 | $temp_banner = $this->attach_image($data[0]['destination_image'], $id, array('width' => '1920', 'height' => '600', 'cropping' => 'c')); |
| 843 | - }else{ |
|
| 838 | + } else{ |
|
| 844 | 839 | if ('tour' === $this->tab_slug) { |
| 845 | 840 | $key = array_rand($data[0]['content']['images']); |
| 846 | 841 | $temp_banner = $this->attach_image($data[0]['content']['images'][$key], $id, array('width' => '1920', 'height' => '600', 'cropping' => 'c')); |
@@ -1016,8 +1011,7 @@ discard block |
||
| 1016 | 1011 | if ( !empty( $filename) && " " != $filename ) |
| 1017 | 1012 | { |
| 1018 | 1013 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension |
| 1019 | - } |
|
| 1020 | - else |
|
| 1014 | + } else |
|
| 1021 | 1015 | { |
| 1022 | 1016 | $file_array['name'] = $url_filename; // just use original URL filename |
| 1023 | 1017 | } |
@@ -1098,7 +1092,7 @@ discard block |
||
| 1098 | 1092 | } |
| 1099 | 1093 | if(false !== $found && $needle_count === count($found)){ |
| 1100 | 1094 | return true; |
| 1101 | - }else{ |
|
| 1095 | + } else{ |
|
| 1102 | 1096 | return false; |
| 1103 | 1097 | } |
| 1104 | 1098 | } |