Completed
Push — master ( 4f6f4e...0094c4 )
by Warwick
02:24
created
classes/class-tours.php 1 patch
Braces   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
 			if(true === $result){
257 257
 			    echo '<span style="color:green;">'.esc_attr('Connected','wetu-importer').'</span>';
258 258
                 echo ' - <small><a href="#">'.esc_attr('Refresh','wetu-importer').'</a></small>';
259
-            }else{
259
+            } else{
260 260
 			    echo '<span style="color:red;">'.wp_kses_post($result).'</span>';
261 261
             }
262
-		}else{
262
+		} else{
263 263
 			echo '<span style="color:green;">'.esc_attr('Connected','wetu-importer').'</span> - <small><a href="#">'.esc_attr('Refresh','wetu-importer').'</a></small>';
264 264
         }
265 265
 		echo '</h3>';
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 
321 321
 		if(isset($tours['error'])){
322 322
 		    return $tours['error'];
323
-        }elseif (isset($tours['itineraries']) && !empty($tours['itineraries'])) {
323
+        } elseif (isset($tours['itineraries']) && !empty($tours['itineraries'])) {
324 324
 			set_transient('lsx_ti_tours',$tours['itineraries'],60*60*2);
325 325
 			return true;
326 326
 		}
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 
370 370
 				if(isset($_POST['keyword'] )) {
371 371
 					$keyphrases = $_POST['keyword'];
372
-				}else{
372
+				} else{
373 373
 					$keyphrases = array(0);
374 374
 				}
375 375
 
@@ -421,16 +421,16 @@  discard block
 block discarded – undo
421 421
 
422 422
 								if(0 !== $row['post_id']){
423 423
 									continue;
424
-								}else{
424
+								} else{
425 425
 									$searched_items[sanitize_title($row['name']).'-'.$row['identifier']] = $this->format_row($row);
426 426
 								}
427 427
 
428 428
 
429
-							}else{
429
+							} else{
430 430
 
431 431
 								if(0 === $row['post_id']){
432 432
 									continue;
433
-								}else{
433
+								} else{
434 434
 									$current_status = get_post_status($row['post_id']);
435 435
 									if($current_status !== $post_status){
436 436
 										continue;
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 
442 442
 							}
443 443
 
444
-						}else{
444
+						} else{
445 445
 							//Search through each keyword.
446 446
 							foreach($keyphrases as $keyphrase){
447 447
 
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 			$wetu_id = $_POST['wetu_id'];
512 512
 			if(isset($_POST['post_id'])){
513 513
 				$post_id = $_POST['post_id'];	
514
-			}else{
514
+			} else{
515 515
 				$post_id = 0;
516 516
 			}
517 517
 
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 			if(isset($_POST['content']) && is_array($_POST['content']) && !empty($_POST['content'])){
520 520
 				$content = $_POST['content'];
521 521
 				add_option('wetu_importer_tour_settings',$content);
522
-			}else{
522
+			} else{
523 523
 				$content = false;
524 524
 			}
525 525
 
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 
559 559
             if(isset($data['description'])){
560 560
                 $data_post_content = $data['description'];
561
-            }elseif(isset($data['summary'])){
561
+            } elseif(isset($data['summary'])){
562 562
                 $data_post_content = $data['summary'];
563 563
             }
564 564
             $post['post_content'] = $data_post_content;
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
             $id = wp_update_post($post);
572 572
             $prev_date = get_post_meta($id,'lsx_wetu_modified_date',true);
573 573
             update_post_meta($id,'lsx_wetu_modified_date',strtotime($data['last_modified']),$prev_date);
574
-        }else{
574
+        } else{
575 575
 
576 576
             //Set the name
577 577
             if(isset($data['name'])){
@@ -662,42 +662,42 @@  discard block
 block discarded – undo
662 662
 						//Description
663 663
 						if(false !== $importable_content && in_array('itinerary_description',$importable_content) && isset($day['notes'])){
664 664
 							$current_day['description'] = $day['notes'];
665
-						}else{
665
+						} else{
666 666
 							$current_day['description'] = '';
667 667
 						}
668 668
 
669 669
 						//Itinerary Gallery
670 670
 						if(false !== $importable_content && in_array('itinerary_gallery',$importable_content) && isset($day['images'])){
671 671
 							$current_day['featured_image'] = '';
672
-						}else{
672
+						} else{
673 673
 							$current_day['featured_image'] = '';
674 674
 						}
675 675
 
676 676
 						//Accommodation
677 677
 						if(false !== $current_accommodation){
678 678
 							$current_day['accommodation_to_tour'] = array($current_accommodation);
679
-						}else{
679
+						} else{
680 680
 							$current_day['accommodation_to_tour'] = array();
681 681
 						}
682 682
 
683 683
 						//Destination
684 684
 						if(false !== $current_destination){
685 685
 							$current_day['destination_to_tour'] = array($current_destination);
686
-						}else{
686
+						} else{
687 687
 							$current_day['destination_to_tour'] = array();
688 688
 						}
689 689
 
690 690
 						//Included
691 691
 						if(false !== $importable_content && in_array('itinerary_included',$importable_content) && isset($day['included']) && '' !== $day['included']){
692 692
 							$current_day['included'] = $day['included'];
693
-						}else{
693
+						} else{
694 694
 							$current_day['included'] = '';
695 695
 						}
696 696
 
697 697
 						//Excluded
698 698
 						if(false !== $importable_content && in_array('itinerary_excluded',$importable_content) && isset($day['excluded']) && '' !== $day['excluded']){
699 699
 							$current_day['excluded'] = $day['excluded'];
700
-						}else{
700
+						} else{
701 701
 							$current_day['excluded'] = '';
702 702
 						}
703 703
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
 						$day_counter++;
706 706
 					}
707 707
 
708
-				}else{
708
+				} else{
709 709
 					$day_counter = $day_counter + (int)$leg['nights'];
710 710
 				}
711 711
 
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
 
819 819
 			if(false !== $this->current_accommodation && !empty($this->current_accommodation) && array_key_exists($day['content_entity_id'],$this->current_accommodation)){
820 820
                 $ac_id = $this->current_accommodation[$day['content_entity_id']];
821
-			}else{
821
+			} else{
822 822
 				$ac_id = wp_insert_post(array(
823 823
                     'post_type' => 'accommodation',
824 824
                     'post_status' => 'draft',
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 					$country_id = $this->set_country($country_wetu_id, $id);
887 887
                 }
888 888
 
889
-			}else {
889
+			} else {
890 890
 
891 891
 				$destination_json = file_get_contents("http://wetu.com/API/Pins/".$this->api_key."/Get?ids=" . $day['destination_content_entity_id']);
892 892
 
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
 				if(0 !== $country_id && false !== $country_id){
941 941
                     $this->relation_meta[$dest_id] = $country_id;
942 942
 					$this->relation_meta[$country_id] = 0;
943
-                }else{
943
+                } else{
944 944
 					$this->relation_meta[$dest_id] = 0;
945 945
                 }
946 946
 			}
Please login to merge, or discard this patch.