Completed
Push — master ( 8a71c5...21aee9 )
by Warwick
02:52
created
classes/class-connect-accommodation.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
classes/lsx-banners-integration.php 1 patch
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
classes/class-accommodation.php 1 patch
Braces   +30 added lines, -39 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
classes/class-destination.php 1 patch
Braces   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
classes/class-admin.php 1 patch
Braces   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -162,18 +162,15 @@  discard block
 block discarded – undo
162 162
                         if ( is_wp_error($term) )
163 163
                         {
164 164
                             echo $term->get_error_message();
165
-                        }
166
-                        else
165
+                        } else
167 166
                         {
168 167
                             wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true);
169 168
                         }
170
-                    }
171
-                    else
169
+                    } else
172 170
                     {
173 171
                         wp_set_object_terms( $id, intval($term['term_id']), $taxonomy,true);
174 172
                     }
175
-                }
176
-                else
173
+                } else
177 174
                 {
178 175
                     $result[]=trim($k);
179 176
                 }
@@ -200,7 +197,7 @@  discard block
 block discarded – undo
200 197
     						foreach($team_members->posts as $member){ ?>
201 198
     							<li><input class="team" <?php $this->checked($selected,$member); ?> type="checkbox" value="<?php echo $member; ?>" /> <?php echo get_the_title($member); ?></li>
202 199
     						<?php }
203
-    					}else{ ?>
200
+    					} else{ ?>
204 201
     							<li><input class="team" type="checkbox" value="0" /> <?php _e('None','wetu-importer'); ?></li>
205 202
     					<?php }
206 203
     				?>
@@ -221,7 +218,7 @@  discard block
 block discarded – undo
221 218
 				foreach($terms as $term){
222 219
 					$return .= '<li><input class="'.$taxonomy.'" '.$this->checked($selected,$term->term_id,false).' type="checkbox" value="'.$term->term_id.'" /> '.$term->name.'</li>';
223 220
 				}
224
-			}else{
221
+			} else{
225 222
 				$return .= '<li><input type="checkbox" value="" /> '.__('None','wetu-importer').'</li>';
226 223
 			}
227 224
 			$return .= '</ul>';
@@ -242,7 +239,7 @@  discard block
 block discarded – undo
242 239
 
243 240
 			if(false !== $id && '0' !== $id && false !== $prev && true === $unique){
244 241
 				update_post_meta($id,$meta_key,$value,$prev);
245
-			}else{
242
+			} else{
246 243
 				add_post_meta($id,$meta_key,$value,$unique);
247 244
 			}
248 245
 		}
@@ -329,7 +326,7 @@  discard block
 block discarded – undo
329 326
 			if (in_array($needle, $haystack)) {
330 327
 			    if(true === $wrap || 'true' === $wrap) {
331 328
 					$html = $type . '"' . $type . '"';
332
-				}else{
329
+				} else{
333 330
 					$html = $type;
334 331
                 }
335 332
 			}
Please login to merge, or discard this patch.
classes/class-tours.php 1 patch
Braces   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
 			    if(!isset($_GET['refresh_tours'])){
254 254
 			        echo ' - <small><a href="'.admin_url('admin.php').'?page='.$this->plugin_slug.'&tab=tour&refresh_tours=true">'.esc_attr('Refresh','wetu-importer').'</a></small>';
255 255
                 }
256
-            }else{
256
+            } else{
257 257
 			    echo '<span style="color:red;">'.wp_kses_post($result).'</span>';
258 258
             }
259
-		}else{
259
+		} else{
260 260
 			echo '<span style="color:green;">'.esc_attr('Connected','wetu-importer').'</span> - <small><a href="'.admin_url('admin.php').'?page='.$this->plugin_slug.'&tab=tour&refresh_tours=true">'.esc_attr('Refresh','wetu-importer').'</a></small>';
261 261
         }
262 262
 		echo '</h3></div>';
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
 		if(isset($tours['error'])){
273 273
 		    return $tours['error'];
274
-        }elseif (isset($tours['itineraries']) && !empty($tours['itineraries'])) {
274
+        } elseif (isset($tours['itineraries']) && !empty($tours['itineraries'])) {
275 275
 			set_transient('lsx_ti_tours',$tours['itineraries'],60*60*2);
276 276
 			return true;
277 277
 		}
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 				if(isset($_POST['keyword'] )) {
320 320
 					$keyphrases = $_POST['keyword'];
321
-				}else{
321
+				} else{
322 322
 					$keyphrases = array(0);
323 323
                 }
324 324
 
@@ -370,16 +370,16 @@  discard block
 block discarded – undo
370 370
 
371 371
 								if(0 !== $row['post_id']){
372 372
 								    continue;
373
-								}else{
373
+								} else{
374 374
 									$searched_items[sanitize_title($row['name']).'-'.$row['identifier']] = $this->format_row($row);
375 375
                                 }
376 376
 
377 377
 
