Test Failed
Pull Request — master (#293)
by Kiran
05:30
created
geodirectory-functions/taxonomy_functions.php 1 patch
Spacing   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
                              * @since 1.0.0
61 61
                              * @param string $menu_class The menu HTML class.
62 62
                              */
63
-                            $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
63
+                            $li_class = apply_filters('geodir_menu_li_class', 'menu-item '.$menu_class);
64 64
                             /**
65 65
                              * Filter the menu a class.
66 66
                              *
67 67
                              * @since 1.0.0
68 68
                              */
69 69
                             $a_class = apply_filters('geodir_menu_a_class', '');
70
-                            $items .= '<li class="' . $li_class . '">
71
-									<a href="' . get_post_type_archive_link($post_type) . '" class="' . $a_class . '">
72
-										' . __(ucfirst($args->labels->name),'geodirectory') . '
70
+                            $items .= '<li class="'.$li_class.'">
71
+									<a href="' . get_post_type_archive_link($post_type).'" class="'.$a_class.'">
72
+										' . __(ucfirst($args->labels->name), 'geodirectory').'
73 73
 									</a>
74 74
 								</li>';
75 75
                         }
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
              * @since 1.0.0
89 89
              * @param string $menu_class The menu HTML class.
90 90
              */
91
-            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-listings ' . $menu_class);
91
+            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-listings '.$menu_class);
92 92
             /**
93 93
              * Filter the sub menu li class.
94 94
              *
95 95
              * @since 1.0.0
96 96
              * @param string $menu_class The menu HTML class.
97 97
              */
98
-            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
98
+            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item '.$menu_class);
99 99
             /**
100 100
              * Filter the sub menu ul class.
101 101
              *
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
              * @since 1.0.0
115 115
              */
116 116
             $sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
117
-            $items .= '<li class="' . $li_class . '">
118
-					<a href="#" class="' . $a_class . '">' . __('Listing', 'geodirectory') . '</a>
119
-					<ul class="' . $sub_ul_class . '">';
117
+            $items .= '<li class="'.$li_class.'">
118
+					<a href="#" class="' . $a_class.'">'.__('Listing', 'geodirectory').'</a>
119
+					<ul class="' . $sub_ul_class.'">';
120 120
             $post_types = geodir_get_posttypes('object');
121 121
 
122 122
             $show_listing_post_types = get_option('geodir_add_posttype_in_listing_nav');
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
                                 if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
134 134
                                     $menu_class = 'current-menu-item';
135 135
 
136
-                                $items .= '<li class="' . $sub_li_class . '">
137
-														<a href="' . get_post_type_archive_link($post_type) . '" class="' . $sub_a_class . '">
138
-															' . __(ucfirst($args->labels->name),'geodirectory') . '
136
+                                $items .= '<li class="'.$sub_li_class.'">
137
+														<a href="' . get_post_type_archive_link($post_type).'" class="'.$sub_a_class.'">
138
+															' . __(ucfirst($args->labels->name), 'geodirectory').'
139 139
 														</a>
140 140
 													</li>';
141 141
                             }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
              *
152 152
              * @since 1.5.9
153 153
              */
154
-            $items .= apply_filters('geodir_menu_after_sub_ul','');
154
+            $items .= apply_filters('geodir_menu_after_sub_ul', '');
155 155
             $items .= '</li>';
156 156
         }
157 157
     }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                                      * @since 1.0.0
185 185
                                      * @param string $menu_class The menu HTML class.
186 186
                                      */
187
-                                    $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
187
+                                    $li_class = apply_filters('geodir_menu_li_class', 'menu-item '.$menu_class);
188 188
                                     /**
189 189
                                      * Filter the menu a class.
190 190
                                      *
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
                                      */
193 193
                                     $a_class = apply_filters('geodir_menu_a_class', '');
194 194
                                     $cpt_name = __($args->labels->singular_name, 'geodirectory');
195
-                                    $items .= '<li class="' . $li_class . '">
196
-											<a href="' . geodir_get_addlisting_link($post_type) . '" class="' . $a_class . '">
197
-												' . sprintf( __('Add %s', 'geodirectory'), $cpt_name ) . '
195
+                                    $items .= '<li class="'.$li_class.'">
196
+											<a href="' . geodir_get_addlisting_link($post_type).'" class="'.$a_class.'">
197
+												' . sprintf(__('Add %s', 'geodirectory'), $cpt_name).'
198 198
 											</a>
199 199
 										</li>';
200 200
                                 }
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
              * @since 1.0.0
219 219
              * @param string $menu_class The menu HTML class.
220 220
              */
221
-            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-add-listing ' . $menu_class);
221
+            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-add-listing '.$menu_class);
222 222
             /**
223 223
              * Filter the sub menu li class.
224 224
              *
225 225
              * @since 1.0.0
226 226
              * @param string $menu_class The menu HTML class.
227 227
              */
228
-            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
228
+            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item '.$menu_class);
229 229
             /**
230 230
              * Filter the sub menu ul class.
231 231
              *
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
              * @since 1.0.0
245 245
              */
246 246
             $sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
247
-            $items .= '<li  class="' . $li_class . '">
248
-					<a href="#" class="' . $a_class . '">' . __('Add Listing', 'geodirectory') . '</a>
249
-					<ul class="' . $sub_ul_class . '">';
247
+            $items .= '<li  class="'.$li_class.'">
248
+					<a href="#" class="' . $a_class.'">'.__('Add Listing', 'geodirectory').'</a>
249
+					<ul class="' . $sub_ul_class.'">';
250 250
 
