@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | foreach($accommodation as $row_key => $row){ |
94 | 94 | if(stripos(ltrim(rtrim($row->name)), $post->post_title) !== false){ |
95 | 95 | $identifier = $row->id; |
96 | - }else{ |
|
96 | + } else{ |
|
97 | 97 | continue; |
98 | 98 | } |
99 | 99 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | //remove the extra accommodation |
197 | 197 | if(null !== $current_accommodation && !empty($current_accommodation)){ |
198 | 198 | $all_accommodation = array_diff($this->format_array($all_accommodation,'ID'), $this->format_array($current_accommodation,'post_id')); |
199 | - }elseif(null !== $current_accommodation && empty($current_accommodation)){ |
|
199 | + } elseif(null !== $current_accommodation && empty($current_accommodation)){ |
|
200 | 200 | $all_accommodation = $this->format_array($current_accommodation,'post_id'); |
201 | 201 | } |
202 | 202 |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | delete_post_meta($_POST['post_id'],'image_group'); |
187 | 187 | add_post_meta($_POST['post_id'],'image_group',$new_banner_array,true); |
188 | 188 | echo true; |
189 | - }else{ |
|
189 | + } else{ |
|
190 | 190 | echo false; |
191 | 191 | } |
192 | 192 | |
193 | - }else{ |
|
193 | + } else{ |
|
194 | 194 | echo false; |
195 | 195 | } |
196 | 196 | die(); |
@@ -250,8 +250,7 @@ discard block |
||
250 | 250 | if ( !empty( $filename) && " " != $filename ) |
251 | 251 | { |
252 | 252 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension |
253 | - } |
|
254 | - else |
|
253 | + } else |
|
255 | 254 | { |
256 | 255 | $file_array['name'] = $url_filename; // just use original URL filename |
257 | 256 | } |
@@ -249,10 +249,10 @@ discard block |
||
249 | 249 | |
250 | 250 | if(true === $result){ |
251 | 251 | echo '<span style="color:green;">'.esc_attr('Connected','wetu-importer').'</span>'; |
252 | - }else{ |
|
252 | + } else{ |
|
253 | 253 | echo '<span style="color:red;">'.wp_kses_post($result).'</span>'; |
254 | 254 | } |
255 | - }else{ |
|
255 | + } else{ |
|
256 | 256 | echo '<span style="color:green;">'.esc_attr('Connected','wetu-importer').'</span>'; |
257 | 257 | } |
258 | 258 | echo '</h3></div>'; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | if(isset($tours['error'])){ |
269 | 269 | return $tours['error']; |
270 | - }elseif (isset($tours['itineraries']) && !empty($tours['itineraries'])) { |
|
270 | + } elseif (isset($tours['itineraries']) && !empty($tours['itineraries'])) { |
|
271 | 271 | set_transient('lsx_ti_tours',$tours['itineraries'],60*60*2); |
272 | 272 | return true; |
273 | 273 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | if(isset($_POST['keyword'] )) { |
316 | 316 | $keyphrases = $_POST['keyword']; |
317 | - }else{ |
|
317 | + } else{ |
|
318 | 318 | $keyphrases = array(0); |
319 | 319 | } |
320 | 320 | |
@@ -366,16 +366,16 @@ discard block |
||
366 | 366 | |
367 | 367 | if(0 !== $row['post_id']){ |
368 | 368 | continue; |
369 | - }else{ |
|
369 | + } else{ |
|
370 | 370 | $searched_items[sanitize_title($row['name']).'-'.$row['identifier']] = $this->format_row($row); |
371 | 371 | } |
372 | 372 | |
373 | 373 | |
374 | - }else{ |
|
374 | + } else{ |
|
375 | 375 | |
376 | 376 | if(0 === $row['post_id']){ |
377 | 377 | continue; |
378 | - }else{ |
|
378 | + } else{ |
|
379 | 379 | $current_status = get_post_status($row['post_id']); |
380 | 380 | if($current_status !== $post_status){ |
381 | 381 | continue; |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | } |
388 | 388 | |
389 | - }else{ |
|
389 | + } else{ |
|
390 | 390 | //Search through each keyword. |
391 | 391 | foreach($keyphrases as $keyphrase){ |
392 | 392 | |
@@ -455,14 +455,14 @@ discard block |
||
455 | 455 | $wetu_id = $_POST['wetu_id']; |
456 | 456 | if(isset($_POST['post_id'])){ |
457 | 457 | $post_id = $_POST['post_id']; |
458 | - }else{ |
|
458 | + } else{ |
|
459 | 459 | $post_id = 0; |
460 | 460 | } |
461 | 461 | |
462 | 462 | if(isset($_POST['content']) && is_array($_POST['content']) && !empty($_POST['content'])){ |
463 | 463 | $content = $_POST['content']; |
464 | 464 | add_option('wetu_importer_tour_settings',$content); |
465 | - }else{ |
|
465 | + } else{ |
|
466 | 466 | delete_option('wetu_importer_tour_settings'); |
467 | 467 | $content = false; |
468 | 468 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | |
503 | 503 | if(isset($data['description'])){ |
504 | 504 | $data_post_content = $data['description']; |
505 | - }elseif(isset($data['summary'])){ |
|
505 | + } elseif(isset($data['summary'])){ |
|
506 | 506 | $data_post_content = $data['summary']; |
507 | 507 | } |
508 | 508 | $post['post_content'] = $data_post_content; |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | $id = wp_update_post($post); |
516 | 516 | $prev_date = get_post_meta($id,'lsx_wetu_modified_date',true); |
517 | 517 | update_post_meta($id,'lsx_wetu_modified_date',strtotime($data['last_modified']),$prev_date); |
518 | - }else{ |
|
518 | + } else{ |
|
519 | 519 | |
520 | 520 | //Set the name |
521 | 521 | if(isset($data['name'])){ |
@@ -626,42 +626,42 @@ discard block |
||
626 | 626 | //Description |
627 | 627 | if(false !== $importable_content && in_array('itinerary_description',$importable_content) && isset($day['notes']) && '' !== $day['notes']){ |
628 | 628 | $current_day['description'] = strip_tags($day['notes']); |
629 | - }else{ |
|
629 | + } else{ |
|
630 | 630 | $current_day['description'] = ''; |
631 | 631 | } |
632 | 632 | |
633 | 633 | //Itinerary Gallery |
634 | 634 | if(false !== $importable_content && in_array('itinerary_gallery',$importable_content) && isset($day['images'])){ |
635 | 635 | $current_day['featured_image'] = ''; |
636 | - }else{ |
|
636 | + } else{ |
|
637 | 637 | $current_day['featured_image'] = ''; |
638 | 638 | } |
639 | 639 | |
640 | 640 | //Accommodation |
641 | 641 | if(false !== $current_accommodation){ |
642 | 642 | $current_day['accommodation_to_tour'] = array($current_accommodation); |
643 | - }else{ |
|
643 | + } else{ |
|
644 | 644 | $current_day['accommodation_to_tour'] = array(); |
645 | 645 | } |
646 | 646 | |
647 | 647 | //Destination |
648 | 648 | if(false !== $current_destination){ |
649 | 649 | $current_day['destination_to_tour'] = array($current_destination); |
650 | - }else{ |
|
650 | + } else{ |
|
651 | 651 | $current_day['destination_to_tour'] = array(); |
652 | 652 | } |
653 | 653 | |
654 | 654 | //Included |
655 | 655 | if(false !== $importable_content && in_array('itinerary_included',$importable_content) && isset($day['included']) && '' !== $day['included']){ |
656 | 656 | $current_day['included'] = strip_tags($day['included']); |
657 | - }else{ |
|
657 | + } else{ |
|
658 | 658 | $current_day['description'] = ''; |
659 | 659 | } |
660 | 660 | |
661 | 661 | //Excluded |
662 | 662 | if(false !== $importable_content && in_array('itinerary_excluded',$importable_content) && isset($day['excluded']) && '' !== $day['excluded']){ |
663 | 663 | $current_day['excluded'] = strip_tags($day['excluded']); |
664 | - }else{ |
|
664 | + } else{ |
|
665 | 665 | $current_day['excluded'] = ''; |
666 | 666 | } |
667 | 667 | |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | $day_counter++; |
670 | 670 | } |
671 | 671 | |
672 | - }else{ |
|
672 | + } else{ |
|
673 | 673 | $day_counter = $day_counter + (int)$leg['nights']; |
674 | 674 | } |
675 | 675 | |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | |
770 | 770 | if(false !== $this->current_accommodation && !empty($this->current_accommodation) && array_key_exists($day['content_entity_id'],$this->current_accommodation)){ |
771 | 771 | $ac_id = $this->current_accommodation[$day['content_entity_id']]; |
772 | - }else{ |
|
772 | + } else{ |
|
773 | 773 | $ac_id = wp_insert_post(array( |
774 | 774 | 'post_type' => 'accommodation', |
775 | 775 | 'post_status' => 'draft', |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | $this->set_country($country_wetu_id, $id); |
837 | 837 | } |
838 | 838 | |
839 | - }else { |
|
839 | + } else { |
|
840 | 840 | |
841 | 841 | $destination_json = file_get_contents("http://wetu.com/API/Pins/".$this->api_key."/Get?ids=" . $day['destination_content_entity_id']); |
842 | 842 |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | |
316 | 316 | if(isset($accommodation['error'])){ |
317 | 317 | return $accommodation['error']; |
318 | - }elseif (isset($accommodation) && !empty($accommodation)) { |
|
318 | + } elseif (isset($accommodation) && !empty($accommodation)) { |
|
319 | 319 | set_transient('lsx_ti_accommodation',$accommodation,60*60*2); |
320 | 320 | return true; |
321 | 321 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | if(isset($_POST['keyword'] )) { |
363 | 363 | $keyphrases = $_POST['keyword']; |
364 | - }else{ |
|
364 | + } else{ |
|
365 | 365 | $keyphrases = array(0); |
366 | 366 | } |
367 | 367 | |
@@ -406,16 +406,16 @@ discard block |
||
406 | 406 | |
407 | 407 | if(0 !== $row['post_id']){ |
408 | 408 | continue; |
409 | - }else{ |
|
409 | + } else{ |
|
410 | 410 | $searched_items[sanitize_title($row['name']).'-'.$row['id']] = $this->format_row($row); |
411 | 411 | } |
412 | 412 | |
413 | 413 | |
414 | - }else{ |
|
414 | + } else{ |
|
415 | 415 | |
416 | 416 | if(0 === $row['post_id']){ |
417 | 417 | continue; |
418 | - }else{ |
|
418 | + } else{ |
|
419 | 419 | $current_status = get_post_status($row['post_id']); |
420 | 420 | if($current_status !== $post_status){ |
421 | 421 | continue; |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | $searched_items[sanitize_title($row['name']).'-'.$row['id']] = $this->format_row($row); |
426 | 426 | } |
427 | 427 | |
428 | - }else{ |
|
428 | + } else{ |
|
429 | 429 | //Search through each keyword. |
430 | 430 | foreach($keyphrases as $keyphrase){ |
431 | 431 | |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | } |
468 | 468 | if(false !== $found && $needle_count === count($found)){ |
469 | 469 | return true; |
470 | - }else{ |
|
470 | + } else{ |
|
471 | 471 | return false; |
472 | 472 | } |
473 | 473 | } |
@@ -513,26 +513,26 @@ discard block |
||
513 | 513 | $wetu_id = $_POST['wetu_id']; |
514 | 514 | if(isset($_POST['post_id'])){ |
515 | 515 | $post_id = $_POST['post_id']; |
516 | - }else{ |
|
516 | + } else{ |
|
517 | 517 | $post_id = 0; |
518 | 518 | } |
519 | 519 | |
520 | 520 | if(isset($_POST['team_members'])){ |
521 | 521 | $team_members = $_POST['team_members']; |
522 | - }else{ |
|
522 | + } else{ |
|
523 | 523 | $team_members = false; |
524 | 524 | } |
525 | 525 | |
526 | 526 | if(isset($_POST['safari_brands'])){ |
527 | 527 | $safari_brands = $_POST['safari_brands']; |
528 | - }else{ |
|
528 | + } else{ |
|
529 | 529 | $safari_brands = false; |
530 | 530 | } |
531 | 531 | |
532 | 532 | if(isset($_POST['content']) && is_array($_POST['content']) && !empty($_POST['content'])){ |
533 | 533 | $content = $_POST['content']; |
534 | 534 | add_option('wetu_importer_accommodation_settings',$content); |
535 | - }else{ |
|
535 | + } else{ |
|
536 | 536 | delete_option('wetu_importer_accommodation_settings'); |
537 | 537 | $content = false; |
538 | 538 | } |
@@ -577,10 +577,10 @@ discard block |
||
577 | 577 | if(isset($data[0]['content']['extended_description'])) |
578 | 578 | { |
579 | 579 | $data_post_content = $data[0]['content']['extended_description']; |
580 | - }elseif(isset($data[0]['content']['general_description'])){ |
|
580 | + } elseif(isset($data[0]['content']['general_description'])){ |
|
581 | 581 | $data_post_content = $data[0]['content']['general_description']; |
582 | 582 | $content_used_general_description = true; |
583 | - }elseif(isset($data[0]['content']['teaser_description'])){ |
|
583 | + } elseif(isset($data[0]['content']['teaser_description'])){ |
|
584 | 584 | $data_post_content = $data[0]['content']['teaser_description']; |
585 | 585 | } |
586 | 586 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
591 | 591 | if(isset($data[0]['content']['teaser_description'])){ |
592 | 592 | $data_post_excerpt = $data[0]['content']['teaser_description']; |
593 | - }elseif(isset($data[0]['content']['general_description']) && false === $content_used_general_description){ |
|
593 | + } elseif(isset($data[0]['content']['general_description']) && false === $content_used_general_description){ |
|
594 | 594 | $data_post_excerpt = $data[0]['content']['general_description']; |
595 | 595 | } |
596 | 596 | $post['post_excerpt'] = $data_post_excerpt; |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $id = wp_update_post($post); |
607 | 607 | $prev_date = get_post_meta($id,'lsx_wetu_modified_date',true); |
608 | 608 | update_post_meta($id,'lsx_wetu_modified_date',strtotime($data[0]['last_modified']),$prev_date); |
609 | - }else{ |
|
609 | + } else{ |
|
610 | 610 | |
611 | 611 | //Set the name |
612 | 612 | if(isset($data[0]['name'])){ |
@@ -738,13 +738,13 @@ discard block |
||
738 | 738 | |
739 | 739 | if(isset($data[0]['position']['driving_latitude'])){ |
740 | 740 | $latitude = $data[0]['position']['driving_latitude']; |
741 | - }elseif(isset($data[0]['position']['latitude'])){ |
|
741 | + } elseif(isset($data[0]['position']['latitude'])){ |
|
742 | 742 | $latitude = $data[0]['position']['latitude']; |
743 | 743 | } |
744 | 744 | |
745 | 745 | if(isset($data[0]['position']['driving_longitude'])){ |
746 | 746 | $longitude = $data[0]['position']['driving_longitude']; |
747 | - }elseif(isset($data[0]['position']['longitude'])){ |
|
747 | + } elseif(isset($data[0]['position']['longitude'])){ |
|
748 | 748 | $longitude = $data[0]['position']['longitude']; |
749 | 749 | } |
750 | 750 | |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | if(false !== $id && '0' !== $id){ |
778 | 778 | $prev = get_post_meta($id,'location',true); |
779 | 779 | update_post_meta($id,'location',$location_data,$prev); |
780 | - }else{ |
|
780 | + } else{ |
|
781 | 781 | add_post_meta($id,'location',$location_data,true); |
782 | 782 | } |
783 | 783 | } |
@@ -797,12 +797,10 @@ discard block |
||
797 | 797 | $term = wp_insert_term(trim($data[0]['position']['country']), 'location'); |
798 | 798 | if ( is_wp_error($term) ){ |
799 | 799 | echo $term->get_error_message(); |
800 | - } |
|
801 | - else { |
|
800 | + } else { |
|
802 | 801 | wp_set_object_terms( $id, intval($term['term_id']), 'location',true); |
803 | 802 | } |
804 | - } |
|
805 | - else |
|
803 | + } else |
|
806 | 804 | { |
807 | 805 | wp_set_object_terms( $id, intval($term['term_id']), 'location',true); |
808 | 806 | } |
@@ -815,10 +813,8 @@ discard block |
||
815 | 813 | if(!$term = term_exists(trim($data[0]['position']['destination']), 'location')) |
816 | 814 | { |
817 | 815 | $term = wp_insert_term(trim($data[0]['position']['destination']), 'location', $tax_args); |
818 | - if ( is_wp_error($term) ){echo $term->get_error_message();} |
|
819 | - else { wp_set_object_terms( $id, intval($term['term_id']), 'location',true); } |
|
820 | - } |
|
821 | - else |
|
816 | + if ( is_wp_error($term) ){echo $term->get_error_message();} else { wp_set_object_terms( $id, intval($term['term_id']), 'location',true); } |
|
817 | + } else |
|
822 | 818 | { |
823 | 819 | wp_set_object_terms( $id, intval($term['term_id']), 'location',true); |
824 | 820 | } |
@@ -866,10 +862,8 @@ discard block |
||
866 | 862 | if(!$term = term_exists(trim($data[0]['category']), 'accommodation-type')) |
867 | 863 | { |
868 | 864 | $term = wp_insert_term(trim($data[0]['category']), 'accommodation-type'); |
869 | - if ( is_wp_error($term) ){echo $term->get_error_message();} |
|
870 | - else { wp_set_object_terms( $id, intval($term['term_id']), 'accommodation-type',true); } |
|
871 | - } |
|
872 | - else |
|
865 | + if ( is_wp_error($term) ){echo $term->get_error_message();} else { wp_set_object_terms( $id, intval($term['term_id']), 'accommodation-type',true); } |
|
866 | + } else |
|
873 | 867 | { |
874 | 868 | wp_set_object_terms( $id, intval($term['term_id']), 'accommodation-type',true); |
875 | 869 | } |
@@ -928,14 +922,14 @@ discard block |
||
928 | 922 | |
929 | 923 | if(isset($data[0]['features']) && isset($data[0]['features']['rooms'])){ |
930 | 924 | $room_count = $data[0]['features']['rooms']; |
931 | - }else{ |
|
925 | + } else{ |
|
932 | 926 | $room_count = count($data[0]['rooms']); |
933 | 927 | } |
934 | 928 | |
935 | 929 | if(false !== $id && '0' !== $id){ |
936 | 930 | $prev_rooms = get_post_meta($id,'number_of_rooms',true); |
937 | 931 | update_post_meta($id,'number_of_rooms',$room_count,$prev_rooms); |
938 | - }else{ |
|
932 | + } else{ |
|
939 | 933 | add_post_meta($id,'number_of_rooms',$room_count,true); |
940 | 934 | } |
941 | 935 | } |
@@ -948,7 +942,7 @@ discard block |
||
948 | 942 | |
949 | 943 | if(!empty($data[0]['features']) && isset($data[0]['features']['star_authority'])){ |
950 | 944 | $rating_type = $data[0]['features']['star_authority']; |
951 | - }else{ |
|
945 | + } else{ |
|
952 | 946 | $rating_type = 'Unspecified2'; |
953 | 947 | } |
954 | 948 | $this->save_custom_field($rating_type,'rating_type',$id); |
@@ -1078,10 +1072,8 @@ discard block |
||
1078 | 1072 | { |
1079 | 1073 | if(false !== $parent){ $parent = array('parent'=>$parent); } |
1080 | 1074 | $term = wp_insert_term(trim($name), $taxonomy,$parent); |
1081 | - if ( is_wp_error($term) ){echo $term->get_error_message();} |
|
1082 | - else { wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); } |
|
1083 | - } |
|
1084 | - else |
|
1075 | + if ( is_wp_error($term) ){echo $term->get_error_message();} else { wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); } |
|
1076 | + } else |
|
1085 | 1077 | { |
1086 | 1078 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
1087 | 1079 | } |
@@ -1242,8 +1234,7 @@ discard block |
||
1242 | 1234 | if ( !empty( $filename) && " " != $filename ) |
1243 | 1235 | { |
1244 | 1236 | $file_array['name'] = $filename . "." . $url_type['ext']; // user given filename for title, add original URL extension |
1245 | - } |
|
1246 | - else |
|
1237 | + } else |
|
1247 | 1238 | { |
1248 | 1239 | $file_array['name'] = $url_filename; // just use original URL filename |
1249 | 1240 | } |
@@ -161,18 +161,15 @@ discard block |
||
161 | 161 | if ( is_wp_error($term) ) |
162 | 162 | { |
163 | 163 | echo $term->get_error_message(); |
164 | - } |
|
165 | - else |
|
164 | + } else |
|
166 | 165 | { |
167 | 166 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
168 | 167 | } |
169 | - } |
|
170 | - else |
|
168 | + } else |
|
171 | 169 | { |
172 | 170 | wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true); |
173 | 171 | } |
174 | - } |
|
175 | - else |
|
172 | + } else |
|
176 | 173 | { |
177 | 174 | $result[]=trim($k); |
178 | 175 | } |
@@ -199,7 +196,7 @@ discard block |
||
199 | 196 | foreach($team_members->posts as $member){ ?> |
200 | 197 | <li><input class="team" <?php $this->checked($selected,$member); ?> type="checkbox" value="<?php echo $member; ?>" /> <?php echo get_the_title($member); ?></li> |
201 | 198 | <?php } |
202 | - }else{ ?> |
|
199 | + } else{ ?> |
|
203 | 200 | <li><input class="team" type="checkbox" value="0" /> <?php _e('None','wetu-importer'); ?></li> |
204 | 201 | <?php } |
205 | 202 | ?> |
@@ -220,7 +217,7 @@ discard block |
||
220 | 217 | foreach($terms as $term){ |
221 | 218 | $return .= '<li><input class="'.$taxonomy.'" '.$this->checked($selected,$term->term_id).' type="checkbox" value="'.$term->term_id.'" /> '.$term->name.'</li>'; |
222 | 219 | } |
223 | - }else{ |
|
220 | + } else{ |
|
224 | 221 | $return .= '<li><input type="checkbox" value="" /> '.__('None','wetu-importer').'</li>'; |
225 | 222 | } |
226 | 223 | $return .= '</ul>'; |
@@ -241,7 +238,7 @@ discard block |
||
241 | 238 | |
242 | 239 | if(false !== $id && '0' !== $id && false !== $prev && true === $unique){ |
243 | 240 | update_post_meta($id,$meta_key,$value,$prev); |
244 | - }else{ |
|
241 | + } else{ |
|
245 | 242 | add_post_meta($id,$meta_key,$value,$unique); |
246 | 243 | } |
247 | 244 | } |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | |
328 | 328 | if(isset($_POST['keyword'] )) { |
329 | 329 | $keyphrases = $_POST['keyword']; |
330 | - }else{ |
|
330 | + } else{ |
|
331 | 331 | $keyphrases = array(0); |
332 | 332 | } |
333 | 333 | |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | $searched_items[sanitize_title($row->name).'-'.$row->meta_value] = $this->format_row($row); |
366 | 366 | |
367 | 367 | |
368 | - }else{ |
|
368 | + } else{ |
|
369 | 369 | //Search through each keyword. |
370 | 370 | foreach($keyphrases as $keyphrase){ |
371 | 371 | |
@@ -434,13 +434,13 @@ discard block |
||
434 | 434 | $wetu_id = $_POST['wetu_id']; |
435 | 435 | if(isset($_POST['post_id'])){ |
436 | 436 | $post_id = $_POST['post_id']; |
437 | - }else{ |
|
437 | + } else{ |
|
438 | 438 | $post_id = 0; |
439 | 439 | } |
440 | 440 | |
441 | 441 | if(isset($_POST['team_members'])){ |
442 | 442 | $team_members = $_POST['team_members']; |
443 | - }else{ |
|
443 | + } else{ |
|
444 | 444 | $team_members = false; |
445 | 445 | } |
446 | 446 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $content = $_POST['content']; |
451 | 451 | delete_option('wetu_importer_destination_settings'); |
452 | 452 | add_option('wetu_importer_destination_settings',$content); |
453 | - }else{ |
|
453 | + } else{ |
|
454 | 454 | delete_option('wetu_importer_destination_settings'); |
455 | 455 | $content = false; |
456 | 456 | } |
@@ -490,10 +490,10 @@ discard block |
||
490 | 490 | if(isset($data[0]['content']['extended_description'])) |
491 | 491 | { |
492 | 492 | $data_post_content = $data[0]['content']['extended_description']; |
493 | - }elseif(isset($data[0]['content']['general_description'])){ |
|
493 | + } elseif(isset($data[0]['content']['general_description'])){ |
|
494 | 494 | $data_post_content = $data[0]['content']['general_description']; |
495 | 495 | $content_used_general_description = true; |
496 | - }elseif(isset($data[0]['content']['teaser_description'])){ |
|
496 | + } elseif(isset($data[0]['content']['teaser_description'])){ |
|
497 | 497 | $data_post_content = $data[0]['content']['teaser_description']; |
498 | 498 | } |
499 | 499 | $post['post_content'] = wp_strip_all_tags($data_post_content); |
@@ -503,9 +503,9 @@ discard block |
||
503 | 503 | if(false !== $importable_content && in_array('excerpt',$importable_content)){ |
504 | 504 | if(isset($data[0]['content']['teaser_description'])){ |
505 | 505 | $data_post_excerpt = $data[0]['content']['teaser_description']; |
506 | - }elseif(isset($data[0]['content']['extended_description'])){ |
|
506 | + } elseif(isset($data[0]['content']['extended_description'])){ |
|
507 | 507 | $data_post_excerpt = $data[0]['content']['extended_description']; |
508 | - }elseif(isset($data[0]['content']['general_description']) && false === $content_used_general_description){ |
|
508 | + } elseif(isset($data[0]['content']['general_description']) && false === $content_used_general_description){ |
|
509 | 509 | $data_post_excerpt = $data[0]['content']['general_description']; |
510 | 510 | } |
511 | 511 | $post['post_excerpt'] = $data_post_excerpt; |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | $id = wp_update_post($post); |
522 | 522 | $prev_date = get_post_meta($id,'lsx_wetu_modified_date',true); |
523 | 523 | update_post_meta($id,'lsx_wetu_modified_date',strtotime($data[0]['last_modified']),$prev_date); |
524 | - }else{ |
|
524 | + } else{ |
|
525 | 525 | |
526 | 526 | //Set the name |
527 | 527 | if(isset($data[0]['name'])){ |
@@ -621,13 +621,13 @@ discard block |
||
621 | 621 | |
622 | 622 | if(isset($data[0]['position']['driving_latitude'])){ |
623 | 623 | $latitude = $data[0]['position']['driving_latitude']; |
624 | - }elseif(isset($data[0]['position']['latitude'])){ |
|
624 | + } elseif(isset($data[0]['position']['latitude'])){ |
|
625 | 625 | $latitude = $data[0]['position']['latitude']; |
626 | 626 | } |
627 | 627 | |
628 | 628 | if(isset($data[0]['position']['driving_longitude'])){ |
629 | 629 | $longitude = $data[0]['position']['driving_longitude']; |
630 | - }elseif(isset($data[0]['position']['longitude'])){ |
|
630 | + } elseif(isset($data[0]['position']['longitude'])){ |
|
631 | 631 | $longitude = $data[0]['position']['longitude']; |
632 | 632 | } |
633 | 633 | |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | if(false !== $id && '0' !== $id){ |
661 | 661 | $prev = get_post_meta($id,'location',true); |
662 | 662 | update_post_meta($id,'location',$location_data,$prev); |
663 | - }else{ |
|
663 | + } else{ |
|
664 | 664 | add_post_meta($id,'location',$location_data,true); |
665 | 665 | } |
666 | 666 | } |