378
-                            }else{
378
+                            } else{
379 379
 
380 380
 								if(0 === $row['post_id']){
381 381
 									continue;
382
-								}else{
382
+								} else{
383 383
 									$current_status = get_post_status($row['post_id']);
384 384
 									if($current_status !== $post_status){
385 385
 									    continue;
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
                             }
392 392
 
393
-                        }else{
393
+                        } else{
394 394
 							//Search through each keyword.
395 395
 							foreach($keyphrases as $keyphrase){
396 396
 
@@ -459,14 +459,14 @@  discard block
 block discarded – undo
459 459
 			$wetu_id = $_POST['wetu_id'];
460 460
 			if(isset($_POST['post_id'])){
461 461
 				$post_id = $_POST['post_id'];	
462
-			}else{
462
+			} else{
463 463
 				$post_id = 0;
464 464
 			}
465 465
 
466 466
 			if(isset($_POST['content']) && is_array($_POST['content']) && !empty($_POST['content'])){
467 467
 				$content = $_POST['content'];
468 468
 				add_option('wetu_importer_tour_settings',$content);
469
-			}else{
469
+			} else{
470 470
 				delete_option('wetu_importer_tour_settings');
471 471
 				$content = false;
472 472
 			}
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 
508 508
             if(isset($data['description'])){
509 509
                 $data_post_content = $data['description'];
510
-            }elseif(isset($data['summary'])){
510
+            } elseif(isset($data['summary'])){
511 511
                 $data_post_content = $data['summary'];
512 512
             }
513 513
             $post['post_content'] = $data_post_content;
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             $id = wp_update_post($post);
521 521
             $prev_date = get_post_meta($id,'lsx_wetu_modified_date',true);
522 522
             update_post_meta($id,'lsx_wetu_modified_date',strtotime($data['last_modified']),$prev_date);
523
-        }else{
523
+        } else{
524 524
 
525 525
             //Set the name
526 526
             if(isset($data['name'])){
@@ -633,42 +633,42 @@  discard block
 block discarded – undo
633 633
 						//Description
634 634
 						if(false !== $importable_content && in_array('itinerary_description',$importable_content) && isset($day['notes'])){
635 635
 							$current_day['description'] = $day['notes'];
636
-						}else{
636
+						} else{
637 637
 							$current_day['description'] = '';
638 638
 						}
639 639
 
640 640
 						//Itinerary Gallery
641 641
 						if(false !== $importable_content && in_array('itinerary_gallery',$importable_content) && isset($day['images'])){
642 642
 							$current_day['featured_image'] = '';
643
-						}else{
643
+						} else{
644 644
 							$current_day['featured_image'] = '';
645 645
 						}
646 646
 
647 647
 						//Accommodation
648 648
 						if(false !== $current_accommodation){
649 649
 							$current_day['accommodation_to_tour'] = array($current_accommodation);
650
-						}else{
650
+						} else{
651 651
 							$current_day['accommodation_to_tour'] = array();
652 652
 						}
653 653
 
654 654
 						//Destination
655 655
 						if(false !== $current_destination){
656 656
 							$current_day['destination_to_tour'] = array($current_destination);
657
-						}else{
657
+						} else{
658 658
 							$current_day['destination_to_tour'] = array();
659 659
 						}
660 660
 
661 661
 						//Included
662 662
 						if(false !== $importable_content && in_array('itinerary_included',$importable_content) && isset($day['included']) && '' !== $day['included']){
663 663
 							$current_day['included'] = $day['included'];
664
-						}else{
664
+						} else{
665 665
 							$current_day['included'] = '';
666 666
 						}
667 667
 
668 668
 						//Excluded
669 669
 						if(false !== $importable_content && in_array('itinerary_excluded',$importable_content) && isset($day['excluded']) && '' !== $day['excluded']){
670 670
 							$current_day['excluded'] = $day['excluded'];
671
-						}else{
671
+						} else{
672 672
 							$current_day['excluded'] = '';
673 673
 						}
674 674
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 						$day_counter++;
677 677
 					}
678 678
 
679
-				}else{
679
+				} else{
680 680
 					$day_counter = $day_counter + (int)$leg['nights'];
681 681
 				}
682 682
 
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 
788 788
 			if(false !== $this->current_accommodation && !empty($this->current_accommodation) && array_key_exists($day['content_entity_id'],$this->current_accommodation)){
789 789
                 $ac_id = $this->current_accommodation[$day['content_entity_id']];
790
-			}else{
790
+			} else{
791 791
 				$ac_id = wp_insert_post(array(
792 792
                     'post_type' => 'accommodation',
793 793
                     'post_status' => 'draft',
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 					$country_id = $this->set_country($country_wetu_id, $id);
856 856
                 }
857 857
 
858
-			}else {
858
+			} else {
859 859
 
860 860
 				$destination_json = file_get_contents("http://wetu.com/API/Pins/".$this->api_key."/Get?ids=" . $day['destination_content_entity_id']);
861 861
 
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 				if(0 !== $country_id && false !== $country_id){
905 905
                     $this->relation_meta[$dest_id] = $country_id;
906 906
 					$this->relation_meta[$country_id] = 0;
907
-                }else{
907
+                } else{
908 908
 					$this->relation_meta[$dest_id] = 0;
909 909
                 }
910 910
 			}
Please login to merge, or discard this patch.