251 251
             $post_types = geodir_get_posttypes('object');
252 252
 
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
                                          * @since 1.0.0
270 270
                                          * @param string $menu_class The menu HTML class.
271 271
                                          */
272
-                                        $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
272
+                                        $li_class = apply_filters('geodir_menu_li_class', 'menu-item '.$menu_class);
273 273
                                         $cpt_name = __($args->labels->singular_name, 'geodirectory');
274
-                                        $items .= '<li class="' . $li_class . '">
275
-														<a href="' . geodir_get_addlisting_link($post_type) . '" class="' . $sub_a_class . '">
276
-															' . sprintf( __('Add %s', 'geodirectory'), $cpt_name ) . '
274
+                                        $items .= '<li class="'.$li_class.'">
275
+														<a href="' . geodir_get_addlisting_link($post_type).'" class="'.$sub_a_class.'">
276
+															' . sprintf(__('Add %s', 'geodirectory'), $cpt_name).'
277 277
 														</a>
278 278
 													</li>';
279 279
                                     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             }
286 286
 
287 287
             $items .= '	</ul> ';
288
-            $items .= apply_filters('geodir_menu_after_sub_ul','');
288
+            $items .= apply_filters('geodir_menu_after_sub_ul', '');
289 289
             $items .= '</li>';
290 290
 
291 291
         }
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
     $geodir_theme_location = get_option('geodir_theme_location_nav');
314 314
     $geodir_theme_location_nav = array();
315 315
     if (empty($locations) && empty($geodir_theme_location)) {
316
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
316
+        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items()."</ul></div>", $menu);
317 317
         $geodir_theme_location_nav[] = $args['theme_location'];
318 318
         update_option('geodir_theme_location_nav', $geodir_theme_location_nav);
319 319
     }
320 320
     //else if(empty($geodir_theme_location)) // It means 'Show geodirectory navigation in selected menu locations' is not set yet.
321 321
 //		$menu = str_replace("</ul></div>",geodir_add_nav_menu_items()."</ul></div>",$menu);
322 322
     else if (is_array($geodir_theme_location) && isset($args['theme_location']) && in_array($args['theme_location'], $geodir_theme_location))
323
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
323
+        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items()."</ul></div>", $menu);
324 324
 
325 325
     return $menu;
326 326
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
     if (has_nav_menu($location) == '1' && is_array($geodir_theme_location) && in_array($location, $geodir_theme_location)) {
350 350
 
351
-        $items = $items . geodir_add_nav_menu_items();
351
+        $items = $items.geodir_add_nav_menu_items();
352 352
         return $items;
353 353
 
354 354
     } else {
@@ -373,12 +373,12 @@  discard block
 block discarded – undo
373 373
 
374 374
     $taxonomies = geodir_get_taxonomies();
375 375
     $taxonomies = implode("','", $taxonomies);
376
-    $taxonomies = "'" . $taxonomies . "'";
376
+    $taxonomies = "'".$taxonomies."'";
377 377
 
378 378
     $pn_categories = $wpdb->get_results(
379 379
         $wpdb->prepare(
380 380
             "SELECT $wpdb->terms.name as name, $wpdb->term_taxonomy.count as count, $wpdb->terms.term_id as cat_ID FROM $wpdb->term_taxonomy,  $wpdb->terms WHERE $wpdb->term_taxonomy.term_id = %d AND $wpdb->term_taxonomy.taxonomy in ( $taxonomies ) ORDER BY name",
381
-            array($wpdb->terms . term_id)
381
+            array($wpdb->terms.term_id)
382 382
         )
383 383
     );
384 384
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 
408 408
     if (geodir_is_page('add-listing') || geodir_is_page('preview')) {
409 409
         if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
410
-            $geodir_post_type = get_post_type((int)$_REQUEST['pid']);
410
+            $geodir_post_type = get_post_type((int) $_REQUEST['pid']);
411 411
         elseif (isset($_REQUEST['listing_type']))
412 412
             $geodir_post_type = sanitize_text_field($_REQUEST['listing_type']);
413 413
     }
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
     if (is_array($all_postypes) && !in_array($geodir_post_type, $all_postypes))
426 426
         $geodir_post_type = '';
427 427
 
428
-    if( defined( 'DOING_AJAX' ) && isset($_REQUEST['stype'])){
428
+    if (defined('DOING_AJAX') && isset($_REQUEST['stype'])) {
429 429
         $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
430 430
     }
431 431
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
      *
436 436
      * @since 1.6.9
437 437
      */
438
-    return apply_filters('geodir_get_current_posttype',$geodir_post_type);
438
+    return apply_filters('geodir_get_current_posttype', $geodir_post_type);
439 439
 }
440 440
 
441 441
 /**
@@ -449,17 +449,17 @@  discard block
 block discarded – undo
449 449
  */
450 450
 function geodir_get_default_posttype()
451 451
 {
452
-    $post_types = apply_filters( 'geodir_get_default_posttype', geodir_get_posttypes( 'object' ) );
452
+    $post_types = apply_filters('geodir_get_default_posttype', geodir_get_posttypes('object'));
453 453
 
454
-    foreach ( $post_types as $post_type => $info ) {
454
+    foreach ($post_types as $post_type => $info) {
455 455
         global $wpdb;
456
-        $has_posts = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type ) );
457
-        if ( $has_posts ) {
456
+        $has_posts = $wpdb->get_row($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type));
457
+        if ($has_posts) {
458 458
             $stype = $post_type; break;
459 459
         }
460 460
     }
461 461
 
462
-    if(!$stype){
462
+    if (!$stype) {
463 463
         $stype = 'gd_place';
464 464
     }
465 465
 
@@ -484,14 +484,14 @@  discard block
 block discarded – undo
484 484
         switch ($output):
485 485
             case 'object':
486 486
             case 'Object':
487
-                $post_types = json_decode(json_encode($post_types), FALSE);//(object)$post_types;
487
+                $post_types = json_decode(json_encode($post_types), FALSE); //(object)$post_types;
488 488
                 break;
489 489
             case 'array':
490 490
             case 'Array':
491
-                $post_types = (array)$post_types;
491
+                $post_types = (array) $post_types;
492 492
                 break;
493 493
 			case 'options':
494
-                $post_types = (array)$post_types;
494
+                $post_types = (array) $post_types;
495 495
 				
496 496
 				$options = array();
497 497
 				if (!empty($post_types)) {
@@ -609,15 +609,15 @@  discard block
 block discarded – undo
609 609
 
610 610
         $categories = get_terms($taxonomies);
611 611
 
612
-        $html .= '<option value="0">' . __('All', 'geodirectory') . '</option>';
612
+        $html .= '<option value="0">'.__('All', 'geodirectory').'</option>';
613 613
 
614 614
         foreach ($categories as $category_obj) {
615 615
             $select_opt = '';
616 616
             if ($selected == $category_obj->term_id) {
617 617
                 $select_opt = 'selected="selected"';
618 618
             }
619
-            $html .= '<option ' . $select_opt . ' value="' . $category_obj->term_id . '">'
620
-                . ucfirst($category_obj->name) . '</option>';
619
+            $html .= '<option '.$select_opt.' value="'.$category_obj->term_id.'">'
620
+                . ucfirst($category_obj->name).'</option>';
621 621
         }
622 622
 
623 623
         if ($echo)
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
     } elseif (isset($wp_query->tax_query->queries)) {
686 686
         $tax_arr = $wp_query->tax_query->queries;
687 687
         //if tax query has 'relation' set then it will break wp_list_pluck so we remove it
688
-        if(isset( $tax_arr['relation'])){unset( $tax_arr['relation']);}
688
+        if (isset($tax_arr['relation'])) {unset($tax_arr['relation']); }
689 689
         $taxonomies = wp_list_pluck($tax_arr, 'taxonomy');
690 690
     }
691 691
 
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 
740 740
             if ((!geodir_is_page('listing')) || (is_search() && $_REQUEST['search_taxonomy'] == '')) {
741 741
                 if ($cat_parent == 0) {
742
-                    $list_class = 'main_list gd-parent-cats-list gd-cats-display-' . $cat_display;
742
+                    $list_class = 'main_list gd-parent-cats-list gd-cats-display-'.$cat_display;
743 743
                     $main_list_class = 'class="main_list_selecter"';
744 744
                 } else {
745 745
                     //$display = 'display:none';
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 
750 750
             if ($cat_display == 'checkbox' || $cat_display == 'radio') {
751 751
                 $p = 0;
752
-                $out = '<div class="' . $list_class . ' gd-cat-row-' . $cat_parent . '" style="margin-left:' . $p . 'px;' . $display . ';">';
752
+                $out = '<div class="'.$list_class.' gd-cat-row-'.$cat_parent.'" style="margin-left:'.$p.'px;'.$display.';">';
753 753
             }
754 754
 
755 755
             foreach ($cat_terms as $cat_term) {
@@ -764,12 +764,12 @@  discard block
 block discarded – undo
764 764
                 }
765 765
 
766 766
                 if ($cat_display == 'radio')
767
-                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
767
+                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category['.$cat_term->taxonomy.'][]" '.$main_list_class.' alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" '.$checked.$onchange.' id="gd-cat-'.$cat_term->term_id.'" >'.$term_check.ucfirst($cat_term->name).'</span>';
768 768
                 elseif ($cat_display == 'select' || $cat_display == 'multiselect')
769
-                    $out .= '<option ' . $main_list_class . ' style="margin-left:' . $p . 'px;" alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' >' . $term_check . ucfirst($cat_term->name) . '</option>';
769
+                    $out .= '<option '.$main_list_class.' style="margin-left:'.$p.'px;" alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" '.$checked.$onchange.' >'.$term_check.ucfirst($cat_term->name).'</option>';
770 770
 
771 771
                 else {
772
-                    $out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
772
+                    $out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category['.$cat_term->taxonomy.'][]" '.$main_list_class.' alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" '.$checked.$onchange.' id="gd-cat-'.$cat_term->term_id.'" >'.$term_check.ucfirst($cat_term->name).'</span>';
773 773
                 }
774 774
 
775 775
                 // Call recurson to print sub cats
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
             $cat_exclude = serialize($exclude_cats);
809 809
 
810 810
         if (isset($_REQUEST['backandedit'])) {
811
-            $post = (object)$gd_session->get('listing');
811
+            $post = (object) $gd_session->get('listing');
812 812
 
813 813
             if (!is_array($post->post_category[$cat_taxonomy]))
814 814
                 $post_category = $post->post_category[$cat_taxonomy];
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 
841 841
             if (!empty($post_category)) {
842 842
                 $cat1 = array_filter(explode(',', $post_category));
843
-                $post_category = ',' . implode(',', $cat1) . ',';
843
+                $post_category = ','.implode(',', $cat1).',';
844 844
 
845 845
             }
846 846
 
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
                 foreach ($post_category_upd as $cat) {
852 852
 
853 853
                     if (!in_array($cat, $exclude_cats) && $cat != '') {
854
-                        $post_category_change .= ',' . $cat;
854
+                        $post_category_change .= ','.$cat;
855 855
                     }
856 856
                 }
857 857
                 $post_category = $post_category_change;
@@ -863,11 +863,11 @@  discard block
 block discarded – undo
863 863
             }
864 864
         }
865 865
 
866
-        echo '<input type="hidden" id="cat_limit" value="' . $cat_limit . '" name="cat_limit[' . $cat_taxonomy . ']"  />';
866
+        echo '<input type="hidden" id="cat_limit" value="'.$cat_limit.'" name="cat_limit['.$cat_taxonomy.']"  />';
867 867
 
868
-        echo '<input type="hidden" id="post_category" value="' . $post_category . '" name="post_category[' . $cat_taxonomy . ']"  />';
868
+        echo '<input type="hidden" id="post_category" value="'.$post_category.'" name="post_category['.$cat_taxonomy.']"  />';
869 869
 
870
-        echo '<input type="hidden" id="post_category_str" value="' . $post_category_str . '" name="post_category_str[' . $cat_taxonomy . ']"  />';
870
+        echo '<input type="hidden" id="post_category_str" value="'.$post_category_str.'" name="post_category_str['.$cat_taxonomy.']"  />';
871 871
 
872 872
 
873 873
         ?>
@@ -886,14 +886,14 @@  discard block
 block discarded – undo
886 886
 
887 887
             function show_subcatlist(main_cat, catObj) {
888 888
                 if (main_cat != '') {
889
-					var url = '<?php echo geodir_get_ajax_url();?>';
890
-                    var cat_taxonomy = '<?php echo $cat_taxonomy;?>';
891
-                    var cat_exclude = '<?php echo base64_encode($cat_exclude);?>';
889
+					var url = '<?php echo geodir_get_ajax_url(); ?>';
890
+                    var cat_taxonomy = '<?php echo $cat_taxonomy; ?>';
891
+                    var cat_exclude = '<?php echo base64_encode($cat_exclude); ?>';
892 892
                     var cat_limit = jQuery('#' + cat_taxonomy).find('#cat_limit').val();
893
-					<?php if ((int)$cat_limit > 0) { ?>
893
+					<?php if ((int) $cat_limit > 0) { ?>
894 894
 					var selected = parseInt(jQuery('#' + cat_taxonomy).find('.cat_sublist > div.post_catlist_item').length);
895 895
 					if (cat_limit != '' && selected > 0 && selected >= cat_limit && cat_limit != 0) {
896
-						alert("<?php echo esc_attr(wp_sprintf(__('You have reached category limit of %d categories.', 'geodirectory'), (int)$cat_limit));?>");
896
+						alert("<?php echo esc_attr(wp_sprintf(__('You have reached category limit of %d categories.', 'geodirectory'), (int) $cat_limit)); ?>");
897 897
 						return false;
898 898
 					}
899 899
 					<?php } ?>
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
             }
933 933
 
934 934
             function update_listing_cat(el) {
935
-                var cat_taxonomy = '<?php echo $cat_taxonomy;?>';
935
+                var cat_taxonomy = '<?php echo $cat_taxonomy; ?>';
936 936
                 var cat_ids = '';
937 937
                 var main_cat = '';
938 938
                 var sub_cat = '';
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
         <div class="main_cat_list" style=" <?php if (isset($style)) {
1014 1014
             echo $style;
1015 1015
         }?> ">
1016
-            <?php geodir_get_catlist($cat_taxonomy, 0);  // print main categories list
1016
+            <?php geodir_get_catlist($cat_taxonomy, 0); // print main categories list
1017 1017
             ?>
1018 1018
         </div>
1019 1019
     <?php
@@ -1040,9 +1040,9 @@  discard block
 block discarded – undo
1040 1040
     if ($exclude != '') {
1041 1041
         $exclude_cats = maybe_unserialize(base64_decode($exclude));
1042 1042
 
1043
-        if(is_array( $exclude_cats)){
1044
-            $exclude_cats = array_map( 'intval', $exclude_cats );
1045
-        }else{
1043
+        if (is_array($exclude_cats)) {
1044
+            $exclude_cats = array_map('intval', $exclude_cats);
1045
+        } else {
1046 1046
             $exclude_cats = intval($exclude_cats);
1047 1047
         }
1048 1048
 
@@ -1056,25 +1056,25 @@  discard block
 block discarded – undo
1056 1056
         <?php $main_cat = get_term($parrent, $request_taxonomy); ?>
1057 1057
 
1058 1058
         <div class="post_catlist_item" style="border:1px solid #CCCCCC; margin:5px auto; padding:5px;">
1059
-            <img alt="move icon" src="<?php echo geodir_plugin_url() . '/geodirectory-assets/images/move.png';?>"
1059
+            <img alt="move icon" src="<?php echo geodir_plugin_url().'/geodirectory-assets/images/move.png'; ?>"
1060 1060
                  onclick="jQuery(this).closest('div').remove();update_listing_cat(this);" align="right"/>
1061 1061
             <?php /* ?>
1062 1062
 		<img src="<?php echo geodir_plugin_url().'/geodirectory-assets/images/move.png';?>" onclick="jQuery(this).closest('div').remove();show_subcatlist();" align="right" /> 
1063 1063
 		<?php */ ?>
1064 1064
 
1065
-            <input type="checkbox" value="<?php echo $main_cat->term_id;?>" class="listing_main_cat"
1065
+            <input type="checkbox" value="<?php echo $main_cat->term_id; ?>" class="listing_main_cat"
1066 1066
                    onchange="if(jQuery(this).is(':checked')){jQuery(this).closest('div').find('.post_default_category').prop('checked',false).show();}else{jQuery(this).closest('div').find('.post_default_category').prop('checked',false).hide();};update_listing_cat()"
1067 1067
                    checked="checked" disabled="disabled"/>
1068 1068
        <span> 
1069
-        <?php printf(__('Add listing in %s category', 'geodirectory'), geodir_ucwords($main_cat->name));?>
1069
+        <?php printf(__('Add listing in %s category', 'geodirectory'), geodir_ucwords($main_cat->name)); ?>
1070 1070
         </span>
1071 1071
             <br/>
1072 1072
 
1073 1073
             <div class="post_default_category">
1074
-                <input type="radio" name="post_default_category" value="<?php echo $main_cat->term_id;?>"
1075
-                       onchange="update_listing_cat()" <?php if ($default) echo ' checked="checked" ';?>   />
1074
+                <input type="radio" name="post_default_category" value="<?php echo $main_cat->term_id; ?>"
1075
+                       onchange="update_listing_cat()" <?php if ($default) echo ' checked="checked" '; ?>   />
1076 1076
         <span> 
1077
-        <?php printf(__('Set %s as default category', 'geodirectory'), geodir_ucwords($main_cat->name));?>
1077
+        <?php printf(__('Set %s as default category', 'geodirectory'), geodir_ucwords($main_cat->name)); ?>
1078 1078
         </span>
1079 1079
             </div>
1080 1080
 
@@ -1107,7 +1107,7 @@  discard block
 block discarded – undo
1107 1107
         $post_cat_str = $post_categories[$request_taxonomy];
1108 1108
         $post_cat_array = explode("#", $post_cat_str);
1109 1109
         if (is_array($post_cat_array)) {
1110
-            $post_cat_array = array_unique( $post_cat_array );
1110
+            $post_cat_array = array_unique($post_cat_array);
1111 1111
 
1112 1112
 			foreach ($post_cat_array as $post_cat_html) {
1113 1113
 
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
                 }
1123 1123
                 $post_sub_catid = '';
1124 1124
                 if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1125
-                    $post_sub_catid = (int)$post_cat_info[1];
1125
+                    $post_sub_catid = (int) $post_cat_info[1];
1126 1126
                 }
1127 1127
 
1128 1128
                 geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
@@ -1143,7 +1143,7 @@  discard block
 block discarded – undo
1143 1143
             }
1144 1144
 
1145 1145
             if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1146
-                $post_sub_catid = (int)$post_cat_info[1];
1146
+                $post_sub_catid = (int) $post_cat_info[1];
1147 1147
             }
1148 1148
 
1149 1149
             geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
@@ -1175,9 +1175,9 @@  discard block
 block discarded – undo
1175 1175
         if (!$selected)
1176 1176
             $option_slected = ' selected="selected" ';
1177 1177
 
1178
-        echo '<select field_type="select" id="' . sanitize_text_field($cat_taxonomy) . '" class="chosen_select" ' . $onchange . ' option-ajaxChosen="false" >';
1178
+        echo '<select field_type="select" id="'.sanitize_text_field($cat_taxonomy).'" class="chosen_select" '.$onchange.' option-ajaxChosen="false" >';
1179 1179
 
1180
-        echo '<option value="" ' . $option_selected . ' >' . __('Select Category', 'geodirectory') . '</option>';
1180
+        echo '<option value="" '.$option_selected.' >'.__('Select Category', 'geodirectory').'</option>';
1181 1181
 
1182 1182
         foreach ($cat_terms as $cat_term) {
1183 1183
             $option_selected = '';
@@ -1185,10 +1185,10 @@  discard block
 block discarded – undo
1185 1185
                 $option_selected = ' selected="selected" ';
1186 1186
 
1187 1187
             // Count child terms
1188
-            $child_terms = get_terms( $cat_taxonomy, array( 'parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1 ) );
1189
-            $has_child = !empty( $child_terms ) ? 't' : 'f';
1188
+            $child_terms = get_terms($cat_taxonomy, array('parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1));
1189
+            $has_child = !empty($child_terms) ? 't' : 'f';
1190 1190
 
1191
-            echo '<option  ' . $option_selected . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" _hc="' . $has_child . '" >' . ucfirst($cat_term->name) . '</option>';
1191
+            echo '<option  '.$option_selected.' alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" _hc="'.$has_child.'" >'.ucfirst($cat_term->name).'</option>';
1192 1192
         }
1193 1193
         echo '</select>';
1194 1194
     }
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
             2 => __('Custom field updated.', 'geodirectory'),
1220 1220
             3 => __('Custom field deleted.', 'geodirectory'),
1221 1221
             4 => sprintf(__('%s updated.', 'geodirectory'), $post_object->labels->singular_name),
1222
-            5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'geodirectory'), $post_object->labels->singular_name, wp_post_revision_title((int)$_GET['revision'], false)) : false,
1222
+            5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'geodirectory'), $post_object->labels->singular_name, wp_post_revision_title((int) $_GET['revision'], false)) : false,
1223 1223
             6 => sprintf(__('%s published. <a href="%s">View %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1224 1224
             7 => sprintf(__('%s saved.', 'geodirectory'), $post_object->labels->singular_name),
1225 1225
             8 => sprintf(__('%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $post_object->labels->singular_name),
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 
1246 1246
     global $wpdb;
1247 1247
 
1248
-    $menu_icon = geodir_plugin_url() . '/geodirectory-assets/images/favicon.ico';
1248
+    $menu_icon = geodir_plugin_url().'/geodirectory-assets/images/favicon.ico';
1249 1249
 
1250 1250
     if (!$listing_slug = get_option('geodir_listing_prefix'))
1251 1251
         $listing_slug = 'places';
@@ -1258,11 +1258,11 @@  discard block
 block discarded – undo
1258 1258
 
1259 1259
         $gd_placetags = array();
1260 1260
         $gd_placetags['object_type'] = 'gd_place';
1261
-        $gd_placetags['listing_slug'] = $listing_slug . '/tags';
1261
+        $gd_placetags['listing_slug'] = $listing_slug.'/tags';
1262 1262
         $gd_placetags['args'] = array(
1263 1263
             'public' => true,
1264 1264
             'hierarchical' => false,
1265
-            'rewrite' => array('slug' => $listing_slug . '/tags', 'with_front' => false, 'hierarchical' => true),
1265
+            'rewrite' => array('slug' => $listing_slug.'/tags', 'with_front' => false, 'hierarchical' => true),
1266 1266
             'query_var' => true,
1267 1267
 
1268 1268
             'labels' => array(
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
             'menu_icon' => $menu_icon,
1357 1357
             'public' => true,
1358 1358
             'query_var' => true,
1359
-            'rewrite' => array('slug' => $listing_slug , 'with_front' => false, 'hierarchical' => true, 'feeds' => true),
1359
+            'rewrite' => array('slug' => $listing_slug, 'with_front' => false, 'hierarchical' => true, 'feeds' => true),
1360 1360
             'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments', /*'revisions', 'post-formats'*/),
1361 1361
             'taxonomies' => array('gd_placecategory', 'gd_place_tags'));
1362 1362
 
@@ -1378,27 +1378,27 @@  discard block
 block discarded – undo
1378 1378
 }
1379 1379
 
1380 1380
 $gd_wpml_get_languages = "";
1381
-function gd_wpml_get_lang_from_url($url){
1381
+function gd_wpml_get_lang_from_url($url) {
1382 1382
 
1383 1383
     global $gd_wpml_get_languages;
1384
-    if(isset($_REQUEST['lang']) && $_REQUEST['lang']){return $_REQUEST['lang'];}
1384
+    if (isset($_REQUEST['lang']) && $_REQUEST['lang']) {return $_REQUEST['lang']; }
1385 1385
 
1386 1386
 
1387 1387
     //
1388
-    $url = str_replace(array("http://","https://"),"",$url);
1388
+    $url = str_replace(array("http://", "https://"), "", $url);
1389 1389
 
1390 1390
     // site_url() seems to work better than get_bloginfo('url') here, WPML can change get_bloginfo('url') to add the lang.
1391
-    $site_url = str_replace(array("http://","https://"),"",site_url());
1391
+    $site_url = str_replace(array("http://", "https://"), "", site_url());
1392 1392
 
1393
-    $url = str_replace($site_url,"",$url);
1393
+    $url = str_replace($site_url, "", $url);
1394 1394
 
1395 1395
 
1396 1396
     $segments = explode('/', trim($url, '/'));
1397 1397
 
1398 1398
     //print_r( $segments);
1399
-    if($gd_wpml_get_languages){
1399
+    if ($gd_wpml_get_languages) {
1400 1400
         $langs = $gd_wpml_get_languages;
1401
-    }else{
1401
+    } else {
1402 1402
         global $sitepress;
1403 1403
         $gd_wpml_get_languages = $sitepress->get_active_languages();
1404 1404
     }
@@ -1463,17 +1463,17 @@  discard block
 block discarded – undo
1463 1463
         $slug = $post_types[$post->post_type]['rewrite']['slug'];
1464 1464
 
1465 1465
         // Alter the CPT slug if WPML is set to do so
1466
-        if(function_exists('icl_object_id')){
1467
-            if ( gd_wpml_slug_translation_turned_on( $post->post_type ) && $language_code = gd_wpml_get_lang_from_url($post_link)) {
1466
+        if (function_exists('icl_object_id')) {
1467
+            if (gd_wpml_slug_translation_turned_on($post->post_type) && $language_code = gd_wpml_get_lang_from_url($post_link)) {
1468 1468
 
1469 1469
                 $org_slug = $slug;
1470
-                $slug = apply_filters( 'wpml_translate_single_string',
1470
+                $slug = apply_filters('wpml_translate_single_string',
1471 1471
                     $slug,
1472 1472
                     'WordPress',
1473
-                    'URL slug: ' . $slug,
1473
+                    'URL slug: '.$slug,
1474 1474
                     $language_code);
1475 1475
 
1476
-                if(!$slug){$slug = $org_slug;}
1476
+                if (!$slug) {$slug = $org_slug; }
1477 1477
 
1478 1478
             }
1479 1479
         }
@@ -1495,11 +1495,11 @@  discard block
 block discarded – undo
1495 1495
         }
1496 1496
 
1497 1497
         $post_link = trailingslashit(
1498
-            preg_replace(  "/" . preg_quote( $slug, "/" ) . "/", $slug ."/%gd_taxonomy%",$post_link, 1 )
1498
+            preg_replace("/".preg_quote($slug, "/")."/", $slug."/%gd_taxonomy%", $post_link, 1)
1499 1499
         );
1500 1500
 
1501 1501
         if ($fix_url) {
1502
-            $post_link = $site_url . $post_link;
1502
+            $post_link = $site_url.$post_link;
1503 1503
         }
1504 1504
 
1505 1505
         if (isset($comment_post_cache[$post->ID])) {
@@ -1518,12 +1518,12 @@  discard block
 block discarded – undo
1518 1518
             $ID = $post->ID;
1519 1519
             $post2 = $wpdb->get_row(
1520 1520
                 $wpdb->prepare(
1521
-                    "SELECT * from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1521
+                    "SELECT * from ".$plugin_prefix.$post->post_type."_detail WHERE post_id = %d ",
1522 1522
                     array($post->ID)
1523 1523
                 )
1524 1524
             );
1525 1525
 
1526
-            $post = (object)array_merge((array)$post, (array)$post2);
1526
+            $post = (object) array_merge((array) $post, (array) $post2);
1527 1527
 
1528 1528
             $comment_post_cache[$post->ID] = $post;
1529 1529
         }
@@ -1532,7 +1532,7 @@  discard block
 block discarded – undo
1532 1532
 
1533 1533
         if (false !== strpos($post_link, '%gd_taxonomy%')) {
1534 1534
 
1535
-            if ( apply_filters("geodir_add_location_url_to_url",get_option('geodir_add_location_url'),$post->post_type,$post)) {
1535
+            if (apply_filters("geodir_add_location_url_to_url", get_option('geodir_add_location_url'), $post->post_type, $post)) {
1536 1536
                 $location_request = '';
1537 1537
 
1538 1538
 
@@ -1546,7 +1546,7 @@  discard block
 block discarded – undo
1546 1546
                         $post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1547 1547
                         $post->country_slug = str_replace(']', '', $post->country_slug);
1548 1548
 
1549
-                        $post_location = (object)array('country_slug' => $post->country_slug,
1549
+                        $post_location = (object) array('country_slug' => $post->country_slug,
1550 1550
                             'region_slug' => $post->region_slug,
1551 1551
                             'city_slug' => $post->city_slug
1552 1552
                         );
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
 
1560 1560
                     $post_location_sql = $wpdb->get_results(
1561 1561
                         $wpdb->prepare(
1562
-                            "SELECT post_locations from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1562
+                            "SELECT post_locations from ".$plugin_prefix.$post->post_type."_detail WHERE post_id = %d ",
1563 1563
                             array($post->ID)
1564 1564
                         )
1565 1565
                     );
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
                             $post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1576 1576
                             $post->country_slug = str_replace(']', '', $post->country_slug);
1577 1577
 
1578
-                            $post_location = (object)array('country_slug' => $post->country_slug,
1578
+                            $post_location = (object) array('country_slug' => $post->country_slug,
1579 1579
                                 'region_slug' => $post->region_slug,
1580 1580
                                 'city_slug' => $post->city_slug
1581 1581
                             );
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
 					}
1605 1605
 					$location_slug[] = $city_slug;
1606 1606
 					
1607
-					$location_request .= implode('/', $location_slug) . '/';
1607
+					$location_request .= implode('/', $location_slug).'/';
1608 1608
                 }
1609 1609
             }
1610 1610
 
@@ -1662,9 +1662,9 @@  discard block
 block discarded – undo
1662 1662
             }
1663 1663
             $request_term = trim($request_term, '/');
1664 1664
             if (!empty($request_term))
1665
-                $post_link = str_replace('%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1665
+                $post_link = str_replace('%gd_taxonomy%', $request_term.$detailurl_separator, $post_link);
1666 1666
             else
1667
-                $post_link = str_replace('/%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1667
+                $post_link = str_replace('/%gd_taxonomy%', $request_term.$detailurl_separator, $post_link);
1668 1668
             //echo $post_link ;
1669 1669
         }
1670 1670
         // temp cache the permalink
@@ -1739,9 +1739,9 @@  discard block
 block discarded – undo
1739 1739
                 $url_separator = '';
1740 1740
 
1741 1741
                 if (get_option('permalink_structure') != '') {
1742
-                    $old_listing_slug = '/' . $listing_slug . '/';
1742
+                    $old_listing_slug = '/'.$listing_slug.'/';
1743 1743
                     $request_term = implode("/", $location_terms);
1744
-                    $new_listing_slug = '/' . $listing_slug . '/' . $request_term . '/';
1744
+                    $new_listing_slug = '/'.$listing_slug.'/'.$request_term.'/';
1745 1745
 
1746 1746
                     $termlink = substr_replace($termlink, $new_listing_slug, strpos($termlink, $old_listing_slug), strlen($old_listing_slug));
1747 1747
                 } else {
@@ -1761,25 +1761,25 @@  discard block
 block discarded – undo
1761 1761
         // Alter the CPT slug if WPML is set to do so
1762 1762
         if (function_exists('icl_object_id')) {
1763 1763
             $post_types = get_option('geodir_post_types');
1764
-            $post_type = str_replace("category","",$taxonomy);
1765
-            $post_type = str_replace("_tags","",$post_type);
1764
+            $post_type = str_replace("category", "", $taxonomy);
1765
+            $post_type = str_replace("_tags", "", $post_type);
1766 1766
             $slug = $post_types[$post_type]['rewrite']['slug'];
1767 1767
             if (gd_wpml_slug_translation_turned_on($post_type)) {
1768 1768
                 global $sitepress;
1769 1769
                 $default_lang = $sitepress->get_default_language();
1770 1770
                 $language_code = gd_wpml_get_lang_from_url($termlink);
1771
-                if (!$language_code ) {
1772
-                    $language_code  = $default_lang;
1771
+                if (!$language_code) {
1772
+                    $language_code = $default_lang;
1773 1773
                 }
1774 1774
 
1775 1775
                 $org_slug = $slug;
1776
-                $slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: ' . $slug, $language_code);
1776
+                $slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: '.$slug, $language_code);
1777 1777
 
1778 1778
                 if (!$slug) {
1779 1779
                     $slug = $org_slug;
1780 1780
                 }
1781 1781
 
1782
-                $termlink = trailingslashit(preg_replace("/" . preg_quote($org_slug, "/") . "/", $slug  ,$termlink, 1));
1782
+                $termlink = trailingslashit(preg_replace("/".preg_quote($org_slug, "/")."/", $slug, $termlink, 1));
1783 1783
             }
1784 1784
         }
1785 1785
     }
@@ -1809,7 +1809,7 @@  discard block
 block discarded – undo
1809 1809
 	
1810 1810
 	if (in_array($post_type, geodir_get_posttypes())) {
1811 1811
 		if (get_option('geodir_add_location_url') && $gd_session->get('gd_multi_location') == 1) {
1812
-			if(geodir_is_page('detail') && !empty($post) && isset($post->country_slug)) {
1812
+			if (geodir_is_page('detail') && !empty($post) && isset($post->country_slug)) {
1813 1813
                 $location_terms = array(
1814 1814
                     'gd_country' => $post->country_slug,
1815 1815
                     'gd_region' => $post->region_slug,
@@ -1826,7 +1826,7 @@  discard block
 block discarded – undo
1826 1826
 					$location_terms = implode("/", $location_terms);
1827 1827
 					$location_terms = rtrim($location_terms, '/');
1828 1828
 					
1829
-					$link .= urldecode($location_terms) . '/';
1829
+					$link .= urldecode($location_terms).'/';
1830 1830
 				} else {
1831 1831
 					$link = geodir_getlink($link, $location_terms);
1832 1832
 				}
@@ -1908,9 +1908,9 @@  discard block
 block discarded – undo
1908 1908
             return 0;
1909 1909
         $where = 't.term_id = %d';
1910 1910
         if (!empty($taxonomy))
1911
-            return $wpdb->get_row($wpdb->prepare($tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1911
+            return $wpdb->get_row($wpdb->prepare($tax_select.$where." AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1912 1912
         else
1913
-            return $wpdb->get_var($wpdb->prepare($select . $where, $term));
1913
+            return $wpdb->get_var($wpdb->prepare($select.$where, $term));
1914 1914
     }
1915 1915
 
1916 1916
     $term = trim(wp_unslash($term));
@@ -1922,7 +1922,7 @@  discard block
 block discarded – undo
1922 1922
 
1923 1923
     $where_fields = array($slug);
1924 1924
     if (!empty($taxonomy)) {
1925
-        $parent = (int)$parent;
1925
+        $parent = (int) $parent;
1926 1926
         if ($parent > 0) {
1927 1927
             $where_fields[] = $parent;
1928 1928
             $else_where_fields[] = $parent;
@@ -1985,13 +1985,13 @@  discard block
 block discarded – undo
1985 1985
         $post_types = geodir_get_posttypes();
1986 1986
         $tax_arr = array();
1987 1987
         foreach ($post_types as $post_type) {
1988
-            $tax_arr[] = "'" . $post_type . "category'";
1988
+            $tax_arr[] = "'".$post_type."category'";
1989 1989
         }
1990 1990
         $tax_c = implode(',', $tax_arr);
1991 1991
         $terms = $wpdb->get_results("SELECT * FROM $wpdb->term_taxonomy WHERE taxonomy IN ($tax_c)");
1992 1992
         //$terms = get_terms( $taxonomy );
1993 1993
 
1994
-        if($terms) {
1994
+        if ($terms) {
1995 1995
             foreach ($terms as $term) {
1996 1996
                 $post_type = str_replace("category", "", $term->taxonomy);
1997 1997
                 $a_terms[$post_type][] = $term;
@@ -1999,7 +1999,7 @@  discard block
 block discarded – undo
1999 1999
             }
2000 2000
         }
2001 2001
 
2002
-        if($a_terms) {
2002
+        if ($a_terms) {
2003 2003
             foreach ($a_terms as $pt => $t2) {
2004 2004
 
2005 2005
                 foreach ($t2 as $term) {
@@ -2024,7 +2024,7 @@  discard block
 block discarded – undo
2024 2024
     }
2025 2025
 
2026 2026
     if (is_ssl()) {
2027
-        $terms_icons = str_replace("http:","https:",$terms_icons );
2027
+        $terms_icons = str_replace("http:", "https:", $terms_icons);
2028 2028
     }
2029 2029
 
2030 2030
     return apply_filters('geodir_get_term_icons', $terms_icons, $term_id);
Please login to merge, or discard this patch.