Passed
Push — master ( 8a4cf0...7a5fda )
by Stiofan
09:58
created
geodirectory-functions/map-functions/map_functions.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $title = str_replace($srcharr, $replarr, $post_title);
65 65
 
66 66
         if (is_ssl()) {
67
-            $icon = str_replace("http:","https:",$icon );
67
+            $icon = str_replace("http:", "https:", $icon);
68 68
         }
69 69
         
70 70
         if ($icon != '') {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $icon_size = array('w' => 36, 'h' => 45);
81 81
         }
82 82
 
83
-        $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
83
+        $post_json = '{"id":"'.$post->ID.'","t": "'.$title.'","lt": "'.$post->post_latitude.'","ln": "'.$post->post_longitude.'","mk_id":"'.$post->ID.'_'.$post->default_category.'","i":"'.$icon.'","w":"'.$icon_size['w'].'","h":"'.$icon_size['h'].'"}';
84 84
 
85 85
         /**
86 86
          * Filter the json data when creating output for post json marker..
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
          * @param string $post_json JSON representation of the post marker info.
90 90
          * @param object $post The post object.
91 91
          */
92
-        $map_jason[] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
92
+        $map_jason[] = apply_filters('geodir_create_marker_jason_of_posts', $post_json, $post);
93 93
     }
94 94
 }
95 95
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         foreach ($map_canvas_arr as $canvas => $jason) {
110 110
             if (is_array($map_jason) && !empty($map_jason)) {
111 111
 
112
-                $canvas_jason = $canvas . "_jason";
112
+                $canvas_jason = $canvas."_jason";
113 113
                 $map_canvas_arr[$canvas] = array_unique($map_jason);
114 114
                 unset($cat_content_info);
115 115
                 $cat_content_info[] = implode(',', $map_canvas_arr[$canvas]);
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
                 if (!empty($cat_content_info)) {
118 118
                     $json_content = substr(implode(',', $cat_content_info), 1);
119 119
                     $json_content = htmlentities($json_content, ENT_QUOTES); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016
120
-                    $canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']';
120
+                    $canvas_jason = '[{"totalcount":"'.$totalcount.'",'.$json_content.']';
121 121
                 } else {
122 122
                     $canvas_jason = '[{"totalcount":"0"}]';
123 123
                 }
124 124
 
125
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
125
+                $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason);
126 126
 
127 127
                 /**
128 128
                  * Filter the send_marker_jason_to_js() function map canvas json args.
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
                  * @param string $canvas Map canvas array key.
135 135
                  * @param array $map_canvas_jason_args Map canvas args.
136 136
                  */
137
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
137
+                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args);
138 138
 
139
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
139
+                wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args);
140 140
             } else {
141 141
                 $canvas_jason = '[{"totalcount":"0"}]';
142
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
142
+                $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason);
143 143
 
144 144
                 /**
145 145
                  * Filter the send_marker_jason_to_js() function map canvas json args.
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
                  * @param string $canvas Map canvas array key.
152 152
                  * @param array $map_canvas_jason_args Map canvas args.
153 153
                  */
154
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
155
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
154
+                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args);
155
+                wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args);
156 156
             }
157 157
         }
158 158
 
@@ -214,11 +214,11 @@  discard block
 block discarded – undo
214 214
         }
215 215
 
216 216
 
217
-        $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
217
+        $out = '<ul class="treeview '.$list_class.'" style="margin-left:'.$p.'px;'.$display.';">';
218 218
 
219 219
         $geodir_cat_icons = geodir_get_term_icon();
220 220
 
221
-        $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') :  'gd_place';
221
+        $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') : 'gd_place';
222 222
         $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt;
223 223
         foreach ($cat_terms as $cat_term):
224 224
 
@@ -232,16 +232,16 @@  discard block
 block discarded – undo
232 232
 
233 233
                 // Untick the category by default on home map
234 234
                 if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
235
-                    if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $cat_term->term_id, $geodir_home_map_untick)) {
235
+                    if (!empty($geodir_home_map_untick) && in_array($post_type.'_'.$cat_term->term_id, $geodir_home_map_untick)) {
236 236
                         $checked = '';
237 237
                     }
238 238
                 }
239 239
 
240
-                $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
241
-                $term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
242
-                $term_check .= '  title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">';
243
-                $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
244
-                $out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>';
240
+                $term_check = '<input type="checkbox" '.$checked.' id="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'" class="group_selector '.$main_list_class.'"';
241
+                $term_check .= ' name="'.$map_canvas_name.'_cat[]" ';
242
+                $term_check .= '  title="'.esc_attr(ucfirst($cat_term->name)).'" value="'.$cat_term->term_id.'" onclick="javascript:build_map_ajax_search_param(\''.$map_canvas_name.'\',false, this)">';
243
+                $term_img = '<img height="15" width="15" alt="'.$cat_term->taxonomy.'" src="'.$icon.'" title="'.ucfirst($cat_term->name).'"/>';
244
+                $out .= '<li>'.$term_check.'<label for="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'">'.$term_img.ucfirst($cat_term->name).'</label><i class="fa fa-long-arrow-down"></i>';
245 245
 
246 246
             endif;
247 247
 
@@ -353,11 +353,11 @@  discard block
 block discarded – undo
353 353
  * @package GeoDirectory
354 354
  */
355 355
 function geodir_map_load_style() {    
356
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
356
+    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is('geodirectory-googlemap-script', 'done')) {
357 357
 ?>
358 358
 <script type="text/javascript">
359 359
 if (!(window.google && typeof google.maps !== 'undefined')) {
360
-    document.write('<' + 'link id="geodirectory-leaflet-style-css" media="all" type="text/css" href="<?php echo geodir_plugin_url();?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION;?>" rel="stylesheet"' + '>');
360
+    document.write('<' + 'link id="geodirectory-leaflet-style-css" media="all" type="text/css" href="<?php echo geodir_plugin_url(); ?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION; ?>" rel="stylesheet"' + '>');
361 361
 }
362 362
 </script>
363 363
 <?php
@@ -373,12 +373,12 @@  discard block
 block discarded – undo
373 373
  * @package GeoDirectory
374 374
  */
375 375
 function geodir_map_load_script() {
376
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
376
+    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is('geodirectory-googlemap-script', 'done')) {
377 377
 ?>
378 378
 <script type="text/javascript">
379 379
 if (!(window.google && typeof google.maps !== 'undefined')) {
380
-    document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo geodir_plugin_url();?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
381
-    document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo geodir_plugin_url();?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
380
+    document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo geodir_plugin_url(); ?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
381
+    document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo geodir_plugin_url(); ?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
382 382
 }
383 383
 </script>
384 384
 <?php
Please login to merge, or discard this patch.
geodirectory-functions/general_functions.php 1 patch
Spacing   +356 added lines, -356 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 /**
11 11
  * Get All Plugin functions from WordPress
12 12
  */
13
-include_once(ABSPATH . 'wp-admin/includes/plugin.php');
13
+include_once(ABSPATH.'wp-admin/includes/plugin.php');
14 14
 
15 15
 /*-----------------------------------------------------------------------------------*/
16 16
 /* Helper functions */
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 {
30 30
 
31 31
     if (is_ssl()) :
32
-        return str_replace('http://', 'https://', WP_PLUGIN_URL) . "/" . plugin_basename(dirname(dirname(__FILE__)));
32
+        return str_replace('http://', 'https://', WP_PLUGIN_URL)."/".plugin_basename(dirname(dirname(__FILE__)));
33 33
     else :
34
-        return WP_PLUGIN_URL . "/" . plugin_basename(dirname(dirname(__FILE__)));
34
+        return WP_PLUGIN_URL."/".plugin_basename(dirname(dirname(__FILE__)));
35 35
     endif;
36 36
 }
37 37
 
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
  */
48 48
 function geodir_plugin_path()
49 49
 {
50
-    if ( defined( 'GD_TESTING_MODE' ) && GD_TESTING_MODE ) {
50
+    if (defined('GD_TESTING_MODE') && GD_TESTING_MODE) {
51 51
         return dirname(dirname(__FILE__));
52 52
     } else {
53
-        return WP_PLUGIN_DIR . "/" . plugin_basename(dirname(dirname(__FILE__)));
53
+        return WP_PLUGIN_DIR."/".plugin_basename(dirname(dirname(__FILE__)));
54 54
     }
55 55
 }
56 56
 
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
     foreach ($params as $key => $value) {
130 130
         if (gettype($value) == 'array') { //Handle array data properly
131 131
             foreach ($value as $val) {
132
-                $params_arr[] = $key . '[]=' . urlencode($val);
132
+                $params_arr[] = $key.'[]='.urlencode($val);
133 133
             }
134 134
         } else {
135
-            $params_arr[] = $key . '=' . urlencode($value);
135
+            $params_arr[] = $key.'='.urlencode($value);
136 136
         }
137 137
     }
138 138
     $link .= implode('&', $params_arr);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         $add_listing_link = get_page_link(geodir_add_listing_page_id());
162 162
 
163
-        return esc_url( add_query_arg(array('listing_type' => $post_type), $add_listing_link) );
163
+        return esc_url(add_query_arg(array('listing_type' => $post_type), $add_listing_link));
164 164
     } else
165 165
         return get_bloginfo('url');
166 166
 }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $pageURL .= "s";
181 181
     }
182 182
     $pageURL .= "://";
183
-    $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
183
+    $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
184 184
     /**
185 185
      * Filter the current page URL returned by function geodir_curPageURL().
186 186
      *
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 function geodir_is_page($gdpage = '')
253 253
 {
254 254
 
255
-    global $wp_query, $post,$wp;
255
+    global $wp_query, $post, $wp;
256 256
     //if(!is_admin()):
257 257
 
258 258
     switch ($gdpage):
@@ -277,14 +277,14 @@  discard block
 block discarded – undo
277 277
             break;
278 278
         case 'detail':
279 279
             $post_type = get_query_var('post_type');
280
-            if(is_array($post_type)){$post_type = reset($post_type);}
280
+            if (is_array($post_type)) {$post_type = reset($post_type); }
281 281
             if (is_single() && in_array($post_type, geodir_get_posttypes()))
282 282
                 return true;
283 283
             break;
284 284
         case 'pt':
285 285
             $post_type = get_query_var('post_type');
286
-            if(is_array($post_type)){$post_type = reset($post_type);}
287
-            if (is_post_type_archive() && in_array($post_type , geodir_get_posttypes()) && !is_tax())
286
+            if (is_array($post_type)) {$post_type = reset($post_type); }
287
+            if (is_post_type_archive() && in_array($post_type, geodir_get_posttypes()) && !is_tax())
288 288
                 return true;
289 289
 
290 290
             break;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
                 return true;
296 296
             }
297 297
             $post_type = get_query_var('post_type');
298
-            if(is_array($post_type)){$post_type = reset($post_type);}
298
+            if (is_array($post_type)) {$post_type = reset($post_type); }
299 299
             if (is_post_type_archive() && in_array($post_type, geodir_get_posttypes()))
300 300
                 return true;
301 301
 
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
             if (is_author() && isset($_REQUEST['geodir_dashbord']))
315 315
                 return true;
316 316
 			
317
-			if (function_exists('bp_loggedin_user_id') && function_exists('bp_displayed_user_id') && $my_id = (int)bp_loggedin_user_id()) {
318
-				if (((bool)bp_is_current_component('listings') || (bool)bp_is_current_component('favorites')) && $my_id > 0 && $my_id == (int)bp_displayed_user_id()) {
317
+			if (function_exists('bp_loggedin_user_id') && function_exists('bp_displayed_user_id') && $my_id = (int) bp_loggedin_user_id()) {
318
+				if (((bool) bp_is_current_component('listings') || (bool) bp_is_current_component('favorites')) && $my_id > 0 && $my_id == (int) bp_displayed_user_id()) {
319 319
 					return true;
320 320
 				}
321 321
 			}
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
         if (empty($wp->query_vars) || !array_diff(array_keys($wp->query_vars), array('preview', 'page', 'paged', 'cpage'))) {
369 369
             if (get_option('geodir_set_as_home'))
370 370
                 $wp->query_vars['gd_is_geodir_page'] = true;
371
-            if(geodir_is_page('home')){
371
+            if (geodir_is_page('home')) {
372 372
                 $wp->query_vars['gd_is_geodir_page'] = true;
373 373
             }
374 374
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         if (!isset($wp->query_vars['gd_is_geodir_page'])) {
422 422
             $geodir_taxonomis = geodir_get_taxonomies('', true);
423
-            if(!empty($geodir_taxonomis)){
423
+            if (!empty($geodir_taxonomis)) {
424 424
                 foreach ($geodir_taxonomis as $taxonomy) {
425 425
                     if (array_key_exists($taxonomy, $wp->query_vars)) {
426 426
                         $wp->query_vars['gd_is_geodir_page'] = true;
@@ -440,10 +440,10 @@  discard block
 block discarded – undo
440 440
 
441 441
 
442 442
 //check if homepage
443
-        if(!isset($wp->query_vars['gd_is_geodir_page'])
443
+        if (!isset($wp->query_vars['gd_is_geodir_page'])
444 444
             && !isset($wp->query_vars['page_id'])
445 445
             && !isset($wp->query_vars['pagename'])
446
-            && is_page_geodir_home()){
446
+            && is_page_geodir_home()) {
447 447
             $wp->query_vars['gd_is_geodir_page'] = true;
448 448
         }
449 449
         //echo $wp->query_vars['gd_is_geodir_page'] ;
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
              * @since 1.0.0
506 506
              * @param array $imagesizes[$size] Image size array of the passed key.
507 507
              */
508
-            return apply_filters('geodir_get_imagesize_' . $size, $imagesizes[$size]);
508
+            return apply_filters('geodir_get_imagesize_'.$size, $imagesizes[$size]);
509 509
 
510 510
         } elseif (!empty($size)) {
511 511
 
@@ -544,13 +544,13 @@  discard block
 block discarded – undo
544 544
     function createRandomString()
545 545
     {
546 546
         $chars = "abcdefghijkmlnopqrstuvwxyz1023456789";
547
-        srand((double)microtime() * 1000000);
547
+        srand((double) microtime() * 1000000);
548 548
         $i = 0;
549 549
         $rstring = '';
550 550
         while ($i <= 25) {
551 551
             $num = rand() % 33;
552 552
             $tmp = substr($chars, $num, 1);
553
-            $rstring = $rstring . $tmp;
553
+            $rstring = $rstring.$tmp;
554 554
             $i++;
555 555
         }
556 556
         return $rstring;
@@ -681,11 +681,11 @@  discard block
 block discarded – undo
681 681
         }
682 682
 		
683 683
 		if (!empty($subject)) {
684
-			$subject = __(stripslashes_deep($subject),'geodirectory');
684
+			$subject = __(stripslashes_deep($subject), 'geodirectory');
685 685
 		}
686 686
 		
687 687
 		if (!empty($message)) {
688
-			$message = __(stripslashes_deep($message),'geodirectory');
688
+			$message = __(stripslashes_deep($message), 'geodirectory');
689 689
 		}
690 690
 
691 691
         $to_message = nl2br($to_message);
@@ -705,12 +705,12 @@  discard block
 block discarded – undo
705 705
 
706 706
         if ($post_info) {
707 707
             $posted_date = $post_info->post_date;
708
-            $listingLink = '<a href="' . $productlink . '"><b>' . $post_info->post_title . '</b></a>';
708
+            $listingLink = '<a href="'.$productlink.'"><b>'.$post_info->post_title.'</b></a>';
709 709
         }
710 710
         $siteurl = home_url();
711
-        $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>';
711
+        $siteurl_link = '<a href="'.$siteurl.'">'.$siteurl.'</a>';
712 712
         $loginurl = geodir_login_url();
713
-        $loginurl_link = '<a href="' . $loginurl . '">login</a>';
713
+        $loginurl_link = '<a href="'.$loginurl.'">login</a>';
714 714
         
715 715
         $post_author_id = !empty($post_info) ? $post_info->post_author : 0;
716 716
         $post_author_name = geodir_get_client_name($post_author_id);
@@ -724,18 +724,18 @@  discard block
 block discarded – undo
724 724
             $fromEmailName = get_option('site_email_name');
725 725
         }
726 726
 
727
-        $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#comments#]', '[#login_url#]', '[#login_details#]', '[#client_name#]', '[#posted_date#]','[#from_email#]','[#user_login#]','[#username#]','[#post_author_id#]','[#post_author_name#]','[#current_date#]');
728
-        $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $to_message, $loginurl_link, $login_details, $toEmailName, $posted_date,$fromEmail, $user_login, $user_login, $post_author_id, $post_author_name, $current_date);
727
+        $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#comments#]', '[#login_url#]', '[#login_details#]', '[#client_name#]', '[#posted_date#]', '[#from_email#]', '[#user_login#]', '[#username#]', '[#post_author_id#]', '[#post_author_name#]', '[#current_date#]');
728
+        $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $to_message, $loginurl_link, $login_details, $toEmailName, $posted_date, $fromEmail, $user_login, $user_login, $post_author_id, $post_author_name, $current_date);
729 729
         $message = str_replace($search_array, $replace_array, $message);
730 730
 
731
-        $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#client_name#]', '[#posted_date#]','[#from_email#]','[#user_login#]','[#username#]','[#post_author_id#]','[#post_author_name#]','[#current_date#]');
732
-        $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $toEmailName, $posted_date,$fromEmail, $user_login, $user_login, $post_author_id, $post_author_name, $current_date);
731
+        $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#client_name#]', '[#posted_date#]', '[#from_email#]', '[#user_login#]', '[#username#]', '[#post_author_id#]', '[#post_author_name#]', '[#current_date#]');
732
+        $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $toEmailName, $posted_date, $fromEmail, $user_login, $user_login, $post_author_id, $post_author_name, $current_date);
733 733
         $subject = str_replace($search_array, $replace_array, $subject);
734 734
 
735
-        $headers = 'MIME-Version: 1.0' . "\r\n";
736
-        $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
737
-        $headers .= "Reply-To: " . $fromEmail . "\r\n";
738
-        $headers .= 'From: ' . $sitefromEmailName . ' <' . $sitefromEmail . '>' . "\r\n";
735
+        $headers = 'MIME-Version: 1.0'."\r\n";
736
+        $headers .= 'Content-type: text/html; charset=UTF-8'."\r\n";
737
+        $headers .= "Reply-To: ".$fromEmail."\r\n";
738
+        $headers .= 'From: '.$sitefromEmailName.' <'.$sitefromEmail.'>'."\r\n";
739 739
 
740 740
         $to = $toEmail;
741 741
 
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
          * @param string $post_id The post ID.
757 757
          * @param string $user_id The user ID.
758 758
          */
759
-        $to = apply_filters('geodir_sendEmail_to',$to,$fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id );
759
+        $to = apply_filters('geodir_sendEmail_to', $to, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id);
760 760
         /**
761 761
          * Filter the client email subject.
762 762
          *
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
          * @param string $post_id The post ID.
775 775
          * @param string $user_id The user ID.
776 776
          */
777
-        $subject = apply_filters('geodir_sendEmail_subject',$subject,$fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id );
777
+        $subject = apply_filters('geodir_sendEmail_subject', $subject, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id);
778 778
         /**
779 779
          * Filter the client email message.
780 780
          *
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
          * @param string $post_id The post ID.
793 793
          * @param string $user_id The user ID.
794 794
          */
795
-        $message = apply_filters('geodir_sendEmail_message',$message,$fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id );
795
+        $message = apply_filters('geodir_sendEmail_message', $message, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id);
796 796
         /**
797 797
          * Filter the client email headers.
798 798
          *
@@ -810,22 +810,22 @@  discard block
 block discarded – undo
810 810
          * @param string $post_id The post ID.
811 811
          * @param string $user_id The user ID.
812 812
          */
813
-        $headers = apply_filters('geodir_sendEmail_headers',$headers,$fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id );
813
+        $headers = apply_filters('geodir_sendEmail_headers', $headers, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id);
814 814
 
815 815
         $sent = wp_mail($to, $subject, $message, $headers);
816 816
 
817
-        if( ! $sent ) {
818
-            if ( is_array( $to ) ) {
819
-                $to = implode( ',', $to );
817
+        if (!$sent) {
818
+            if (is_array($to)) {
819
+                $to = implode(',', $to);
820 820
             }
821 821
             $log_message = sprintf(
822
-                __( "Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory' ),
822
+                __("Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory'),
823 823
                 $message_type,
824
-                date_i18n( 'F j Y H:i:s', current_time( 'timestamp' ) ),
824
+                date_i18n('F j Y H:i:s', current_time('timestamp')),
825 825
                 $to,
826 826
                 $subject
827 827
             );
828
-            geodir_error_log( $log_message );
828
+            geodir_error_log($log_message);
829 829
         }
830 830
 
831 831
         ///////// ADMIN BCC EMIALS
@@ -837,11 +837,11 @@  discard block
 block discarded – undo
837 837
             $subject = __(stripslashes_deep(get_option('geodir_post_submited_success_email_subject_admin')), 'geodirectory');
838 838
             $message = __(stripslashes_deep(get_option('geodir_post_submited_success_email_content_admin')), 'geodirectory');
839 839
 
840
-            $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#comments#]', '[#login_url#]', '[#login_details#]', '[#client_name#]', '[#posted_date#]','[#user_login#]','[#username#]');
840
+            $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#comments#]', '[#login_url#]', '[#login_details#]', '[#client_name#]', '[#posted_date#]', '[#user_login#]', '[#username#]');
841 841
             $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $to_message, $loginurl_link, $login_details, $toEmailName, $posted_date, $user_login, $user_login);
842 842
             $message = str_replace($search_array, $replace_array, $message);
843 843
 
844
-            $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#client_name#]', '[#posted_date#]','[#user_login#]','[#username#]');
844
+            $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#client_name#]', '[#posted_date#]', '[#user_login#]', '[#username#]');
845 845
             $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $toEmailName, $posted_date, $user_login, $user_login);
846 846
             $subject = str_replace($search_array, $replace_array, $subject);
847 847
 
@@ -866,21 +866,21 @@  discard block
 block discarded – undo
866 866
             $admin_bcc = true;
867 867
         }
868 868
 
869
-        if($admin_bcc===true){
869
+        if ($admin_bcc === true) {
870 870
             $sent = wp_mail($to, $subject, $message, $headers);
871 871
 
872
-            if( ! $sent ) {
873
-                if ( is_array( $to ) ) {
874
-                    $to = implode( ',', $to );
872
+            if (!$sent) {
873
+                if (is_array($to)) {
874
+                    $to = implode(',', $to);
875 875
                 }
876 876
                 $log_message = sprintf(
877
-                    __( "Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory' ),
877
+                    __("Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory'),
878 878
                     $message_type,
879
-                    date_i18n( 'F j Y H:i:s', current_time( 'timestamp' ) ),
879
+                    date_i18n('F j Y H:i:s', current_time('timestamp')),
880 880
                     $to,
881 881
                     $subject
882 882
                 );
883
-                geodir_error_log( $log_message );
883
+                geodir_error_log($log_message);
884 884
             }
885 885
         }
886 886
 
@@ -912,12 +912,12 @@  discard block
 block discarded – undo
912 912
         foreach ($parents as $parent):
913 913
             $item = get_term_by('id', $parent, get_query_var('taxonomy'));
914 914
             $url = get_term_link($item, get_query_var('taxonomy'));
915
-            echo '<li> > <a href="' . $url . '">' . $item->name . '</a></li>';
915
+            echo '<li> > <a href="'.$url.'">'.$item->name.'</a></li>';
916 916
         endforeach;
917 917
 
918 918
     endif;
919 919
 
920
-    echo '<li> > ' . $term->name . '</li>';
920
+    echo '<li> > '.$term->name.'</li>';
921 921
 }
922 922
 
923 923
 
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
          *
952 952
          * @since 1.0.0
953 953
          */
954
-        $breadcrumb .= '<li>' . apply_filters('geodir_breadcrumb_first_link', '<a href="' . home_url() . '">' . __('Home', 'geodirectory') . '</a>') . '</li>';
954
+        $breadcrumb .= '<li>'.apply_filters('geodir_breadcrumb_first_link', '<a href="'.home_url().'">'.__('Home', 'geodirectory').'</a>').'</li>';
955 955
 
956 956
         $gd_post_type = geodir_get_current_posttype();
957 957
         $post_type_info = get_post_type_object($gd_post_type);
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
             $location_manager = defined('POST_LOCATION_TABLE') ? true : false;
976 976
 			$neighbourhood_active = $location_manager && get_option('location_neighbourhoods') ? true : false;
977 977
 				
978
-			if(geodir_is_page('detail') && isset($post->country_slug)){
978
+			if (geodir_is_page('detail') && isset($post->country_slug)) {
979 979
                 $location_terms = array(
980 980
                     'gd_country' => $post->country_slug,
981 981
                     'gd_region' => $post->region_slug,
@@ -1030,12 +1030,12 @@  discard block
 block discarded – undo
1030 1030
             $is_location_last = '';
1031 1031
             $is_taxonomy_last = '';
1032 1032
             $breadcrumb .= '<li>';
1033
-            if (get_query_var($gd_post_type . 'category'))
1034
-                $gd_taxonomy = $gd_post_type . 'category';
1035
-            elseif (get_query_var($gd_post_type . '_tags'))
1036
-                $gd_taxonomy = $gd_post_type . '_tags';
1033
+            if (get_query_var($gd_post_type.'category'))
1034
+                $gd_taxonomy = $gd_post_type.'category';
1035
+            elseif (get_query_var($gd_post_type.'_tags'))
1036
+                $gd_taxonomy = $gd_post_type.'_tags';
1037 1037
 
1038
-            $breadcrumb .= $separator . '<a href="' . $listing_link . '">' . __(ucfirst($post_type_info->label), 'geodirectory') . '</a>';
1038
+            $breadcrumb .= $separator.'<a href="'.$listing_link.'">'.__(ucfirst($post_type_info->label), 'geodirectory').'</a>';
1039 1039
             if (!empty($gd_taxonomy) || geodir_is_page('detail'))
1040 1040
                 $is_location_last = false;
1041 1041
             else
@@ -1085,18 +1085,18 @@  discard block
 block discarded – undo
1085 1085
                         }
1086 1086
 
1087 1087
                         if ($is_location_last && $key == 'gd_country' && !(isset($location_terms['gd_region']) && $location_terms['gd_region'] != '') && !(isset($location_terms['gd_city']) && $location_terms['gd_city'] != '')) {
1088
-                            $breadcrumb .= $location_term_actual_country != '' ? $separator . $location_term_actual_country : $separator . $gd_location_link_text;
1088
+                            $breadcrumb .= $location_term_actual_country != '' ? $separator.$location_term_actual_country : $separator.$gd_location_link_text;
1089 1089
                         } else if ($is_location_last && $key == 'gd_region' && !(isset($location_terms['gd_city']) && $location_terms['gd_city'] != '')) {
1090
-                            $breadcrumb .= $location_term_actual_region != '' ? $separator . $location_term_actual_region : $separator . $gd_location_link_text;
1090
+                            $breadcrumb .= $location_term_actual_region != '' ? $separator.$location_term_actual_region : $separator.$gd_location_link_text;
1091 1091
                         } else if ($is_location_last && $key == 'gd_city' && empty($location_terms['gd_neighbourhood'])) {
1092
-                            $breadcrumb .= $location_term_actual_city != '' ? $separator . $location_term_actual_city : $separator . $gd_location_link_text;
1092
+                            $breadcrumb .= $location_term_actual_city != '' ? $separator.$location_term_actual_city : $separator.$gd_location_link_text;
1093 1093
                         } else if ($is_location_last && $key == 'gd_neighbourhood') {
1094
-                            $breadcrumb .= $separator . $gd_location_link_text;
1094
+                            $breadcrumb .= $separator.$gd_location_link_text;
1095 1095
                         } else {
1096 1096
                             if (get_option('permalink_structure') != '') {
1097
-                                $location_link .= $location_term . '/';
1097
+                                $location_link .= $location_term.'/';
1098 1098
                             } else {
1099
-                                $location_link .= "&$key=" . $location_term;
1099
+                                $location_link .= "&$key=".$location_term;
1100 1100
                             }
1101 1101
 
1102 1102
                             if ($key == 'gd_country' && $location_term_actual_country != '') {
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
                             }
1114 1114
                             */
1115 1115
 
1116
-                            $breadcrumb .= $separator . '<a href="' . $location_link . '">' . $gd_location_link_text . '</a>';
1116
+                            $breadcrumb .= $separator.'<a href="'.$location_link.'">'.$gd_location_link_text.'</a>';
1117 1117
                         }
1118 1118
                     }
1119 1119
                 }
@@ -1124,8 +1124,8 @@  discard block
 block discarded – undo
1124 1124
 
1125 1125
                 //if(get_option('geodir_add_categories_url'))
1126 1126
                 {
1127
-                    if (get_query_var($gd_post_type . '_tags')) {
1128
-                        $cat_link = $listing_link . 'tags/';
1127
+                    if (get_query_var($gd_post_type.'_tags')) {
1128
+                        $cat_link = $listing_link.'tags/';
1129 1129
                     } else
1130 1130
                         $cat_link = $listing_link;
1131 1131
 
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 
1137 1137
                         if ($location_term != '') {
1138 1138
                             if (get_option('permalink_structure') != '') {
1139
-                                $cat_link .= $location_term . '/';
1139
+                                $cat_link .= $location_term.'/';
1140 1140
                             }
1141 1141
                         }
1142 1142
                     }
@@ -1155,10 +1155,10 @@  discard block
 block discarded – undo
1155 1155
                         }
1156 1156
 
1157 1157
                         if ($term_index == count($term_array) && $is_taxonomy_last)
1158
-                            $breadcrumb .= $separator . $term_link_text;
1158
+                            $breadcrumb .= $separator.$term_link_text;
1159 1159
                         else {
1160
-                            $cat_link .= $term . '/';
1161
-                            $breadcrumb .= $separator . '<a href="' . $cat_link . '">' . $term_link_text . '</a>';
1160
+                            $cat_link .= $term.'/';
1161
+                            $breadcrumb .= $separator.'<a href="'.$cat_link.'">'.$term_link_text.'</a>';
1162 1162
                         }
1163 1163
                         $term_index++;
1164 1164
                     }
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
             }
1169 1169
 
1170 1170
             if (geodir_is_page('detail'))
1171
-                $breadcrumb .= $separator . get_the_title();
1171
+                $breadcrumb .= $separator.get_the_title();
1172 1172
 
1173 1173
             $breadcrumb .= '</li>';
1174 1174
 
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
             $default_author_link = apply_filters('geodir_dashboard_author_link', $default_author_link, $user_id);
1189 1189
 
1190 1190
             $breadcrumb .= '<li>';
1191
-            $breadcrumb .= $separator . '<a href="' . $default_author_link . '">' . __('My Dashboard', 'geodirectory') . '</a>';
1191
+            $breadcrumb .= $separator.'<a href="'.$default_author_link.'">'.__('My Dashboard', 'geodirectory').'</a>';
1192 1192
 
1193 1193
             if (isset($_REQUEST['list'])) {
1194 1194
                 $author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true', 'stype' => $_REQUEST['stype']), false);
@@ -1203,20 +1203,20 @@  discard block
 block discarded – undo
1203 1203
                  */
1204 1204
                 $author_link = apply_filters('geodir_dashboard_author_link', $author_link, $user_id, $_REQUEST['stype']);
1205 1205
 
1206
-                $breadcrumb .= $separator . '<a href="' . $author_link . '">' . __(ucfirst($post_type_info->label), 'geodirectory') . '</a>';
1207
-                $breadcrumb .= $separator . ucfirst(__('My', 'geodirectory') . ' ' . $_REQUEST['list']);
1206
+                $breadcrumb .= $separator.'<a href="'.$author_link.'">'.__(ucfirst($post_type_info->label), 'geodirectory').'</a>';
1207
+                $breadcrumb .= $separator.ucfirst(__('My', 'geodirectory').' '.$_REQUEST['list']);
1208 1208
             } else
1209
-                $breadcrumb .= $separator . __(ucfirst($post_type_info->label), 'geodirectory');
1209
+                $breadcrumb .= $separator.__(ucfirst($post_type_info->label), 'geodirectory');
1210 1210
 
1211 1211
             $breadcrumb .= '</li>';
1212 1212
         } elseif (is_category() || is_single()) {
1213 1213
             $category = get_the_category();
1214 1214
             if (is_category()) {
1215
-                $breadcrumb .= '<li>' . $separator . $category[0]->cat_name . '</li>';
1215
+                $breadcrumb .= '<li>'.$separator.$category[0]->cat_name.'</li>';
1216 1216
             }
1217 1217
             if (is_single()) {
1218
-                $breadcrumb .= '<li>' . $separator . '<a href="' . get_category_link($category[0]->term_id) . '">' . $category[0]->cat_name . '</a></li>';
1219
-                $breadcrumb .= '<li>' . $separator . get_the_title() . '</li>';
1218
+                $breadcrumb .= '<li>'.$separator.'<a href="'.get_category_link($category[0]->term_id).'">'.$category[0]->cat_name.'</a></li>';
1219
+                $breadcrumb .= '<li>'.$separator.get_the_title().'</li>';
1220 1220
             }
1221 1221
             /* End of my version ##################################################### */
1222 1222
         } else if (is_page()) {
@@ -1224,37 +1224,37 @@  discard block
 block discarded – undo
1224 1224
 
1225 1225
             if (geodir_is_page('location')) {
1226 1226
                 $location_page_id = geodir_location_page_id();
1227
-                $loc_post = get_post( $location_page_id );
1227
+                $loc_post = get_post($location_page_id);
1228 1228
                 $post_name = $loc_post->post_name;
1229
-                $slug= ucwords(str_replace('-',' ',$post_name));
1230
-                $page_title = !empty($slug )? $slug : __('Location', 'geodirectory');
1229
+                $slug = ucwords(str_replace('-', ' ', $post_name));
1230
+                $page_title = !empty($slug) ? $slug : __('Location', 'geodirectory');
1231 1231
             }
1232 1232
 
1233
-            $breadcrumb .= '<li>' . $separator;
1233
+            $breadcrumb .= '<li>'.$separator;
1234 1234
             $breadcrumb .= stripslashes_deep($page_title);
1235 1235
             $breadcrumb .= '</li>';
1236 1236
         } else if (is_tag()) {
1237
-            $breadcrumb .=  "<li> " . $separator . single_tag_title('',false) . '</li>';
1237
+            $breadcrumb .= "<li> ".$separator.single_tag_title('', false).'</li>';
1238 1238
         } else if (is_day()) {
1239
-            $breadcrumb .= "<li> " . $separator . __(" Archive for", 'geodirectory') . " ";
1239
+            $breadcrumb .= "<li> ".$separator.__(" Archive for", 'geodirectory')." ";
1240 1240
             the_time('F jS, Y');
1241 1241
             $breadcrumb .= '</li>';
1242 1242
         } else if (is_month()) {
1243
-            $breadcrumb .= "<li> " . $separator . __(" Archive for", 'geodirectory') . " ";
1243
+            $breadcrumb .= "<li> ".$separator.__(" Archive for", 'geodirectory')." ";
1244 1244
             the_time('F, Y');
1245 1245
             $breadcrumb .= '</li>';
1246 1246
         } else if (is_year()) {
1247
-            $breadcrumb .= "<li> " . $separator . __(" Archive for", 'geodirectory') . " ";
1247
+            $breadcrumb .= "<li> ".$separator.__(" Archive for", 'geodirectory')." ";
1248 1248
             the_time('Y');
1249 1249
             $breadcrumb .= '</li>';
1250 1250
         } else if (is_author()) {
1251
-            $breadcrumb .= "<li> " . $separator . __(" Author Archive", 'geodirectory');
1251
+            $breadcrumb .= "<li> ".$separator.__(" Author Archive", 'geodirectory');
1252 1252
             $breadcrumb .= '</li>';
1253 1253
         } else if (isset($_GET['paged']) && !empty($_GET['paged'])) {
1254
-            $breadcrumb .= "<li>" . $separator . __("Blog Archives", 'geodirectory');
1254
+            $breadcrumb .= "<li>".$separator.__("Blog Archives", 'geodirectory');
1255 1255
             $breadcrumb .= '</li>';
1256 1256
         } else if (is_search()) {
1257
-            $breadcrumb .= "<li> " . $separator . __(" Search Results", 'geodirectory');
1257
+            $breadcrumb .= "<li> ".$separator.__(" Search Results", 'geodirectory');
1258 1258
             $breadcrumb .= '</li>';
1259 1259
         }
1260 1260
         $breadcrumb .= '</ul></div>';
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
 function fetch_remote_file($url)
1311 1311
 {
1312 1312
     // extract the file name and extension from the url
1313
-    require_once(ABSPATH . 'wp-includes/pluggable.php');
1313
+    require_once(ABSPATH.'wp-includes/pluggable.php');
1314 1314
     $file_name = basename($url);
1315 1315
     if (strpos($file_name, '?') !== false) {
1316 1316
         list($file_name) = explode('?', $file_name);
@@ -1342,15 +1342,15 @@  discard block
 block discarded – undo
1342 1342
         return new WP_Error('upload_dir_error', $upload['error']);
1343 1343
 
1344 1344
 
1345
-    sleep(0.3);// if multiple remote file this can cause the remote server to timeout so we add a slight delay
1345
+    sleep(0.3); // if multiple remote file this can cause the remote server to timeout so we add a slight delay
1346 1346
 
1347 1347
     // fetch the remote url and write it to the placeholder file
1348
-    $headers = wp_remote_get($url, array('stream' => true,'filename' => $upload['file']));
1348
+    $headers = wp_remote_get($url, array('stream' => true, 'filename' => $upload['file']));
1349 1349
 
1350 1350
     $log_message = '';
1351
-    if( is_wp_error( $headers  ) ) {
1351
+    if (is_wp_error($headers)) {
1352 1352
         echo 'file: '.$url;
1353
-        return new WP_Error('import_file_error',$headers->get_error_message());
1353
+        return new WP_Error('import_file_error', $headers->get_error_message());
1354 1354
     }
1355 1355
 
1356 1356
     $filesize = filesize($upload['file']);
@@ -1363,21 +1363,21 @@  discard block
 block discarded – undo
1363 1363
         $log_message = sprintf(__('Remote server returned error response %1$d %2$s', 'geodirectory'), esc_html($headers['response']), get_status_header_desc($headers['response']));
1364 1364
     }
1365 1365
     elseif (isset($headers['headers']['content-length']) && $filesize != $headers['headers']['content-length']) {
1366
-        $log_message =  __('Remote file is incorrect size', 'geodirectory');
1366
+        $log_message = __('Remote file is incorrect size', 'geodirectory');
1367 1367
     }
1368 1368
     elseif (0 == $filesize) {
1369 1369
         $log_message = __('Zero size file downloaded', 'geodirectory');
1370 1370
     }
1371 1371
 
1372
-    if($log_message){
1372
+    if ($log_message) {
1373 1373
         $del = unlink($upload['file']);
1374
-        if(!$del){geodir_error_log(__('GeoDirectory: fetch_remote_file() failed to delete temp file.', 'geodirectory'));}
1375
-        return new WP_Error('import_file_error',$log_message );
1374
+        if (!$del) {geodir_error_log(__('GeoDirectory: fetch_remote_file() failed to delete temp file.', 'geodirectory')); }
1375
+        return new WP_Error('import_file_error', $log_message);
1376 1376
     }
1377 1377
 
1378 1378
     if ($dummy && $add_to_cache && is_array($upload)) {
1379 1379
         $images = get_transient('cached_dummy_images');
1380
-        if(is_array($images))
1380
+        if (is_array($images))
1381 1381
             $images[$key] = $upload;
1382 1382
         else
1383 1383
             $images = array($key => $upload);
@@ -1398,12 +1398,12 @@  discard block
 block discarded – undo
1398 1398
  */
1399 1399
 function geodir_max_upload_size()
1400 1400
 {
1401
-    $max_filesize = (float)get_option('geodir_upload_max_filesize', 2);
1401
+    $max_filesize = (float) get_option('geodir_upload_max_filesize', 2);
1402 1402
 
1403 1403
     if ($max_filesize > 0 && $max_filesize < 1) {
1404
-        $max_filesize = (int)($max_filesize * 1024) . 'kb';
1404
+        $max_filesize = (int) ($max_filesize * 1024).'kb';
1405 1405
     } else {
1406
-        $max_filesize = $max_filesize > 0 ? $max_filesize . 'mb' : '2mb';
1406
+        $max_filesize = $max_filesize > 0 ? $max_filesize.'mb' : '2mb';
1407 1407
     }
1408 1408
 
1409 1409
     /**
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
  */
1427 1427
 function geodir_dummy_folder_exists()
1428 1428
 {
1429
-    $path = geodir_plugin_path() . '/geodirectory-admin/dummy/';
1429
+    $path = geodir_plugin_path().'/geodirectory-admin/dummy/';
1430 1430
     if (!is_dir($path))
1431 1431
         return false;
1432 1432
     else
@@ -1470,35 +1470,35 @@  discard block
 block discarded – undo
1470 1470
     {
1471 1471
         global $wpdb;
1472 1472
         if ($message_type == 'expiration') {
1473
-            $subject = stripslashes(__(get_option('renew_email_subject'),'geodirectory'));
1474
-            $client_message = stripslashes(__(get_option('renew_email_content'),'geodirectory'));
1473
+            $subject = stripslashes(__(get_option('renew_email_subject'), 'geodirectory'));
1474
+            $client_message = stripslashes(__(get_option('renew_email_content'), 'geodirectory'));
1475 1475
         } elseif ($message_type == 'post_submited') {
1476
-            $subject = __(get_option('post_submited_success_email_subject_admin'),'geodirectory');
1477
-            $client_message = __(get_option('post_submited_success_email_content_admin'),'geodirectory');
1476
+            $subject = __(get_option('post_submited_success_email_subject_admin'), 'geodirectory');
1477
+            $client_message = __(get_option('post_submited_success_email_content_admin'), 'geodirectory');
1478 1478
         } elseif ($message_type == 'renew') {
1479
-            $subject = __(get_option('post_renew_success_email_subject_admin'),'geodirectory');
1480
-            $client_message = __(get_option('post_renew_success_email_content_admin'),'geodirectory');
1479
+            $subject = __(get_option('post_renew_success_email_subject_admin'), 'geodirectory');
1480
+            $client_message = __(get_option('post_renew_success_email_content_admin'), 'geodirectory');
1481 1481
         } elseif ($message_type == 'upgrade') {
1482
-            $subject = __(get_option('post_upgrade_success_email_subject_admin'),'geodirectory');
1483
-            $client_message = __(get_option('post_upgrade_success_email_content_admin'),'geodirectory');
1482
+            $subject = __(get_option('post_upgrade_success_email_subject_admin'), 'geodirectory');
1483
+            $client_message = __(get_option('post_upgrade_success_email_content_admin'), 'geodirectory');
1484 1484
         } elseif ($message_type == 'claim_approved') {
1485
-            $subject = __(get_option('claim_approved_email_subject'),'geodirectory');
1486
-            $client_message = __(get_option('claim_approved_email_content'),'geodirectory');
1485
+            $subject = __(get_option('claim_approved_email_subject'), 'geodirectory');
1486
+            $client_message = __(get_option('claim_approved_email_content'), 'geodirectory');
1487 1487
         } elseif ($message_type == 'claim_rejected') {
1488
-            $subject = __(get_option('claim_rejected_email_subject'),'geodirectory');
1489
-            $client_message = __(get_option('claim_rejected_email_content'),'geodirectory');
1488
+            $subject = __(get_option('claim_rejected_email_subject'), 'geodirectory');
1489
+            $client_message = __(get_option('claim_rejected_email_content'), 'geodirectory');
1490 1490
         } elseif ($message_type == 'claim_requested') {
1491
-            $subject = __(get_option('claim_email_subject_admin'),'geodirectory');
1492
-            $client_message = __(get_option('claim_email_content_admin'),'geodirectory');
1491
+            $subject = __(get_option('claim_email_subject_admin'), 'geodirectory');
1492
+            $client_message = __(get_option('claim_email_content_admin'), 'geodirectory');
1493 1493
         } elseif ($message_type == 'auto_claim') {
1494
-            $subject = __(get_option('auto_claim_email_subject'),'geodirectory');
1495
-            $client_message = __(get_option('auto_claim_email_content'),'geodirectory');
1494
+            $subject = __(get_option('auto_claim_email_subject'), 'geodirectory');
1495
+            $client_message = __(get_option('auto_claim_email_content'), 'geodirectory');
1496 1496
         } elseif ($message_type == 'payment_success') {
1497
-            $subject = __(get_option('post_payment_success_admin_email_subject'),'geodirectory');
1498
-            $client_message = __(get_option('post_payment_success_admin_email_content'),'geodirectory');
1497
+            $subject = __(get_option('post_payment_success_admin_email_subject'), 'geodirectory');
1498
+            $client_message = __(get_option('post_payment_success_admin_email_content'), 'geodirectory');
1499 1499
         } elseif ($message_type == 'payment_fail') {
1500
-            $subject = __(get_option('post_payment_fail_admin_email_subject'),'geodirectory');
1501
-            $client_message = __(get_option('post_payment_fail_admin_email_content'),'geodirectory');
1500
+            $subject = __(get_option('post_payment_fail_admin_email_subject'), 'geodirectory');
1501
+            $client_message = __(get_option('post_payment_fail_admin_email_content'), 'geodirectory');
1502 1502
         }
1503 1503
         $transaction_details = $custom_1;
1504 1504
         $fromEmail = get_option('site_email');
@@ -1509,11 +1509,11 @@  discard block
 block discarded – undo
1509 1509
         $productlink = get_permalink($page_id);
1510 1510
         $post_info = get_post($page_id);
1511 1511
         $post_date = date('dS F,Y', strtotime($post_info->post_date));
1512
-        $listingLink = '<a href="' . $productlink . '"><b>' . $post_info->post_title . '</b></a>';
1512
+        $listingLink = '<a href="'.$productlink.'"><b>'.$post_info->post_title.'</b></a>';
1513 1513
         $loginurl = geodir_login_url();
1514
-        $loginurl_link = '<a href="' . $loginurl . '">login</a>';
1514
+        $loginurl_link = '<a href="'.$loginurl.'">login</a>';
1515 1515
         $siteurl = home_url();
1516
-        $siteurl_link = '<a href="' . $siteurl . '">' . $fromEmailName . '</a>';
1516
+        $siteurl_link = '<a href="'.$siteurl.'">'.$fromEmailName.'</a>';
1517 1517
         $user_info = get_userdata($user_id);
1518 1518
         $user_email = $user_info->user_email;
1519 1519
         $display_name = geodir_get_client_name($user_id);
@@ -1527,14 +1527,14 @@  discard block
 block discarded – undo
1527 1527
         } else {
1528 1528
             $post_type = 'listing';
1529 1529
         }
1530
-        $renew_link = '<a href="' . $siteurl . '?ptype=post_' . $post_type . '&renew=1&pid=' . $page_id . '">' . RENEW_LINK . '</a>';
1530
+        $renew_link = '<a href="'.$siteurl.'?ptype=post_'.$post_type.'&renew=1&pid='.$page_id.'">'.RENEW_LINK.'</a>';
1531 1531
         $search_array = array('[#client_name#]', '[#listing_link#]', '[#posted_date#]', '[#number_of_days#]', '[#number_of_grace_days#]', '[#login_url#]', '[#username#]', '[#user_email#]', '[#site_name_url#]', '[#renew_link#]', '[#post_id#]', '[#site_name#]', '[#transaction_details#]');
1532 1532
         $replace_array = array($display_name, $listingLink, $post_date, $alivedays, $number_of_grace_days, $loginurl_link, $user_login, $user_email, $siteurl_link, $renew_link, $page_id, $fromEmailName, $transaction_details);
1533 1533
         $client_message = str_replace($search_array, $replace_array, $client_message);
1534 1534
         $subject = str_replace($search_array, $replace_array, $subject);
1535
-        $headers = 'MIME-Version: 1.0' . "\r\n";
1536
-        $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
1537
-        $headers .= 'From: ' . $fromEmailName . ' <' . $fromEmail . '>' . "\r\n";
1535
+        $headers = 'MIME-Version: 1.0'."\r\n";
1536
+        $headers .= 'Content-type: text/html; charset=UTF-8'."\r\n";
1537
+        $headers .= 'From: '.$fromEmailName.' <'.$fromEmail.'>'."\r\n";
1538 1538
 
1539 1539
         $to = $fromEmail;
1540 1540
         $message = $client_message;
@@ -1551,7 +1551,7 @@  discard block
 block discarded – undo
1551 1551
          * @param string $message_type Can be 'expiration','post_submited','renew','upgrade','claim_approved','claim_rejected','claim_requested','auto_claim','payment_success','payment_fail'.
1552 1552
          * @param string $custom_1 Custom data to be sent.
1553 1553
          */
1554
-        $to = apply_filters('geodir_adminEmail_to',$to,$page_id, $user_id, $message_type, $custom_1 );
1554
+        $to = apply_filters('geodir_adminEmail_to', $to, $page_id, $user_id, $message_type, $custom_1);
1555 1555
         /**
1556 1556
          * Filter the admin email subject.
1557 1557
          *
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
          * @param string $message_type Can be 'expiration','post_submited','renew','upgrade','claim_approved','claim_rejected','claim_requested','auto_claim','payment_success','payment_fail'.
1564 1564
          * @param string $custom_1 Custom data to be sent.
1565 1565
          */
1566
-        $subject = apply_filters('geodir_adminEmail_subject',$subject,$page_id, $user_id, $message_type, $custom_1);
1566
+        $subject = apply_filters('geodir_adminEmail_subject', $subject, $page_id, $user_id, $message_type, $custom_1);
1567 1567
         /**
1568 1568
          * Filter the admin email message.
1569 1569
          *
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
          * @param string $message_type Can be 'expiration','post_submited','renew','upgrade','claim_approved','claim_rejected','claim_requested','auto_claim','payment_success','payment_fail'.
1576 1576
          * @param string $custom_1 Custom data to be sent.
1577 1577
          */
1578
-        $message = apply_filters('geodir_adminEmail_message',$message,$page_id, $user_id, $message_type, $custom_1);
1578
+        $message = apply_filters('geodir_adminEmail_message', $message, $page_id, $user_id, $message_type, $custom_1);
1579 1579
         /**
1580 1580
          * Filter the admin email headers.
1581 1581
          *
@@ -1587,23 +1587,23 @@  discard block
 block discarded – undo
1587 1587
          * @param string $message_type Can be 'expiration','post_submited','renew','upgrade','claim_approved','claim_rejected','claim_requested','auto_claim','payment_success','payment_fail'.
1588 1588
          * @param string $custom_1 Custom data to be sent.
1589 1589
          */
1590
-        $headers = apply_filters('geodir_adminEmail_headers',$headers,$page_id, $user_id, $message_type, $custom_1);
1590
+        $headers = apply_filters('geodir_adminEmail_headers', $headers, $page_id, $user_id, $message_type, $custom_1);
1591 1591
 
1592 1592
 
1593 1593
 
1594 1594
         $sent = wp_mail($to, $subject, $message, $headers);
1595
-        if( ! $sent ) {
1596
-            if ( is_array( $to ) ) {
1597
-                $to = implode( ',', $to );
1595
+        if (!$sent) {
1596
+            if (is_array($to)) {
1597
+                $to = implode(',', $to);
1598 1598
             }
1599 1599
             $log_message = sprintf(
1600
-                __( "Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory' ),
1600
+                __("Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory'),
1601 1601
                 $message_type,
1602
-                date_i18n( 'F j Y H:i:s', current_time( 'timestamp' ) ),
1602
+                date_i18n('F j Y H:i:s', current_time('timestamp')),
1603 1603
                 $to,
1604 1604
                 $subject
1605 1605
             );
1606
-            geodir_error_log( $log_message );
1606
+            geodir_error_log($log_message);
1607 1607
         }
1608 1608
     }
1609 1609
 }
@@ -1629,18 +1629,18 @@  discard block
 block discarded – undo
1629 1629
     {
1630 1630
         $login_details = '';
1631 1631
         if ($message_type == 'send_friend') {
1632
-            $subject = stripslashes(__(get_option('email_friend_subject'),'geodirectory'));
1633
-            $message = stripslashes(__(get_option('email_friend_content'),'geodirectory'));
1632
+            $subject = stripslashes(__(get_option('email_friend_subject'), 'geodirectory'));
1633
+            $message = stripslashes(__(get_option('email_friend_content'), 'geodirectory'));
1634 1634
         } elseif ($message_type == 'send_enquiry') {
1635
-            $subject = __(get_option('email_enquiry_subject'),'geodirectory');
1636
-            $message = __(get_option('email_enquiry_content'),'geodirectory');
1635
+            $subject = __(get_option('email_enquiry_subject'), 'geodirectory');
1636
+            $message = __(get_option('email_enquiry_content'), 'geodirectory');
1637 1637
         } elseif ($message_type == 'forgot_password') {
1638
-            $subject = __(get_option('forgot_password_subject'),'geodirectory');
1639
-            $message = __(get_option('forgot_password_content'),'geodirectory');
1638
+            $subject = __(get_option('forgot_password_subject'), 'geodirectory');
1639
+            $message = __(get_option('forgot_password_content'), 'geodirectory');
1640 1640
             $login_details = $to_message;
1641 1641
         } elseif ($message_type == 'registration') {
1642
-            $subject = __(get_option('registration_success_email_subject'),'geodirectory');
1643
-            $message = __(get_option('registration_success_email_content'),'geodirectory');
1642
+            $subject = __(get_option('registration_success_email_subject'), 'geodirectory');
1643
+            $message = __(get_option('registration_success_email_content'), 'geodirectory');
1644 1644
             $login_details = $to_message;
1645 1645
         }
1646 1646
         $to_message = nl2br($to_message);
@@ -1648,11 +1648,11 @@  discard block
 block discarded – undo
1648 1648
         $sitefromEmailName = get_site_emailName();
1649 1649
         $productlink = get_permalink($post_id);
1650 1650
         $post_info = get_post($post_id);
1651
-        $listingLink = '<a href="' . $productlink . '"><b>' . $post_info->post_title . '</b></a>';
1651
+        $listingLink = '<a href="'.$productlink.'"><b>'.$post_info->post_title.'</b></a>';
1652 1652
         $siteurl = home_url();
1653
-        $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>';
1653
+        $siteurl_link = '<a href="'.$siteurl.'">'.$siteurl.'</a>';
1654 1654
         $loginurl = geodir_login_url();
1655
-        $loginurl_link = '<a href="' . $loginurl . '">login</a>';
1655
+        $loginurl_link = '<a href="'.$loginurl.'">login</a>';
1656 1656
         if ($fromEmail == '') {
1657 1657
             $fromEmail = get_option('site_email');
1658 1658
         }
@@ -1666,26 +1666,26 @@  discard block
 block discarded – undo
1666 1666
         $search_array = array('[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#to_name#]', '[#from_name#]', '[#subject#]', '[#client_name#]');
1667 1667
         $replace_array = array($listingLink, $siteurl_link, $post_id, $sitefromEmailName, $toEmailName, $fromEmailName, $to_subject, $toEmailName);
1668 1668
         $subject = str_replace($search_array, $replace_array, $subject);
1669
-        $headers = 'MIME-Version: 1.0' . "\r\n";
1670
-        $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
1671
-        $headers .= "Reply-To: " . $fromEmail . "\r\n";
1672
-        $headers .= 'From: ' . $sitefromEmailName . ' <' . $sitefromEmail . '>' . "\r\n";
1669
+        $headers = 'MIME-Version: 1.0'."\r\n";
1670
+        $headers .= 'Content-type: text/html; charset=UTF-8'."\r\n";
1671
+        $headers .= "Reply-To: ".$fromEmail."\r\n";
1672
+        $headers .= 'From: '.$sitefromEmailName.' <'.$sitefromEmail.'>'."\r\n";
1673 1673
 
1674 1674
         $to = $toEmail;
1675 1675
 
1676 1676
         $sent = wp_mail($to, $subject, $message, $headers);
1677
-        if( ! $sent ) {
1678
-            if ( is_array( $to ) ) {
1679
-                $to = implode( ',', $to );
1677
+        if (!$sent) {
1678
+            if (is_array($to)) {
1679
+                $to = implode(',', $to);
1680 1680
             }
1681 1681
             $log_message = sprintf(
1682
-                __( "Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory' ),
1682
+                __("Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory'),
1683 1683
                 $message_type,
1684
-                date_i18n( 'F j Y H:i:s', current_time( 'timestamp' ) ),
1684
+                date_i18n('F j Y H:i:s', current_time('timestamp')),
1685 1685
                 $to,
1686 1686
                 $subject
1687 1687
             );
1688
-            geodir_error_log( $log_message );
1688
+            geodir_error_log($log_message);
1689 1689
         }
1690 1690
 
1691 1691
         ///////// ADMIN BCC EMIALS
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
         if ($message_type == 'registration') {
1694 1694
             $message_raw = explode(__("Password:", 'geodirectory'), $message);
1695 1695
             $message_raw2 = explode("</p>", $message_raw[1], 2);
1696
-            $message = $message_raw[0] . __('Password:', 'geodirectory') . ' **********</p>' . $message_raw2[1];
1696
+            $message = $message_raw[0].__('Password:', 'geodirectory').' **********</p>'.$message_raw2[1];
1697 1697
         }
1698 1698
         $adminEmail = get_bloginfo('admin_email');
1699 1699
         $to = $adminEmail;
@@ -1711,20 +1711,20 @@  discard block
 block discarded – undo
1711 1711
             $admin_bcc = true;
1712 1712
         }
1713 1713
 
1714
-        if($admin_bcc === true){
1714
+        if ($admin_bcc === true) {
1715 1715
             $sent = wp_mail($to, $subject, $message, $headers);
1716
-            if( ! $sent ) {
1717
-                if ( is_array( $to ) ) {
1718
-                    $to = implode( ',', $to );
1716
+            if (!$sent) {
1717
+                if (is_array($to)) {
1718
+                    $to = implode(',', $to);
1719 1719
                 }
1720 1720
                 $log_message = sprintf(
1721
-                    __( "Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory' ),
1721
+                    __("Email from GeoDirectory failed to send.\nMessage type: %s\nSend time: %s\nTo: %s\nSubject: %s\n\n", 'geodirectory'),
1722 1722
                     $message_type,
1723
-                    date_i18n( 'F j Y H:i:s', current_time( 'timestamp' ) ),
1723
+                    date_i18n('F j Y H:i:s', current_time('timestamp')),
1724 1724
                     $to,
1725 1725
                     $subject
1726 1726
                 );
1727
-                geodir_error_log( $log_message );
1727
+                geodir_error_log($log_message);
1728 1728
             }
1729 1729
         }
1730 1730
 
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
 function geodir_custom_posts_body_class($classes) {
1773 1773
     global $wpdb, $wp;
1774 1774
     $post_types = geodir_get_posttypes('object');
1775
-    if (!empty($post_types) && count((array)$post_types) > 1) {
1775
+    if (!empty($post_types) && count((array) $post_types) > 1) {
1776 1776
         $classes[] = 'geodir_custom_posts';
1777 1777
     }
1778 1778
 
@@ -1832,7 +1832,7 @@  discard block
 block discarded – undo
1832 1832
     $geodir_option = get_option($geodir_option_name);
1833 1833
 
1834 1834
     if (!empty($geodir_option)) {
1835
-        add_option($geodir_option_name . '_' . $version_date, $geodir_option);
1835
+        add_option($geodir_option_name.'_'.$version_date, $geodir_option);
1836 1836
     }
1837 1837
 }
1838 1838
 
@@ -1938,36 +1938,36 @@  discard block
 block discarded – undo
1938 1938
 
1939 1939
     $query_args = $gd_query_args_widgets;
1940 1940
     if (empty($query_args) || empty($query_args['is_geodir_loop'])) {
1941
-        return $wpdb->posts . ".post_date DESC, ";
1941
+        return $wpdb->posts.".post_date DESC, ";
1942 1942
     }
1943 1943
 
1944 1944
     $post_type = empty($query_args['post_type']) ? 'gd_place' : $query_args['post_type'];
1945
-    $table = $plugin_prefix . $post_type . '_detail';
1945
+    $table = $plugin_prefix.$post_type.'_detail';
1946 1946
 
1947 1947
     $sort_by = !empty($query_args['order_by']) ? $query_args['order_by'] : '';
1948 1948
 
1949 1949
     switch ($sort_by) {
1950 1950
         case 'latest':
1951 1951
         case 'newest':
1952
-            $orderby = $wpdb->posts . ".post_date DESC, ";
1952
+            $orderby = $wpdb->posts.".post_date DESC, ";
1953 1953
             break;
1954 1954
         case 'featured':
1955
-            $orderby = $table . ".is_featured ASC, ";
1955
+            $orderby = $table.".is_featured ASC, ";
1956 1956
             break;
1957 1957
         case 'az':
1958
-            $orderby = $wpdb->posts . ".post_title ASC, ";
1958
+            $orderby = $wpdb->posts.".post_title ASC, ";
1959 1959
             break;
1960 1960
         case 'high_review':
1961
-            $orderby = $table . ".rating_count DESC, " . $table . ".overall_rating DESC, ";
1961
+            $orderby = $table.".rating_count DESC, ".$table.".overall_rating DESC, ";
1962 1962
             break;
1963 1963
         case 'high_rating':
1964
-            $orderby = "( " . $table . ".overall_rating  ) DESC, ";
1964
+            $orderby = "( ".$table.".overall_rating  ) DESC, ";
1965 1965
             break;
1966 1966
         case 'random':
1967 1967
             $orderby = "RAND(), ";
1968 1968
             break;
1969 1969
         default:
1970
-            $orderby = $wpdb->posts . ".post_title ASC, ";
1970
+            $orderby = $wpdb->posts.".post_title ASC, ";
1971 1971
             break;
1972 1972
     }
1973 1973
 
@@ -1994,9 +1994,9 @@  discard block
 block discarded – undo
1994 1994
     $gd_query_args_widgets = $query_args;
1995 1995
 
1996 1996
     $post_type = empty($query_args['post_type']) ? 'gd_place' : $query_args['post_type'];
1997
-    $table = $plugin_prefix . $post_type . '_detail';
1997
+    $table = $plugin_prefix.$post_type.'_detail';
1998 1998
 
1999
-    $fields = $wpdb->posts . ".*, " . $table . ".*";
1999
+    $fields = $wpdb->posts.".*, ".$table.".*";
2000 2000
     /**
2001 2001
      * Filter widget listing fields string part that is being used for query.
2002 2002
      *
@@ -2007,7 +2007,7 @@  discard block
 block discarded – undo
2007 2007
      */
2008 2008
     $fields = apply_filters('geodir_filter_widget_listings_fields', $fields, $table, $post_type);
2009 2009
 
2010
-    $join = "INNER JOIN " . $table . " ON (" . $table . ".post_id = " . $wpdb->posts . ".ID)";
2010
+    $join = "INNER JOIN ".$table." ON (".$table.".post_id = ".$wpdb->posts.".ID)";
2011 2011
 
2012 2012
     ########### WPML ###########
2013 2013
 
@@ -2015,7 +2015,7 @@  discard block
 block discarded – undo
2015 2015
         global $sitepress;
2016 2016
         $lang_code = ICL_LANGUAGE_CODE;
2017 2017
         if ($lang_code) {
2018
-            $join .= " JOIN " . $table_prefix . "icl_translations icl_t ON icl_t.element_id = " . $table_prefix . "posts.ID";
2018
+            $join .= " JOIN ".$table_prefix."icl_translations icl_t ON icl_t.element_id = ".$table_prefix."posts.ID";
2019 2019
         }
2020 2020
     }
2021 2021
 
@@ -2030,9 +2030,9 @@  discard block
 block discarded – undo
2030 2030
      */
2031 2031
     $join = apply_filters('geodir_filter_widget_listings_join', $join, $post_type);
2032 2032
 
2033
-    $post_status = is_super_admin() ? " OR " . $wpdb->posts . ".post_status = 'private'" : '';
2033
+    $post_status = is_super_admin() ? " OR ".$wpdb->posts.".post_status = 'private'" : '';
2034 2034
 
2035
-    $where = " AND ( " . $wpdb->posts . ".post_status = 'publish' " . $post_status . " ) AND " . $wpdb->posts . ".post_type = '" . $post_type . "'";
2035
+    $where = " AND ( ".$wpdb->posts.".post_status = 'publish' ".$post_status." ) AND ".$wpdb->posts.".post_type = '".$post_type."'";
2036 2036
 
2037 2037
     ########### WPML ###########
2038 2038
     if (function_exists('icl_object_id')) {
@@ -2049,7 +2049,7 @@  discard block
 block discarded – undo
2049 2049
      * @param string $post_type Post type.
2050 2050
      */
2051 2051
     $where = apply_filters('geodir_filter_widget_listings_where', $where, $post_type);
2052
-    $where = $where != '' ? " WHERE 1=1 " . $where : '';
2052
+    $where = $where != '' ? " WHERE 1=1 ".$where : '';
2053 2053
 
2054 2054
     $groupby = " GROUP BY $wpdb->posts.ID ";
2055 2055
     /**
@@ -2062,10 +2062,10 @@  discard block
 block discarded – undo
2062 2062
     $groupby = apply_filters('geodir_filter_widget_listings_groupby', $groupby, $post_type);
2063 2063
 
2064 2064
     if ($count_only) {
2065
-        $sql = "SELECT COUNT(" . $wpdb->posts . ".ID) AS total FROM " . $wpdb->posts . "
2066
-			" . $join . "
2065
+        $sql = "SELECT COUNT(".$wpdb->posts.".ID) AS total FROM ".$wpdb->posts."
2066
+			" . $join."
2067 2067
 			" . $where;
2068
-        $rows = (int)$wpdb->get_var($sql);
2068
+        $rows = (int) $wpdb->get_var($sql);
2069 2069
     } else {
2070 2070
         $orderby = geodir_widget_listings_get_order($query_args);
2071 2071
         /**
@@ -2077,8 +2077,8 @@  discard block
 block discarded – undo
2077 2077
          * @param string $post_type Post type.
2078 2078
          */
2079 2079
         $orderby = apply_filters('geodir_filter_widget_listings_orderby', $orderby, $table, $post_type);
2080
-        $orderby .= $wpdb->posts . ".post_title ASC";
2081
-        $orderby = $orderby != '' ? " ORDER BY " . $orderby : '';
2080
+        $orderby .= $wpdb->posts.".post_title ASC";
2081
+        $orderby = $orderby != '' ? " ORDER BY ".$orderby : '';
2082 2082
 
2083 2083
         $limit = !empty($query_args['posts_per_page']) ? $query_args['posts_per_page'] : 5;
2084 2084
         /**
@@ -2091,16 +2091,16 @@  discard block
 block discarded – undo
2091 2091
         $limit = apply_filters('geodir_filter_widget_listings_limit', $limit, $post_type);
2092 2092
 
2093 2093
         $page = !empty($query_args['pageno']) ? absint($query_args['pageno']) : 1;
2094
-        if ( !$page )
2094
+        if (!$page)
2095 2095
             $page = 1;
2096 2096
 
2097
-        $limit = (int)$limit > 0 ? " LIMIT " . absint( ( $page - 1 ) * (int)$limit ) . ", " . (int)$limit : "";
2097
+        $limit = (int) $limit > 0 ? " LIMIT ".absint(($page - 1) * (int) $limit).", ".(int) $limit : "";
2098 2098
 
2099
-        $sql = "SELECT SQL_CALC_FOUND_ROWS " . $fields . " FROM " . $wpdb->posts . "
2100
-			" . $join . "
2101
-			" . $where . "
2102
-			" . $groupby . "
2103
-			" . $orderby . "
2099
+        $sql = "SELECT SQL_CALC_FOUND_ROWS ".$fields." FROM ".$wpdb->posts."
2100
+			" . $join."
2101
+			" . $where."
2102
+			" . $groupby."
2103
+			" . $orderby."
2104 2104
 			" . $limit;
2105 2105
         $rows = $wpdb->get_results($sql);
2106 2106
     }
@@ -2153,10 +2153,10 @@  discard block
 block discarded – undo
2153 2153
     }
2154 2154
 
2155 2155
     $post_type = empty($query_args['post_type']) ? 'gd_place' : $query_args['post_type'];
2156
-    $table = $plugin_prefix . $post_type . '_detail';
2156
+    $table = $plugin_prefix.$post_type.'_detail';
2157 2157
 
2158 2158
     if (!empty($query_args['with_pics_only'])) {
2159
-        $join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
2159
+        $join .= " LEFT JOIN ".GEODIR_ATTACHMENT_TABLE." ON ( ".GEODIR_ATTACHMENT_TABLE.".post_id=".$table.".post_id AND ".GEODIR_ATTACHMENT_TABLE.".mime_type LIKE '%image%' )";
2160 2160
     }
2161 2161
 
2162 2162
     if (!empty($query_args['tax_query'])) {
@@ -2188,7 +2188,7 @@  discard block
 block discarded – undo
2188 2188
         return $where;
2189 2189
     }
2190 2190
     $post_type = empty($query_args['post_type']) ? 'gd_place' : $query_args['post_type'];
2191
-    $table = $plugin_prefix . $post_type . '_detail';
2191
+    $table = $plugin_prefix.$post_type.'_detail';
2192 2192
 
2193 2193
     if (!empty($query_args)) {
2194 2194
         if (!empty($query_args['gd_location']) && function_exists('geodir_default_location_where')) {
@@ -2196,27 +2196,27 @@  discard block
 block discarded – undo
2196 2196
         }
2197 2197
 
2198 2198
         if (!empty($query_args['post_author'])) {
2199
-            $where .= " AND " . $wpdb->posts . ".post_author = " . (int)$query_args['post_author'];
2199
+            $where .= " AND ".$wpdb->posts.".post_author = ".(int) $query_args['post_author'];
2200 2200
         }
2201 2201
         
2202 2202
         if (!empty($query_args['show_featured_only'])) {
2203
-            $where .= " AND " . $table . ".is_featured = '1'";
2203
+            $where .= " AND ".$table.".is_featured = '1'";
2204 2204
         }
2205 2205
 
2206 2206
         if (!empty($query_args['show_special_only'])) {
2207
-            $where .= " AND ( " . $table . ".geodir_special_offers != '' AND " . $table . ".geodir_special_offers IS NOT NULL )";
2207
+            $where .= " AND ( ".$table.".geodir_special_offers != '' AND ".$table.".geodir_special_offers IS NOT NULL )";
2208 2208
         }
2209 2209
 
2210 2210
         if (!empty($query_args['with_pics_only'])) {
2211
-            $where .= " AND " . GEODIR_ATTACHMENT_TABLE . ".ID IS NOT NULL ";
2211
+            $where .= " AND ".GEODIR_ATTACHMENT_TABLE.".ID IS NOT NULL ";
2212 2212
         }
2213 2213
 
2214 2214
         if (!empty($query_args['featured_image_only'])) {
2215
-            $where .= " AND " . $table . ".featured_image IS NOT NULL AND " . $table . ".featured_image!='' ";
2215
+            $where .= " AND ".$table.".featured_image IS NOT NULL AND ".$table.".featured_image!='' ";
2216 2216
         }
2217 2217
 
2218 2218
         if (!empty($query_args['with_videos_only'])) {
2219
-            $where .= " AND ( " . $table . ".geodir_video != '' AND " . $table . ".geodir_video IS NOT NULL )";
2219
+            $where .= " AND ( ".$table.".geodir_video != '' AND ".$table.".geodir_video IS NOT NULL )";
2220 2220
         }
2221 2221
 
2222 2222
         if (!empty($query_args['tax_query'])) {
@@ -2273,7 +2273,7 @@  discard block
 block discarded – undo
2273 2273
     }
2274 2274
 
2275 2275
     if (!empty($query_args) && !empty($query_args['posts_per_page'])) {
2276
-        $limit = (int)$query_args['posts_per_page'];
2276
+        $limit = (int) $query_args['posts_per_page'];
2277 2277
     }
2278 2278
 
2279 2279
     return $limit;
@@ -2416,9 +2416,9 @@  discard block
 block discarded – undo
2416 2416
         add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
2417 2417
     }
2418 2418
     $home_url = str_replace("www.", "", $home_url);
2419
-    if ( (strpos($home_url, $cur_url) !== false || strpos($home_url . '/', $cur_url) !== false) && ('page' == get_option('show_on_front') && get_option('page_on_front') && get_option('page_on_front')==get_option('geodir_home_page')) ) {
2419
+    if ((strpos($home_url, $cur_url) !== false || strpos($home_url.'/', $cur_url) !== false) && ('page' == get_option('show_on_front') && get_option('page_on_front') && get_option('page_on_front') == get_option('geodir_home_page'))) {
2420 2420
         return true;
2421
-    }elseif(get_query_var('page_id') == get_option('page_on_front') && 'page' == get_option('show_on_front') && get_option('page_on_front') && get_option('page_on_front')==get_option('geodir_home_page')){
2421
+    }elseif (get_query_var('page_id') == get_option('page_on_front') && 'page' == get_option('show_on_front') && get_option('page_on_front') && get_option('page_on_front') == get_option('geodir_home_page')) {
2422 2422
         return true;
2423 2423
     } else {
2424 2424
         return false;
@@ -2501,19 +2501,19 @@  discard block
 block discarded – undo
2501 2501
 
2502 2502
     $gd_post_type = geodir_get_current_posttype();
2503 2503
 
2504
-    $category_limit = isset($instance['category_limit']) && $instance['category_limit'] > 0 ? (int)$instance['category_limit'] : 15;
2505
-    if(!empty($gd_post_type)){
2504
+    $category_limit = isset($instance['category_limit']) && $instance['category_limit'] > 0 ? (int) $instance['category_limit'] : 15;
2505
+    if (!empty($gd_post_type)) {
2506 2506
         $default_post_type = $gd_post_type;
2507
-    }elseif(isset($instance['default_post_type']) && gdsc_is_post_type_valid($instance['default_post_type']) ){
2507
+    }elseif (isset($instance['default_post_type']) && gdsc_is_post_type_valid($instance['default_post_type'])) {
2508 2508
         $default_post_type = $instance['default_post_type'];
2509
-    }else{
2509
+    } else {
2510 2510
         $all_gd_post_type = geodir_get_posttypes();
2511 2511
         $default_post_type = (isset($all_gd_post_type[0])) ? $all_gd_post_type[0] : '';
2512 2512
     }
2513 2513
 
2514 2514
     $taxonomy = array();
2515 2515
     if (!empty($gd_post_type)) {
2516
-        $taxonomy[] = $gd_post_type . "category";
2516
+        $taxonomy[] = $gd_post_type."category";
2517 2517
     } else {
2518 2518
         $taxonomy = geodir_get_taxonomies($gd_post_type);
2519 2519
     }
@@ -2533,7 +2533,7 @@  discard block
 block discarded – undo
2533 2533
             $b_terms[$b_key] = geodir_sort_terms($b_val, 'count');
2534 2534
         }
2535 2535
 
2536
-        $default_taxonomy = $default_post_type != '' && isset($b_terms[$default_post_type . 'category']) ? $default_post_type . 'category' : '';
2536
+        $default_taxonomy = $default_post_type != '' && isset($b_terms[$default_post_type.'category']) ? $default_post_type.'category' : '';
2537 2537
 
2538 2538
         $tax_change_output = '';
2539 2539
         if (count($b_terms) > 1) {
@@ -2541,20 +2541,20 @@  discard block
 block discarded – undo
2541 2541
             foreach ($b_terms as $key => $val) {
2542 2542
                 $ptype = get_post_type_object(str_replace("category", "", $key));
2543 2543
                 $cpt_name = __($ptype->labels->singular_name, 'geodirectory');
2544
-                $tax_change_output .= "<option value='$key' ". selected($key, $default_taxonomy, false) .">" . sprintf(__('%s Categories', 'geodirectory'),$cpt_name) . "</option>";
2544
+                $tax_change_output .= "<option value='$key' ".selected($key, $default_taxonomy, false).">".sprintf(__('%s Categories', 'geodirectory'), $cpt_name)."</option>";
2545 2545
             }
2546 2546
             $tax_change_output .= "</select>";
2547 2547
         }
2548 2548
 
2549 2549
         if (!empty($b_terms)) {
2550
-            $terms = $default_taxonomy != '' && isset($b_terms[$default_taxonomy]) ? $b_terms[$default_taxonomy] : reset($b_terms);// get the first array
2551
-            global $cat_count;//make global so we can change via function
2550
+            $terms = $default_taxonomy != '' && isset($b_terms[$default_taxonomy]) ? $b_terms[$default_taxonomy] : reset($b_terms); // get the first array
2551
+            global $cat_count; //make global so we can change via function
2552 2552
             $cat_count = 0;
2553 2553
             ?>
2554 2554
             <div class="geodir-category-list-in clearfix">
2555 2555
                 <div class="geodir-cat-list clearfix">
2556 2556
                     <?php
2557
-                    echo $before_title . __($title) . $after_title;
2557
+                    echo $before_title.__($title).$after_title;
2558 2558
 
2559 2559
                     echo $tax_change_output;
2560 2560
 
@@ -2571,8 +2571,8 @@  discard block
 block discarded – undo
2571 2571
                     $hide = 'style="display:none;"';
2572 2572
                 }
2573 2573
                 echo "<div class='geodir-cat-list-more' $hide >";
2574
-                echo '<a href="javascript:void(0)" class="geodir-morecat geodir-showcat">' . __('More Categories', 'geodirectory') . '</a>';
2575
-                echo '<a href="javascript:void(0)" class="geodir-morecat geodir-hidecat geodir-hide">' . __('Less Categories', 'geodirectory') . '</a>';
2574
+                echo '<a href="javascript:void(0)" class="geodir-morecat geodir-showcat">'.__('More Categories', 'geodirectory').'</a>';
2575
+                echo '<a href="javascript:void(0)" class="geodir-morecat geodir-hidecat geodir-hide">'.__('Less Categories', 'geodirectory').'</a>';
2576 2576
                 echo "</div>";
2577 2577
                 /* add scripts */
2578 2578
                 add_action('wp_footer', 'geodir_popular_category_add_scripts', 100);
@@ -2612,7 +2612,7 @@  discard block
 block discarded – undo
2612 2612
         $class_row = $cat_count > $category_limit ? 'geodir-pcat-hide geodir-hide' : 'geodir-pcat-show';
2613 2613
         $total_post = $cat->count;
2614 2614
 
2615
-        $term_link = get_term_link( $cat, $cat->taxonomy );
2615
+        $term_link = get_term_link($cat, $cat->taxonomy);
2616 2616
         /**
2617 2617
          * Filer the category term link.
2618 2618
          *
@@ -2621,10 +2621,10 @@  discard block
 block discarded – undo
2621 2621
          * @param int    $cat->term_id The term id.
2622 2622
          * @param string $post_type Wordpress post type.
2623 2623
          */
2624
-        $term_link = apply_filters( 'geodir_category_term_link', $term_link, $cat->term_id, $post_type );
2624
+        $term_link = apply_filters('geodir_category_term_link', $term_link, $cat->term_id, $post_type);
2625 2625
 
2626
-        echo '<li class="' . $class_row . '"><a href="' . $term_link . '">';
2627
-        echo '<img alt="' . esc_attr($cat->name) . ' icon" style="height:20px;vertical-align:middle;" src="' . $term_icon_url . '"/> <span class="cat-link">'; echo $cat->name . '</span> <span class="geodir_term_class geodir_link_span geodir_category_class_' . $post_type . '_' . $cat->term_id . '">(' . $total_post . ')</span> ';
2626
+        echo '<li class="'.$class_row.'"><a href="'.$term_link.'">';
2627
+        echo '<img alt="'.esc_attr($cat->name).' icon" style="height:20px;vertical-align:middle;" src="'.$term_icon_url.'"/> <span class="cat-link">'; echo $cat->name.'</span> <span class="geodir_term_class geodir_link_span geodir_category_class_'.$post_type.'_'.$cat->term_id.'">('.$total_post.')</span> ';
2628 2628
         echo '</a></li>';
2629 2629
     }
2630 2630
 }
@@ -2755,29 +2755,29 @@  discard block
 block discarded – undo
2755 2755
                 itemWidth: 75,
2756 2756
                 itemMargin: 5,
2757 2757
                 asNavFor: '#geodir_widget_slider',
2758
-                rtl: <?php echo ( is_rtl() ? 'true' : 'false' ); /* fix rtl issue */ ?>
2758
+                rtl: <?php echo (is_rtl() ? 'true' : 'false'); /* fix rtl issue */ ?>
2759 2759
             });
2760 2760
 
2761 2761
             jQuery('#geodir_widget_slider').flexslider({
2762
-                animation: "<?php echo $animation;?>",
2762
+                animation: "<?php echo $animation; ?>",
2763 2763
                 selector: ".geodir-slides > li",
2764 2764
                 namespace: "geodir-",
2765 2765
                 controlNav: true,
2766
-                animationLoop: <?php echo $animationLoop;?>,
2767
-                slideshow: <?php echo $slideshow;?>,
2768
-                slideshowSpeed: <?php echo $slideshowSpeed;?>,
2769
-                animationSpeed: <?php echo $animationSpeed;?>,
2770
-                directionNav: <?php echo $directionNav;?>,
2771
-                maxItems: <?php echo $max_show;?>,
2766
+                animationLoop: <?php echo $animationLoop; ?>,
2767
+                slideshow: <?php echo $slideshow; ?>,
2768
+                slideshowSpeed: <?php echo $slideshowSpeed; ?>,
2769
+                animationSpeed: <?php echo $animationSpeed; ?>,
2770
+                directionNav: <?php echo $directionNav; ?>,
2771
+                maxItems: <?php echo $max_show; ?>,
2772 2772
                 move: 1,
2773
-                <?php if($slide_width){ echo "itemWidth: ".$slide_width.",";}?>
2773
+                <?php if ($slide_width) { echo "itemWidth: ".$slide_width.","; }?>
2774 2774
                 sync: "#geodir_widget_carousel",
2775 2775
                 start: function (slider) {
2776 2776
                     jQuery('.geodir-listing-flex-loader').hide();
2777 2777
                     jQuery('#geodir_widget_slider').css({'visibility': 'visible'});
2778 2778
                     jQuery('#geodir_widget_carousel').css({'visibility': 'visible'});
2779 2779
                 },
2780
-                rtl: <?php echo ( is_rtl() ? 'true' : 'false' ); /* fix rtl issue */ ?>
2780
+                rtl: <?php echo (is_rtl() ? 'true' : 'false'); /* fix rtl issue */ ?>
2781 2781
             });
2782 2782
         });
2783 2783
     </script>
@@ -2813,12 +2813,12 @@  discard block
 block discarded – undo
2813 2813
     $widget_listings = geodir_get_widget_listings($query_args);
2814 2814
     if (!empty($widget_listings) || (isset($with_no_results) && $with_no_results)) {
2815 2815
         if ($title) {
2816
-            echo $before_title . $title . $after_title;
2816
+            echo $before_title.$title.$after_title;
2817 2817
         }
2818 2818
 
2819 2819
         global $post;
2820 2820
 
2821
-        $current_post = $post;// keep current post info
2821
+        $current_post = $post; // keep current post info
2822 2822
 
2823 2823
         $widget_main_slides = '';
2824 2824
         $nav_slides = '';
@@ -2836,11 +2836,11 @@  discard block
 block discarded – undo
2836 2836
                     $widget_spacer_height = ((200 - $widget_image->height) / 2);
2837 2837
                 }
2838 2838
 
2839
-                $widget_main_slides .= '<li class="geodir-listing-slider-widget"><img class="geodir-listing-slider-spacer" src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $widget_image->title . '" title="' . $widget_image->title . '" style="max-height:' . $widget_spacer_height . 'px !important;margin:0 auto;" width="100" />';
2839
+                $widget_main_slides .= '<li class="geodir-listing-slider-widget"><img class="geodir-listing-slider-spacer" src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$widget_image->title.'" title="'.$widget_image->title.'" style="max-height:'.$widget_spacer_height.'px !important;margin:0 auto;" width="100" />';
2840 2840
 
2841 2841
                 $title = '';
2842 2842
                 if ($show_title) {
2843
-                    $title_html = '<div class="geodir-slider-title"><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></div>';
2843
+                    $title_html = '<div class="geodir-slider-title"><a href="'.get_permalink($post->ID).'">'.get_the_title($post->ID).'</a></div>';
2844 2844
                     $post_id = $post->ID;
2845 2845
                     $post_permalink = get_permalink($post->ID);
2846 2846
                     $post_title = get_the_title($post->ID);
@@ -2853,11 +2853,11 @@  discard block
 block discarded – undo
2853 2853
                      * @param string $post_permalink The post permalink url.
2854 2854
                      * @param string $post_title The post title text.
2855 2855
                      */
2856
-                    $title = apply_filters('geodir_listing_slider_title',$title_html,$post_id,$post_permalink,$post_title);
2856
+                    $title = apply_filters('geodir_listing_slider_title', $title_html, $post_id, $post_permalink, $post_title);
2857 2857
                 }
2858 2858
 
2859
-                $widget_main_slides .= $title . '<img src="' . $widget_image->src . '" alt="' . $widget_image->title . '" title="' . $widget_image->title . '" style="max-height:200px;margin:0 auto;" /></li>';
2860
-                $nav_slides .= '<li><img src="' . $widget_image->src . '" alt="' . $widget_image->title . '" title="' . $widget_image->title . '" style="max-height:48px;margin:0 auto;" /></li>';
2859
+                $widget_main_slides .= $title.'<img src="'.$widget_image->src.'" alt="'.$widget_image->title.'" title="'.$widget_image->title.'" style="max-height:200px;margin:0 auto;" /></li>';
2860
+                $nav_slides .= '<li><img src="'.$widget_image->src.'" alt="'.$widget_image->title.'" title="'.$widget_image->title.'" style="max-height:48px;margin:0 auto;" /></li>';
2861 2861
                 $widget_slides++;
2862 2862
             }
2863 2863
         }
@@ -2901,7 +2901,7 @@  discard block
 block discarded – undo
2901 2901
     $title = empty($instance['title']) ? __('My Dashboard', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
2902 2902
 
2903 2903
     echo $before_widget;
2904
-    echo $before_title . $title . $after_title;
2904
+    echo $before_title.$title.$after_title;
2905 2905
 
2906 2906
     if (is_user_logged_in()) {
2907 2907
         global $current_user;
@@ -2943,7 +2943,7 @@  discard block
 block discarded – undo
2943 2943
                          */
2944 2944
                         $add_link = apply_filters('geodir_dashboard_link_add_listing', $add_link, $key, $current_user->ID);
2945 2945
 
2946
-                        $addlisting_links .= '<option ' . $selected . ' value="' . $add_link . '">' . __(ucfirst($name), 'geodirectory') . '</option>';
2946
+                        $addlisting_links .= '<option '.$selected.' value="'.$add_link.'">'.__(ucfirst($name), 'geodirectory').'</option>';
2947 2947
 
2948 2948
                     }
2949 2949
                 }
@@ -2989,7 +2989,7 @@  discard block
 block discarded – undo
2989 2989
                      */
2990 2990
                     $post_type_link = apply_filters('geodir_dashboard_link_favorite_listing', $post_type_link, $key, $current_user->ID);
2991 2991
 
2992
-                    $favourite_links .= '<option ' . $selected . ' value="' . $post_type_link . '">' . __(ucfirst($name), 'geodirectory') . '</option>';
2992
+                    $favourite_links .= '<option '.$selected.' value="'.$post_type_link.'">'.__(ucfirst($name), 'geodirectory').'</option>';
2993 2993
                 }
2994 2994
             }
2995 2995
 
@@ -3034,7 +3034,7 @@  discard block
 block discarded – undo
3034 3034
                      */
3035 3035
                     $listing_link = apply_filters('geodir_dashboard_link_my_listing', $listing_link, $key, $current_user->ID);
3036 3036
 
3037
-                    $listing_links .= '<option ' . $selected . ' value="' . $listing_link . '">' . __(ucfirst($name), 'geodirectory') . '</option>';
3037
+                    $listing_links .= '<option '.$selected.' value="'.$listing_link.'">'.__(ucfirst($name), 'geodirectory').'</option>';
3038 3038
                 }
3039 3039
             }
3040 3040
 
@@ -3217,7 +3217,7 @@  discard block
 block discarded – undo
3217 3217
     }
3218 3218
 
3219 3219
     if (empty($title) || $title == 'All') {
3220
-        $title .= ' ' . __(get_post_type_plural_label($post_type), 'geodirectory');
3220
+        $title .= ' '.__(get_post_type_plural_label($post_type), 'geodirectory');
3221 3221
     }
3222 3222
 
3223 3223
     $location_url = array();
@@ -3271,7 +3271,7 @@  discard block
 block discarded – undo
3271 3271
             $geodir_add_location_url = '1';
3272 3272
         }
3273 3273
 
3274
-        $viewall_url = get_term_link((int)$category[0], $post_type . 'category');
3274
+        $viewall_url = get_term_link((int) $category[0], $post_type.'category');
3275 3275
 
3276 3276
         $geodir_add_location_url = NULL;
3277 3277
     }
@@ -3279,7 +3279,7 @@  discard block
 block discarded – undo
3279 3279
         $gd_session->set('gd_multi_location', 1);
3280 3280
     }
3281 3281
 
3282
-    if(is_wp_error( $viewall_url  )){$viewall_url = '';}
3282
+    if (is_wp_error($viewall_url)) {$viewall_url = ''; }
3283 3283
 
3284 3284
     $query_args = array(
3285 3285
         'posts_per_page' => $post_number,
@@ -3345,7 +3345,7 @@  discard block
 block discarded – undo
3345 3345
              */
3346 3346
             do_action('geodir_before_view_all_link_in_widget'); ?>
3347 3347
             <div class="geodir_list_heading clearfix">
3348
-                <?php echo $before_title . $title . $after_title; ?>
3348
+                <?php echo $before_title.$title.$after_title; ?>
3349 3349
                 <a href="<?php echo $viewall_url; ?>"
3350 3350
                    class="geodir-viewall"><?php _e('View all', 'geodirectory'); ?></a>
3351 3351
             </div>
@@ -3431,9 +3431,9 @@  discard block
 block discarded – undo
3431 3431
 {
3432 3432
     global $wpdb, $plugin_prefix;
3433 3433
 
3434
-    $detail_table = $plugin_prefix . $post_type . '_detail';
3434
+    $detail_table = $plugin_prefix.$post_type.'_detail';
3435 3435
 
3436
-    $sql = "SELECT COALESCE(SUM(rating_count),0) FROM " . $detail_table . " WHERE post_status = 'publish' AND rating_count > 0 AND FIND_IN_SET(" . $term_id . ", " . $taxonomy . ")";
3436
+    $sql = "SELECT COALESCE(SUM(rating_count),0) FROM ".$detail_table." WHERE post_status = 'publish' AND rating_count > 0 AND FIND_IN_SET(".$term_id.", ".$taxonomy.")";
3437 3437
 
3438 3438
     /**
3439 3439
      * Filter count review sql query.
@@ -3472,7 +3472,7 @@  discard block
 block discarded – undo
3472 3472
      * @param bool $force_update Force update option value?. Default.false.
3473 3473
      * @param int $post_ID The post id to update if any.
3474 3474
      */
3475
-    $option_data = apply_filters('geodir_count_reviews_by_terms_before', '', $force_update,$post_ID);
3475
+    $option_data = apply_filters('geodir_count_reviews_by_terms_before', '', $force_update, $post_ID);
3476 3476
     if (!empty($option_data)) {
3477 3477
         return $option_data;
3478 3478
     }
@@ -3480,11 +3480,11 @@  discard block
 block discarded – undo
3480 3480
     $option_data = get_option('geodir_global_review_count');
3481 3481
 
3482 3482
     if (!$option_data || $force_update) {
3483
-        if ((int)$post_ID > 0) { // Update reviews count for specific post categories only.
3483
+        if ((int) $post_ID > 0) { // Update reviews count for specific post categories only.
3484 3484
             global $gd_session;
3485
-            $term_array = (array)$option_data;
3485
+            $term_array = (array) $option_data;
3486 3486
             $post_type = get_post_type($post_ID);
3487
-            $taxonomy = $post_type . 'category';
3487
+            $taxonomy = $post_type.'category';
3488 3488
             $terms = wp_get_object_terms($post_ID, $taxonomy, array('fields' => 'ids'));
3489 3489
 
3490 3490
             if (!empty($terms) && !is_wp_error($terms)) {
@@ -3499,9 +3499,9 @@  discard block
 block discarded – undo
3499 3499
             
3500 3500
             $terms = array();
3501 3501
             if (isset($_POST['post_category'][$taxonomy])) {
3502
-                $terms = (array)$_POST['post_category'][$taxonomy];
3502
+                $terms = (array) $_POST['post_category'][$taxonomy];
3503 3503
             } else if (!empty($session_listing) && isset($session_listing['post_category'][$taxonomy])) {
3504
-                $terms = (array)$session_listing['post_category'][$taxonomy];
3504
+                $terms = (array) $session_listing['post_category'][$taxonomy];
3505 3505
             }
3506 3506
             
3507 3507
             if (!empty($terms)) {
@@ -3589,7 +3589,7 @@  discard block
 block discarded – undo
3589 3589
     return true;
3590 3590
 }
3591 3591
 
3592
-function geodir_term_review_count_force_update_single_post($post_id){
3592
+function geodir_term_review_count_force_update_single_post($post_id) {
3593 3593
     geodir_count_reviews_by_terms(true, $post_id); 
3594 3594
 }
3595 3595
 
@@ -3726,17 +3726,17 @@  discard block
 block discarded – undo
3726 3726
      */
3727 3727
     $locale = apply_filters('plugin_locale', get_locale(), 'geodirectory');
3728 3728
 
3729
-    load_textdomain('geodirectory', WP_LANG_DIR . '/' . 'geodirectory' . '/' . 'geodirectory' . '-' . $locale . '.mo');
3730
-    load_plugin_textdomain('geodirectory', false, plugin_basename(dirname(dirname(__FILE__))) . '/geodirectory-languages');
3729
+    load_textdomain('geodirectory', WP_LANG_DIR.'/'.'geodirectory'.'/'.'geodirectory'.'-'.$locale.'.mo');
3730
+    load_plugin_textdomain('geodirectory', false, plugin_basename(dirname(dirname(__FILE__))).'/geodirectory-languages');
3731 3731
 
3732 3732
     /**
3733 3733
      * Define language constants.
3734 3734
      *
3735 3735
      * @since 1.0.0
3736 3736
      */
3737
-    require_once(geodir_plugin_path() . '/language.php');
3737
+    require_once(geodir_plugin_path().'/language.php');
3738 3738
 
3739
-    $language_file = geodir_plugin_path() . '/db-language.php';
3739
+    $language_file = geodir_plugin_path().'/db-language.php';
3740 3740
 
3741 3741
     // Load language string file if not created yet
3742 3742
     if (!file_exists($language_file)) {
@@ -3751,8 +3751,8 @@  discard block
 block discarded – undo
3751 3751
          */
3752 3752
         try {
3753 3753
             require_once($language_file);
3754
-        } catch(Exception $e) {
3755
-            error_log('Language Error: ' . $e->getMessage());
3754
+        } catch (Exception $e) {
3755
+            error_log('Language Error: '.$e->getMessage());
3756 3756
         }
3757 3757
     }
3758 3758
 }
@@ -3769,18 +3769,18 @@  discard block
 block discarded – undo
3769 3769
  */
3770 3770
 function geodirectory_load_db_language() {
3771 3771
     global $wp_filesystem;
3772
-    if( empty( $wp_filesystem ) ) {
3773
-        require_once( ABSPATH .'/wp-admin/includes/file.php' );
3772
+    if (empty($wp_filesystem)) {
3773
+        require_once(ABSPATH.'/wp-admin/includes/file.php');
3774 3774
         WP_Filesystem();
3775 3775
         global $wp_filesystem;
3776 3776
     }
3777 3777
 
3778
-    $language_file = geodir_plugin_path() . '/db-language.php';
3778
+    $language_file = geodir_plugin_path().'/db-language.php';
3779 3779
 
3780
-    if(is_file($language_file) && !is_writable($language_file))
3780
+    if (is_file($language_file) && !is_writable($language_file))
3781 3781
         return false; // Not possible to create.
3782 3782
 
3783
-    if(!is_file($language_file) && !is_writable(dirname($language_file)))
3783
+    if (!is_file($language_file) && !is_writable(dirname($language_file)))
3784 3784
         return false; // Not possible to create.
3785 3785
 
3786 3786
     $contents_strings = array();
@@ -3814,17 +3814,17 @@  discard block
 block discarded – undo
3814 3814
     $contents = implode(PHP_EOL, $contents_head);
3815 3815
 
3816 3816
     if (!empty($contents_strings)) {
3817
-        foreach ( $contents_strings as $string ) {
3817
+        foreach ($contents_strings as $string) {
3818 3818
             if (is_scalar($string) && $string != '') {
3819 3819
                 $string = str_replace("'", "\'", $string);
3820
-                $contents .= PHP_EOL . "__('" . $string . "', 'geodirectory');";
3820
+                $contents .= PHP_EOL."__('".$string."', 'geodirectory');";
3821 3821
             }
3822 3822
         }
3823 3823
     }
3824 3824
 
3825 3825
     $contents .= implode(PHP_EOL, $contents_foot);
3826 3826
 
3827
-    if($wp_filesystem->put_contents( $language_file, $contents, FS_CHMOD_FILE))
3827
+    if ($wp_filesystem->put_contents($language_file, $contents, FS_CHMOD_FILE))
3828 3828
         return false; // Failure; could not write file.
3829 3829
 
3830 3830
     return true;
@@ -3846,11 +3846,11 @@  discard block
 block discarded – undo
3846 3846
     global $wpdb;
3847 3847
 
3848 3848
     // Custom fields table
3849
-    $sql = "SELECT admin_title, admin_desc, site_title, clabels, required_msg, default_value, option_values FROM " . GEODIR_CUSTOM_FIELDS_TABLE;
3849
+    $sql = "SELECT admin_title, admin_desc, site_title, clabels, required_msg, default_value, option_values FROM ".GEODIR_CUSTOM_FIELDS_TABLE;
3850 3850
     $rows = $wpdb->get_results($sql);
3851 3851
 
3852 3852
     if (!empty($rows)) {
3853
-        foreach($rows as $row) {
3853
+        foreach ($rows as $row) {
3854 3854
             if (!empty($row->admin_title))
3855 3855
                 $translation_texts[] = stripslashes_deep($row->admin_title);
3856 3856
 			
@@ -3884,11 +3884,11 @@  discard block
 block discarded – undo
3884 3884
     }
3885 3885
 	
3886 3886
     // Custom sorting fields table
3887
-    $sql = "SELECT site_title, asc_title, desc_title FROM " . GEODIR_CUSTOM_SORT_FIELDS_TABLE;
3887
+    $sql = "SELECT site_title, asc_title, desc_title FROM ".GEODIR_CUSTOM_SORT_FIELDS_TABLE;
3888 3888
     $rows = $wpdb->get_results($sql);
3889 3889
 
3890 3890
     if (!empty($rows)) {
3891
-        foreach($rows as $row) {
3891
+        foreach ($rows as $row) {
3892 3892
             if (!empty($row->site_title))
3893 3893
                 $translation_texts[] = stripslashes_deep($row->site_title);
3894 3894
 
@@ -3902,11 +3902,11 @@  discard block
 block discarded – undo
3902 3902
 	
3903 3903
 	// Advance search filter fields table
3904 3904
 	if (defined('GEODIR_ADVANCE_SEARCH_TABLE')) {
3905
-		$sql = "SELECT field_site_name, front_search_title, field_desc FROM " . GEODIR_ADVANCE_SEARCH_TABLE;
3905
+		$sql = "SELECT field_site_name, front_search_title, field_desc FROM ".GEODIR_ADVANCE_SEARCH_TABLE;
3906 3906
 		$rows = $wpdb->get_results($sql);
3907 3907
 
3908 3908
 		if (!empty($rows)) {
3909
-			foreach($rows as $row) {
3909
+			foreach ($rows as $row) {
3910 3910
 				if (!empty($row->field_site_name))
3911 3911
 					$translation_texts[] = stripslashes_deep($row->field_site_name);
3912 3912
 
@@ -3941,7 +3941,7 @@  discard block
 block discarded – undo
3941 3941
      *
3942 3942
      * @param array $geodir_allowed_mime_types and file extensions.
3943 3943
      */
3944
-    return apply_filters( 'geodir_allowed_mime_types', array(
3944
+    return apply_filters('geodir_allowed_mime_types', array(
3945 3945
             'Image' => array( // Image formats.
3946 3946
                 'jpg' => 'image/jpeg',
3947 3947
                 'jpe' => 'image/jpeg',
@@ -4030,13 +4030,13 @@  discard block
 block discarded – undo
4030 4030
 
4031 4031
 
4032 4032
 
4033
-add_filter('wpseo_replacements','geodir_wpseo_replacements',10,1);
4033
+add_filter('wpseo_replacements', 'geodir_wpseo_replacements', 10, 1);
4034 4034
 /*
4035 4035
  * Add location variables to wpseo replacements.
4036 4036
  *
4037 4037
  * @since 1.5.4
4038 4038
  */
4039
-function geodir_wpseo_replacements($vars){
4039
+function geodir_wpseo_replacements($vars) {
4040 4040
 
4041 4041
     global $wp;
4042 4042
     $title = '';
@@ -4051,12 +4051,12 @@  discard block
 block discarded – undo
4051 4051
      * @param array $location_array The array of location variables.
4052 4052
      * @param array $vars The page title variables.
4053 4053
      */
4054
-    $location_array = apply_filters('geodir_filter_title_variables_location_arr_seo',$location_array, $vars);
4054
+    $location_array = apply_filters('geodir_filter_title_variables_location_arr_seo', $location_array, $vars);
4055 4055
     $location_titles = array();
4056
-    if(get_query_var( 'gd_country_full' )){
4057
-        if(get_query_var( 'gd_country_full' )){$location_array['gd_country'] = get_query_var( 'gd_country_full' );}
4058
-        if(get_query_var( 'gd_region_full' )){$location_array['gd_region'] = get_query_var( 'gd_region_full' );}
4059
-        if(get_query_var( 'gd_city_full' )){$location_array['gd_city'] = get_query_var( 'gd_city_full' );}
4056
+    if (get_query_var('gd_country_full')) {
4057
+        if (get_query_var('gd_country_full')) {$location_array['gd_country'] = get_query_var('gd_country_full'); }
4058
+        if (get_query_var('gd_region_full')) {$location_array['gd_region'] = get_query_var('gd_region_full'); }
4059
+        if (get_query_var('gd_city_full')) {$location_array['gd_city'] = get_query_var('gd_city_full'); }
4060 4060
     }
4061 4061
     $location_single = '';
4062 4062
     $gd_country = (isset($wp->query_vars['gd_country']) && $wp->query_vars['gd_country'] != '') ? $wp->query_vars['gd_country'] : '';
@@ -4128,23 +4128,23 @@  discard block
 block discarded – undo
4128 4128
     }
4129 4129
 
4130 4130
 
4131
-    if(!empty($location_titles)) {
4131
+    if (!empty($location_titles)) {
4132 4132
         $vars['%%location%%'] = implode(", ", $location_titles);
4133 4133
     }
4134 4134
 
4135 4135
 
4136
-    if(!empty($location_titles)) {
4137
-        $vars['%%in_location%%'] = __('in ', 'geodirectory') . implode(", ", $location_titles);
4136
+    if (!empty($location_titles)) {
4137
+        $vars['%%in_location%%'] = __('in ', 'geodirectory').implode(", ", $location_titles);
4138 4138
     }
4139 4139
 
4140 4140
 
4141 4141
 
4142
-    if($location_single) {
4143
-        $vars['%%in_location_single%%'] = __('in', 'geodirectory') . ' ' .$location_single;
4142
+    if ($location_single) {
4143
+        $vars['%%in_location_single%%'] = __('in', 'geodirectory').' '.$location_single;
4144 4144
     }
4145 4145
 
4146 4146
 
4147
-    if($location_single) {
4147
+    if ($location_single) {
4148 4148
         $vars['%%location_single%%'] = $location_single;
4149 4149
     }
4150 4150
 
@@ -4156,13 +4156,13 @@  discard block
 block discarded – undo
4156 4156
      * @param string $vars The title with variables.
4157 4157
      * @param array $location_array The array of location variables.
4158 4158
      */
4159
-    return apply_filters('geodir_wpseo_replacements_vars',$vars,$location_array);
4159
+    return apply_filters('geodir_wpseo_replacements_vars', $vars, $location_array);
4160 4160
 }
4161 4161
 
4162 4162
 
4163
-add_filter('geodir_seo_meta_title','geodir_filter_title_variables',10,3);
4164
-add_filter('geodir_seo_page_title','geodir_filter_title_variables',10,2);
4165
-add_filter('geodir_seo_meta_description_pre','geodir_filter_title_variables',10,3);
4163
+add_filter('geodir_seo_meta_title', 'geodir_filter_title_variables', 10, 3);
4164
+add_filter('geodir_seo_page_title', 'geodir_filter_title_variables', 10, 2);
4165
+add_filter('geodir_seo_meta_description_pre', 'geodir_filter_title_variables', 10, 3);
4166 4166
 
4167 4167
 /**
4168 4168
  * Filter the title variables.
@@ -4221,19 +4221,19 @@  discard block
 block discarded – undo
4221 4221
         $sep = apply_filters('geodir_page_title_separator', '|');
4222 4222
     }
4223 4223
 
4224
-    if (strpos($title,'%%title%%') !== false) {
4224
+    if (strpos($title, '%%title%%') !== false) {
4225 4225
         $title = str_replace("%%title%%", $post->post_title, $title);
4226 4226
     }
4227 4227
 
4228
-    if (strpos($title,'%%sitename%%') !== false) {
4228
+    if (strpos($title, '%%sitename%%') !== false) {
4229 4229
         $title = str_replace("%%sitename%%", get_bloginfo('name'), $title);
4230 4230
     }
4231 4231
 
4232
-    if (strpos($title,'%%sitedesc%%') !== false) {
4232
+    if (strpos($title, '%%sitedesc%%') !== false) {
4233 4233
         $title = str_replace("%%sitedesc%%", get_bloginfo('description'), $title);
4234 4234
     }
4235 4235
 
4236
-    if (strpos($title,'%%excerpt%%') !== false) {
4236
+    if (strpos($title, '%%excerpt%%') !== false) {
4237 4237
         $title = str_replace("%%excerpt%%", strip_tags(get_the_excerpt()), $title);
4238 4238
     }
4239 4239
     
@@ -4241,8 +4241,8 @@  discard block
 block discarded – undo
4241 4241
         $post_type = sanitize_text_field($_REQUEST['stype']);
4242 4242
     } else if ($gd_page == 'add-listing') {
4243 4243
         $post_type = sanitize_text_field($_REQUEST['listing_type']);
4244
-        $post_type = !$post_type && !empty($_REQUEST['pid']) ? get_post_type((int)$_REQUEST['pid']) : $post_type;
4245
-    } else if (isset($post->post_type) && $post->post_type && in_array($post->post_type , geodir_get_posttypes())) {
4244
+        $post_type = !$post_type && !empty($_REQUEST['pid']) ? get_post_type((int) $_REQUEST['pid']) : $post_type;
4245
+    } else if (isset($post->post_type) && $post->post_type && in_array($post->post_type, geodir_get_posttypes())) {
4246 4246
         $post_type = $post->post_type;
4247 4247
     } else {
4248 4248
         $post_type = get_query_var('post_type');
@@ -4269,9 +4269,9 @@  discard block
 block discarded – undo
4269 4269
     if (strpos($title, '%%category%%') !== false) {
4270 4270
         $cat_name = '';
4271 4271
 
4272
-        if ($gd_page=='detail') {
4272
+        if ($gd_page == 'detail') {
4273 4273
             if ($post->default_category) {
4274
-                $cat = get_term($post->default_category, $post->post_type . 'category');
4274
+                $cat = get_term($post->default_category, $post->post_type.'category');
4275 4275
                 $cat_name = (isset($cat->name)) ? $cat->name : '';
4276 4276
             }
4277 4277
         } else if ($gd_page == 'listing') {
@@ -4286,12 +4286,12 @@  discard block
 block discarded – undo
4286 4286
     if (strpos($title, '%%tag%%') !== false) {
4287 4287
         $cat_name = '';
4288 4288
 
4289
-        if ($gd_page=='detail') {
4289
+        if ($gd_page == 'detail') {
4290 4290
             if ($post->default_category) {
4291
-                $cat = get_term($post->default_category, $post->post_type . 'category');
4291
+                $cat = get_term($post->default_category, $post->post_type.'category');
4292 4292
                 $cat_name = (isset($cat->name)) ? $cat->name : '';
4293 4293
             }
4294
-        } else if($gd_page == 'listing') {
4294
+        } else if ($gd_page == 'listing') {
4295 4295
             $queried_object = get_queried_object();
4296 4296
             if (isset($queried_object->name)) {
4297 4297
                 $cat_name = $queried_object->name;
@@ -4305,7 +4305,7 @@  discard block
 block discarded – undo
4305 4305
         $title = str_replace("%%id%%", $ID, $title);
4306 4306
     }
4307 4307
 
4308
-    if (strpos($title,'%%sep%%') !== false) {
4308
+    if (strpos($title, '%%sep%%') !== false) {
4309 4309
         $title = str_replace("%%sep%%", $sep, $title);
4310 4310
     }
4311 4311
 
@@ -4322,12 +4322,12 @@  discard block
 block discarded – undo
4322 4322
      * @param string $gd_page The page being filtered.
4323 4323
      * @param string $sep The separator, default: `|`.
4324 4324
      */
4325
-    $location_array = apply_filters('geodir_filter_title_variables_location_arr',$location_array,$title, $gd_page, $sep);
4325
+    $location_array = apply_filters('geodir_filter_title_variables_location_arr', $location_array, $title, $gd_page, $sep);
4326 4326
     $location_titles = array();
4327
-    if($gd_page=='location' && get_query_var( 'gd_country_full' )){
4328
-        if(get_query_var( 'gd_country_full' )){$location_array['gd_country'] = get_query_var( 'gd_country_full' );}
4329
-        if(get_query_var( 'gd_region_full' )){$location_array['gd_region'] = get_query_var( 'gd_region_full' );}
4330
-        if(get_query_var( 'gd_city_full' )){$location_array['gd_city'] = get_query_var( 'gd_city_full' );}
4327
+    if ($gd_page == 'location' && get_query_var('gd_country_full')) {
4328
+        if (get_query_var('gd_country_full')) {$location_array['gd_country'] = get_query_var('gd_country_full'); }
4329
+        if (get_query_var('gd_region_full')) {$location_array['gd_region'] = get_query_var('gd_region_full'); }
4330
+        if (get_query_var('gd_city_full')) {$location_array['gd_city'] = get_query_var('gd_city_full'); }
4331 4331
     }
4332 4332
     $location_single = '';
4333 4333
     $gd_country = (isset($wp->query_vars['gd_country']) && $wp->query_vars['gd_country'] != '') ? $wp->query_vars['gd_country'] : '';
@@ -4399,51 +4399,51 @@  discard block
 block discarded – undo
4399 4399
     }
4400 4400
 
4401 4401
 
4402
-    if(strpos($title,'%%location%%') !== false){
4402
+    if (strpos($title, '%%location%%') !== false) {
4403 4403
         $location = '';
4404
-        if($location_titles) {
4404
+        if ($location_titles) {
4405 4405
             $location = implode(", ", $location_titles);
4406 4406
         }
4407
-        $title = str_replace("%%location%%",$location,$title);
4407
+        $title = str_replace("%%location%%", $location, $title);
4408 4408
     }
4409 4409
 
4410
-    if(strpos($title,'%%in_location%%') !== false){
4410
+    if (strpos($title, '%%in_location%%') !== false) {
4411 4411
         $location = '';
4412
-        if($location_titles) {
4413
-            $location = __('in ', 'geodirectory') . implode(", ", $location_titles);
4412
+        if ($location_titles) {
4413
+            $location = __('in ', 'geodirectory').implode(", ", $location_titles);
4414 4414
         }
4415
-        $title = str_replace("%%in_location%%",$location,$title);
4415
+        $title = str_replace("%%in_location%%", $location, $title);
4416 4416
     }
4417 4417
 
4418
-    if(strpos($title,'%%in_location_single%%') !== false){
4419
-        if($location_single) {
4420
-            $location_single = __('in', 'geodirectory') . ' ' .$location_single;
4418
+    if (strpos($title, '%%in_location_single%%') !== false) {
4419
+        if ($location_single) {
4420
+            $location_single = __('in', 'geodirectory').' '.$location_single;
4421 4421
         }
4422
-        $title = str_replace("%%in_location_single%%",$location_single,$title);
4422
+        $title = str_replace("%%in_location_single%%", $location_single, $title);
4423 4423
     }
4424 4424
 
4425
-    if(strpos($title,'%%location_single%%') !== false){
4426
-        $title = str_replace("%%location_single%%",$location_single,$title);
4425
+    if (strpos($title, '%%location_single%%') !== false) {
4426
+        $title = str_replace("%%location_single%%", $location_single, $title);
4427 4427
     }
4428 4428
 
4429 4429
 
4430
-    if(strpos($title,'%%search_term%%') !== false){
4430
+    if (strpos($title, '%%search_term%%') !== false) {
4431 4431
         $search_term = '';
4432
-        if(isset($_REQUEST['s'])){
4432
+        if (isset($_REQUEST['s'])) {
4433 4433
             $search_term = esc_attr($_REQUEST['s']);
4434 4434
         }
4435
-        $title = str_replace("%%search_term%%",$search_term,$title);
4435
+        $title = str_replace("%%search_term%%", $search_term, $title);
4436 4436
     }
4437 4437
 
4438
-    if(strpos($title,'%%search_near%%') !== false){
4438
+    if (strpos($title, '%%search_near%%') !== false) {
4439 4439
         $search_term = '';
4440
-        if(isset($_REQUEST['snear'])){
4440
+        if (isset($_REQUEST['snear'])) {
4441 4441
             $search_term = esc_attr($_REQUEST['snear']);
4442 4442
         }
4443
-        $title = str_replace("%%search_near%%",$search_term,$title);
4443
+        $title = str_replace("%%search_near%%", $search_term, $title);
4444 4444
     }
4445 4445
 
4446
-    if(strpos($title,'%%name%%') !== false){
4446
+    if (strpos($title, '%%name%%') !== false) {
4447 4447
         $author_name = get_the_author();
4448 4448
         if (!$author_name || $author_name === '') {
4449 4449
             $queried_object = get_queried_object();
@@ -4468,9 +4468,9 @@  discard block
 block discarded – undo
4468 4468
         $title = str_replace("%%pagetotal%%", $pagetotal, $title);
4469 4469
     }
4470 4470
 
4471
-    $title = wptexturize( $title );
4472
-    $title = convert_chars( $title );
4473
-    $title = esc_html( $title );
4471
+    $title = wptexturize($title);
4472
+    $title = convert_chars($title);
4473
+    $title = esc_html($title);
4474 4474
 
4475 4475
     /**
4476 4476
      * Filter the title variables after standard ones have been filtered.
@@ -4483,7 +4483,7 @@  discard block
 block discarded – undo
4483 4483
      * @param string $sep The separator, default: `|`.
4484 4484
      */
4485 4485
 
4486
-    return apply_filters('geodir_filter_title_variables_vars',$title,$location_array, $gd_page, $sep);
4486
+    return apply_filters('geodir_filter_title_variables_vars', $title, $location_array, $gd_page, $sep);
4487 4487
 }
4488 4488
 
4489 4489
 /**
@@ -4606,7 +4606,7 @@  discard block
 block discarded – undo
4606 4606
     }
4607 4607
     
4608 4608
     $action = isset($_REQUEST['action']) ? sanitize_text_field($_REQUEST['action']) : '';
4609
-    $is_admin = is_admin() && ( !defined('DOING_AJAX' ) || ( defined('DOING_AJAX') && !DOING_AJAX ) )  ? true : false;
4609
+    $is_admin = is_admin() && (!defined('DOING_AJAX') || (defined('DOING_AJAX') && !DOING_AJAX)) ? true : false;
4610 4610
     $inline_save = $action == 'inline-save' ? true : false;
4611 4611
 
4612 4612
     if (empty($post->post_type) || $is_admin || $inline_save || (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)) {
@@ -4617,7 +4617,7 @@  discard block
 block discarded – undo
4617 4617
         return;
4618 4618
     }
4619 4619
 
4620
-    $user_id = (int)get_current_user_id();
4620
+    $user_id = (int) get_current_user_id();
4621 4621
         
4622 4622
     if ($user_id > 0 && get_option('geodir_notify_post_edited') && !wp_is_post_revision($post_ID) && in_array($post->post_type, geodir_get_posttypes())) {
4623 4623
         $author_id = !empty($post->post_author) ? $post->post_author : 0;
@@ -4661,7 +4661,7 @@  discard block
 block discarded – undo
4661 4661
     $nr  = geodir_title_meta_pagenumbering('nr');
4662 4662
 
4663 4663
     if ($max > 1 && $nr > 1) {
4664
-        $replacement = sprintf($sep . ' ' . __('Page %1$d of %2$d', 'geodirectory'), $nr, $max);
4664
+        $replacement = sprintf($sep.' '.__('Page %1$d of %2$d', 'geodirectory'), $nr, $max);
4665 4665
     }
4666 4666
 
4667 4667
     return $replacement;
@@ -4680,7 +4680,7 @@  discard block
 block discarded – undo
4680 4680
 
4681 4681
     $nr = geodir_title_meta_pagenumbering('nr');
4682 4682
     if (isset($nr) && $nr > 0) {
4683
-        $replacement = (string)$nr;
4683
+        $replacement = (string) $nr;
4684 4684
     }
4685 4685
 
4686 4686
     return $replacement;
@@ -4699,7 +4699,7 @@  discard block
 block discarded – undo
4699 4699
 
4700 4700
     $max = geodir_title_meta_pagenumbering('max');
4701 4701
     if (isset($max) && $max > 0) {
4702
-        $replacement = (string)$max;
4702
+        $replacement = (string) $max;
4703 4703
     }
4704 4704
 
4705 4705
     return $replacement;
@@ -4741,7 +4741,7 @@  discard block
 block discarded – undo
4741 4741
         }
4742 4742
 
4743 4743
         if (isset($post->post_content)) {
4744
-            $max_num_pages = (substr_count($post->post_content, '<!--nextpage-->' ) + 1);
4744
+            $max_num_pages = (substr_count($post->post_content, '<!--nextpage-->') + 1);
4745 4745
         }
4746 4746
     }
4747 4747
 
@@ -4790,10 +4790,10 @@  discard block
 block discarded – undo
4790 4790
  *
4791 4791
  * @return array
4792 4792
  */
4793
-function geodir_remove_hentry( $class ) {
4794
-    if(geodir_is_page('detail')){
4795
-        $class = array_diff( $class, array( 'hentry' ) );
4793
+function geodir_remove_hentry($class) {
4794
+    if (geodir_is_page('detail')) {
4795
+        $class = array_diff($class, array('hentry'));
4796 4796
     }
4797 4797
     return $class;
4798 4798
 }
4799
-add_filter( 'post_class', 'geodir_remove_hentry' );
4800 4799
\ No newline at end of file
4800
+add_filter('post_class', 'geodir_remove_hentry');
4801 4801
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory_template_actions.php 1 patch
Spacing   +163 added lines, -163 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
     //php
284 284
     if (!empty($tc['geodir_theme_compat_code'])) {
285
-        include_once('geodirectory-functions/compatibility/' . $tc['geodir_theme_compat_code'] . '.php');
285
+        include_once('geodirectory-functions/compatibility/'.$tc['geodir_theme_compat_code'].'.php');
286 286
     }
287 287
 
288 288
     //geodir_full_page_class
@@ -452,13 +452,13 @@  discard block
 block discarded – undo
452 452
 function geodir_action_wrapper_content_open($type = '', $id = '', $class = '')
453 453
 {
454 454
     if ($type == 'home-page' && $width = get_option('geodir_width_home_contant_section')) {
455
-        $width_css = 'style="width:' . $width . '%;"';
455
+        $width_css = 'style="width:'.$width.'%;"';
456 456
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_contant_section')) {
457
-        $width_css = 'style="width:' . $width . '%;"';
457
+        $width_css = 'style="width:'.$width.'%;"';
458 458
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_contant_section')) {
459
-        $width_css = 'style="width:' . $width . '%;"';
459
+        $width_css = 'style="width:'.$width.'%;"';
460 460
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_contant_section')) {
461
-        $width_css = 'style="width:' . $width . '%;"';
461
+        $width_css = 'style="width:'.$width.'%;"';
462 462
     } else {
463 463
         $width_css = '';
464 464
     }
@@ -572,13 +572,13 @@  discard block
 block discarded – undo
572 572
 function geodir_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '')
573 573
 {
574 574
     if ($type == 'home-page' && $width = get_option('geodir_width_home_right_section')) {
575
-        $width_css = 'style="width:' . $width . '%;"';
575
+        $width_css = 'style="width:'.$width.'%;"';
576 576
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_right_section')) {
577
-        $width_css = 'style="width:' . $width . '%;"';
577
+        $width_css = 'style="width:'.$width.'%;"';
578 578
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_right_section')) {
579
-        $width_css = 'style="width:' . $width . '%;"';
579
+        $width_css = 'style="width:'.$width.'%;"';
580 580
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_right_section')) {
581
-        $width_css = 'style="width:' . $width . '%;"';
581
+        $width_css = 'style="width:'.$width.'%;"';
582 582
     } else {
583 583
         $width_css = '';
584 584
     }
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
         }
677 677
     }
678 678
 
679
-    $post = (object)$_REQUEST;
679
+    $post = (object) $_REQUEST;
680 680
 
681 681
 
682 682
     if (isset($post->video)) {
@@ -735,10 +735,10 @@  discard block
 block discarded – undo
735 735
 
736 736
     $json = '{';
737 737
     $json .= '"post_preview": "1",';
738
-    $json .= '"t": "' . $json_title . '",';
739
-    $json .= '"lt": "' . $post_latitude . '",';
740
-    $json .= '"ln": "' . $post_longitude . '",';
741
-    $json .= '"i":"' . $term_icon . '"';
738
+    $json .= '"t": "'.$json_title.'",';
739
+    $json .= '"lt": "'.$post_latitude.'",';
740
+    $json .= '"ln": "'.$post_longitude.'",';
741
+    $json .= '"i":"'.$term_icon.'"';
742 742
     $json .= '}';
743 743
 
744 744
     $post->marker_json = $json;
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
      * @param string $class The class to use. Default is 'entry-header'.
966 966
      */
967 967
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
968
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' . stripslashes(get_the_title()) . '</h1></header>';
968
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.stripslashes(get_the_title()).'</h1></header>';
969 969
 }
970 970
 
971 971
 
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
                     $height = !empty($sizes) && isset($sizes[1]) ? $sizes[1] : 0;
1020 1020
 
1021 1021
                     if ($image && $width && $height) {
1022
-                        $image = (object)array('src' => $image, 'width' => $width, 'height' => $height);
1022
+                        $image = (object) array('src' => $image, 'width' => $width, 'height' => $height);
1023 1023
                     }
1024 1024
 
1025 1025
                     if (isset($image->src)) {
@@ -1031,9 +1031,9 @@  discard block
 block discarded – undo
1031 1031
 
1032 1032
                         $image_title = isset($image->title) ? $image->title : '';
1033 1033
 
1034
-                        $main_slides .= '<li><img src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:' . $spacer_height . 'px;margin:0 auto;" />';
1035
-                        $main_slides .= '<img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:400px;margin:0 auto;" /></li>';
1036
-                        $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image_title . '" title="' . $image_title . '" style="max-height:48px;margin:0 auto;" /></li>';
1034
+                        $main_slides .= '<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
1035
+                        $main_slides .= '<img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:400px;margin:0 auto;" /></li>';
1036
+                        $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image_title.'" title="'.$image_title.'" style="max-height:48px;margin:0 auto;" /></li>';
1037 1037
                         $slides++;
1038 1038
                     }
1039 1039
                 }
@@ -1052,10 +1052,10 @@  discard block
 block discarded – undo
1052 1052
                 } else {
1053 1053
                     $spacer_height = ((400 - $image->height) / 2);
1054 1054
                 }
1055
-                $caption = '';//(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1056
-                $main_slides .= '<li><img src="' . geodir_plugin_url() . "/geodirectory-assets/images/spacer.gif" . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:' . $spacer_height . 'px;margin:0 auto;" />';
1057
-                $main_slides .= '<img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
1058
-                $nav_slides .= '<li><img src="' . $image->src . '" alt="' . $image->title . '" title="' . $image->title . '" style="max-height:48px;margin:0 auto;" /></li>';
1055
+                $caption = ''; //(!empty($image->caption)) ? '<p class="flex-caption">'.$image->caption.'</p>' : '';
1056
+                $main_slides .= '<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
1057
+                $main_slides .= '<img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:400px;margin:0 auto;" />'.$caption.'</li>';
1058
+                $nav_slides .= '<li><img src="'.$image->src.'" alt="'.$image->title.'" title="'.$image->title.'" style="max-height:48px;margin:0 auto;" /></li>';
1059 1059
                 $slides++;
1060 1060
             }
1061 1061
         }// endfore
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
  */
1091 1091
 function geodir_action_details_taxonomies()
1092 1092
 {
1093
-    global $preview, $post;?>
1093
+    global $preview, $post; ?>
1094 1094
     <p class="geodir_post_taxomomies clearfix">
1095 1095
     <?php
1096 1096
     $taxonomies = array();
@@ -1099,11 +1099,11 @@  discard block
 block discarded – undo
1099 1099
 
1100 1100
     if ($preview && !$is_backend_preview) {
1101 1101
         $post_type = $post->listing_type;
1102
-        $post_taxonomy = $post_type . 'category';
1102
+        $post_taxonomy = $post_type.'category';
1103 1103
         $post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
1104 1104
     } else {
1105 1105
         $post_type = $post->post_type;
1106
-        $post_taxonomy = $post_type . 'category';
1106
+        $post_taxonomy = $post_type.'category';
1107 1107
     }
1108 1108
 //{	
1109 1109
     $post_type_info = get_post_type_object($post_type);
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
 
1112 1112
     if (!empty($post->post_tags)) {
1113 1113
 
1114
-        if (taxonomy_exists($post_type . '_tags')):
1114
+        if (taxonomy_exists($post_type.'_tags')):
1115 1115
             $links = array();
1116 1116
             $terms = array();
1117 1117
             // to limit post tags
@@ -1138,8 +1138,8 @@  discard block
 block discarded – undo
1138 1138
                 $post_term = trim($post_term);
1139 1139
 
1140 1140
                 $priority_location = false;
1141
-                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1142
-                    $term = get_term_by('id', $insert_term['term_id'], $post_type . '_tags');
1141
+                if ($insert_term = term_exists($post_term, $post_type.'_tags')) {
1142
+                    $term = get_term_by('id', $insert_term['term_id'], $post_type.'_tags');
1143 1143
                 } else {
1144 1144
                     $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1145 1145
                     $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
@@ -1149,10 +1149,10 @@  discard block
 block discarded – undo
1149 1149
                     $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1150 1150
                     if ($match_country || $match_region || $match_city) {
1151 1151
                         $priority_location = true;
1152
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1152
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1153 1153
                     } else {
1154
-                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
1155
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1154
+                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
1155
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1156 1156
                     }
1157 1157
                 }
1158 1158
 
@@ -1169,12 +1169,12 @@  discard block
 block discarded – undo
1169 1169
                          * @param string $tag_link The tag link html.
1170 1170
                          * @param object $term The tag term object.
1171 1171
                          */
1172
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1172
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1173 1173
                         $links[] = $tag_link;
1174 1174
                     } else {
1175
-                        $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1175
+                        $tag_link = "<a href='".esc_attr(get_term_link($term->term_id, $term->taxonomy))."'>$term->name</a>";
1176 1176
                         /** This action is documented in geodirectory-template_actions.php */
1177
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1177
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1178 1178
                         $links[] = $tag_link;
1179 1179
                     }
1180 1180
                     $terms[] = $term;
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
             if (!isset($listing_label)) {
1185 1185
                 $listing_label = '';
1186 1186
             }
1187
-            $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1187
+            $taxonomies[$post_type.'_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1188 1188
         endif;
1189 1189
 
1190 1190
     }
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
                     $term = get_term_by('id', $post_term, $post_taxonomy);
1213 1213
 
1214 1214
                     if (is_object($term)) {
1215
-                        $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1215
+                        $term_link = "<a href='".esc_attr(get_term_link($term, $post_taxonomy))."'>$term->name</a>";
1216 1216
                         /**
1217 1217
                          * Filter the category name on the details page.
1218 1218
                          *
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
                          * @param string $term_link The link html to the category.
1221 1221
                          * @param object $term The category term object.
1222 1222
                          */
1223
-                        $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1223
+                        $term_link = apply_filters('geodir_details_taxonomies_cat_link', $term_link, $term);
1224 1224
                         $links[] = $term_link;
1225 1225
                         $terms[] = $term;
1226 1226
                     }
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
         if (!isset($listing_label)) {
1239 1239
             $listing_label = '';
1240 1240
         }
1241
-        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1241
+        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1242 1242
 
1243 1243
     }
1244 1244
 
@@ -1251,14 +1251,14 @@  discard block
 block discarded – undo
1251 1251
      * @param string $listing_label The post type label.
1252 1252
      * @param string $listing_label The post type label with ucwords function.
1253 1253
      */
1254
-    $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1254
+    $taxonomies = apply_filters('geodir_details_taxonomies_output', $taxonomies, $post_type, $listing_label, geodir_ucwords($listing_label));
1255 1255
 
1256 1256
     if (isset($taxonomies[$post_taxonomy])) {
1257
-        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1257
+        echo '<span class="geodir-category">'.$taxonomies[$post_taxonomy].'</span>';
1258 1258
     }
1259 1259
 
1260
-    if (isset($taxonomies[$post_type . '_tags']))
1261
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1260
+    if (isset($taxonomies[$post_type.'_tags']))
1261
+        echo '<span class="geodir-tags">'.$taxonomies[$post_type.'_tags'].'</span>';
1262 1262
 
1263 1263
     ?>
1264 1264
     </p><?php
@@ -1279,11 +1279,11 @@  discard block
 block discarded – undo
1279 1279
  * @param object $post Optional. The post object or blank.
1280 1280
  * @package GeoDirectory
1281 1281
  */
1282
-function geodir_action_details_micordata($post='')
1282
+function geodir_action_details_micordata($post = '')
1283 1283
 {
1284 1284
 
1285 1285
     global $preview;
1286
-    if(empty($post)){global $post;}
1286
+    if (empty($post)) {global $post; }
1287 1287
     if ($preview || !geodir_is_page('detail')) {
1288 1288
         return;
1289 1289
     }
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
                 "description" => $review->comment_content,
1305 1305
                 "reviewRating" => array(
1306 1306
                     "@type" => "Rating",
1307
-                    "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1307
+                    "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1308 1308
                     "ratingValue" => geodir_get_commentoverall($review->comment_ID),
1309 1309
                     "worstRating" => "1"
1310 1310
                 )
@@ -1332,13 +1332,13 @@  discard block
 block discarded – undo
1332 1332
     }
1333 1333
     //print_r($post);
1334 1334
     // external links
1335
-    $external_links =  array();
1335
+    $external_links = array();
1336 1336
     $external_links[] = $post->geodir_website;
1337 1337
     $external_links[] = $post->geodir_twitter;
1338 1338
     $external_links[] = $post->geodir_facebook;
1339 1339
     $external_links = array_filter($external_links);
1340 1340
 
1341
-    if(!empty($external_links)){
1341
+    if (!empty($external_links)) {
1342 1342
         $external_links = array_values($external_links);
1343 1343
     }
1344 1344
 
@@ -1348,17 +1348,17 @@  discard block
 block discarded – undo
1348 1348
 
1349 1349
     // schema type
1350 1350
     $schema_type = 'LocalBusiness';
1351
-    if(isset($post->default_category) && $post->default_category){
1351
+    if (isset($post->default_category) && $post->default_category) {
1352 1352
         $cat_schema = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1353
-        if($cat_schema){$schema_type = $cat_schema;}
1354
-        if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1353
+        if ($cat_schema) {$schema_type = $cat_schema; }
1354
+        if (!$schema_type && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
1355 1355
     }
1356 1356
 
1357 1357
     $schema = array();
1358 1358
     $schema['@context'] = "http://schema.org";
1359 1359
     $schema['@type'] = $schema_type;
1360 1360
     $schema['name'] = $post->post_name;
1361
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1361
+    $schema['description'] = wp_strip_all_tags($post->post_content, true);
1362 1362
     $schema['telephone'] = $post->geodir_contact;
1363 1363
     $schema['url'] = $c_url;
1364 1364
     $schema['sameAs'] = $external_links;
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
         "postalCode" => $post->post_zip
1373 1373
     );
1374 1374
 
1375
-    if($post->post_latitude && $post->post_longitude) {
1375
+    if ($post->post_latitude && $post->post_longitude) {
1376 1376
         $schema['geo'] = array(
1377 1377
             "@type" => "GeoCoordinates",
1378 1378
             "latitude" => $post->post_latitude,
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
         );
1381 1381
     }
1382 1382
 
1383
-    if($post_avgratings) {
1383
+    if ($post_avgratings) {
1384 1384
         $schema['aggregateRating'] = array(
1385 1385
             "@type" => "AggregateRating",
1386 1386
             "ratingValue" => $post_avgratings,
@@ -1399,10 +1399,10 @@  discard block
 block discarded – undo
1399 1399
      * @param array $schema The array of schema data to be filtered.
1400 1400
      * @param object $post The post object.
1401 1401
      */
1402
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1402
+    $schema = apply_filters('geodir_details_schema', $schema, $post);
1403 1403
 
1404 1404
 
1405
-    echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1405
+    echo '<script type="application/ld+json">'.json_encode($schema).'</script>';
1406 1406
 
1407 1407
 }
1408 1408
 
@@ -1423,9 +1423,9 @@  discard block
 block discarded – undo
1423 1423
     ?>
1424 1424
     <div class="geodir-pos_navigation clearfix">
1425 1425
     <div
1426
-        class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
1426
+        class="geodir-post_left"><?php previous_post_link('%link', ''.__('Previous', 'geodirectory'), false) ?></div>
1427 1427
     <div
1428
-        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory') . '', false) ?></div>
1428
+        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory').'', false) ?></div>
1429 1429
     </div><?php
1430 1430
 }
1431 1431
 
@@ -1494,12 +1494,12 @@  discard block
 block discarded – undo
1494 1494
     $gd_post_type = geodir_get_current_posttype();
1495 1495
     $post_type_info = get_post_type_object($gd_post_type);
1496 1496
 
1497
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
1497
+    $add_string_in_title = __('All', 'geodirectory').' ';
1498 1498
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1499
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1499
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
1500 1500
     }
1501 1501
 
1502
-    $list_title = $add_string_in_title . __(ucfirst($post_type_info->labels->name), 'geodirectory');
1502
+    $list_title = $add_string_in_title.__(ucfirst($post_type_info->labels->name), 'geodirectory');
1503 1503
     $single_name = $post_type_info->labels->singular_name;
1504 1504
 
1505 1505
     $taxonomy = geodir_get_taxonomies($gd_post_type, true);
@@ -1527,12 +1527,12 @@  discard block
 block discarded – undo
1527 1527
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
1528 1528
         if (!empty($current_term)) {
1529 1529
             $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1530
-            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1530
+            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1531 1531
                 $location_last_char = substr($location_name, -1);
1532 1532
                 $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1533
-                $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1533
+                $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1534 1534
             } else {
1535
-                $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1535
+                $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1536 1536
             }
1537 1537
         } else {
1538 1538
             if (count($taxonomy) > 1) {
@@ -1540,12 +1540,12 @@  discard block
 block discarded – undo
1540 1540
 
1541 1541
                 if (!empty($current_term)) {
1542 1542
                     $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1543
-                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1543
+                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1544 1544
                         $location_last_char = substr($location_name, -1);
1545 1545
                         $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1546
-                        $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1546
+                        $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1547 1547
                     } else {
1548
-                        $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1548
+                        $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1549 1549
                     }
1550 1550
                 }
1551 1551
             }
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
                 $gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1574 1574
             }
1575 1575
 
1576
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1576
+            $list_title .= __(' in', 'geodirectory')." '".$gd_city."'";
1577 1577
         } else if ($gd_region != '') {
1578 1578
             if ($gd_region_actual != '') {
1579 1579
                 $gd_region = $gd_region_actual;
@@ -1583,7 +1583,7 @@  discard block
 block discarded – undo
1583 1583
                 $gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1584 1584
             }
1585 1585
 
1586
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1586
+            $list_title .= __(' in', 'geodirectory')." '".$gd_region."'";
1587 1587
         } else if ($gd_country != '') {
1588 1588
             if ($gd_country_actual != '') {
1589 1589
                 $gd_country = $gd_country_actual;
@@ -1593,12 +1593,12 @@  discard block
 block discarded – undo
1593 1593
                 $gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1594 1594
             }
1595 1595
 
1596
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1596
+            $list_title .= __(' in', 'geodirectory')." '".$gd_country."'";
1597 1597
         }
1598 1598
     }
1599 1599
 
1600 1600
     if (is_search()) {
1601
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1601
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
1602 1602
     }
1603 1603
     /** This action is documented in geodirectory_template_actions.php */
1604 1604
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
@@ -1607,26 +1607,26 @@  discard block
 block discarded – undo
1607 1607
 
1608 1608
 
1609 1609
     $title = $list_title;
1610
-    if(geodir_is_page('pt')){
1610
+    if (geodir_is_page('pt')) {
1611 1611
         $gd_page = 'pt';
1612
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1612
+        $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1613 1613
     }
1614
-    elseif(geodir_is_page('listing')){
1614
+    elseif (geodir_is_page('listing')) {
1615 1615
         $gd_page = 'listing';
1616 1616
         global $wp_query;
1617 1617
         $current_term = $wp_query->get_queried_object();
1618
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1618
+        if (strpos($current_term->taxonomy, '_tags') !== false) {
1619 1619
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1620
-        }else{
1620
+        } else {
1621 1621
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1622 1622
         }
1623 1623
 
1624 1624
     }
1625
-    elseif(geodir_is_page('author')){
1625
+    elseif (geodir_is_page('author')) {
1626 1626
         $gd_page = 'author';
1627
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1627
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1628 1628
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1629
-        }else{
1629
+        } else {
1630 1630
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1631 1631
         }
1632 1632
 
@@ -1640,16 +1640,16 @@  discard block
 block discarded – undo
1640 1640
      * @param string $title The page title including variables.
1641 1641
      * @param string $gd_page The GeoDirectory page type if any.
1642 1642
      */
1643
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1643
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1644 1644
 
1645
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1645
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
1646 1646
         /**
1647 1647
          * Filter the listing page title.
1648 1648
          *
1649 1649
          * @since 1.0.0
1650 1650
          * @param string $list_title The title for the category page.
1651 1651
          */
1652
-        apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1652
+        apply_filters('geodir_listing_page_title', $title).'</h1></header>';
1653 1653
 }
1654 1654
 
1655 1655
 add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
@@ -1668,16 +1668,16 @@  discard block
 block discarded – undo
1668 1668
     $gd_post_type = geodir_get_current_posttype();
1669 1669
     if (isset($current_term->term_id) && $current_term->term_id != '') {
1670 1670
 
1671
-        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1671
+        $term_desc = term_description($current_term->term_id, $gd_post_type.'_tags');
1672 1672
         $saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1673 1673
         if ($term_desc && !$saved_data) {
1674 1674
             $saved_data = $term_desc;
1675 1675
         }
1676 1676
 
1677 1677
         // stop payment manager filtering content length
1678
-        $filter_priority = has_filter( 'the_content', 'geodir_payments_the_content' );
1679
-        if ( false !== $filter_priority ) {
1680
-            remove_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
1678
+        $filter_priority = has_filter('the_content', 'geodir_payments_the_content');
1679
+        if (false !== $filter_priority) {
1680
+            remove_filter('the_content', 'geodir_payments_the_content', $filter_priority);
1681 1681
         }
1682 1682
 
1683 1683
         /**
@@ -1691,14 +1691,14 @@  discard block
 block discarded – undo
1691 1691
         $cat_description = apply_filters('the_content', $saved_data);
1692 1692
 
1693 1693
 
1694
-        if ( false !== $filter_priority ) {
1695
-            add_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
1694
+        if (false !== $filter_priority) {
1695
+            add_filter('the_content', 'geodir_payments_the_content', $filter_priority);
1696 1696
         }
1697 1697
 
1698 1698
         if ($cat_description) {
1699 1699
             ?>
1700 1700
 
1701
-            <div class="term_description"><?php echo $cat_description;?></div> <?php
1701
+            <div class="term_description"><?php echo $cat_description; ?></div> <?php
1702 1702
         }
1703 1703
 
1704 1704
     }
@@ -1748,13 +1748,13 @@  discard block
 block discarded – undo
1748 1748
 function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
1749 1749
 {
1750 1750
     if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1751
-        $width_css = 'style="width:' . $width . '%;"';
1751
+        $width_css = 'style="width:'.$width.'%;"';
1752 1752
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1753
-        $width_css = 'style="width:' . $width . '%;"';
1753
+        $width_css = 'style="width:'.$width.'%;"';
1754 1754
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1755
-        $width_css = 'style="width:' . $width . '%;"';
1755
+        $width_css = 'style="width:'.$width.'%;"';
1756 1756
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1757
-        $width_css = 'style="width:' . $width . '%;"';
1757
+        $width_css = 'style="width:'.$width.'%;"';
1758 1758
     } else {
1759 1759
         $width_css = '';
1760 1760
     }
@@ -2059,11 +2059,11 @@  discard block
 block discarded – undo
2059 2059
 
2060 2060
     $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2061 2061
 
2062
-    if(geodir_is_page('add-listing')){
2062
+    if (geodir_is_page('add-listing')) {
2063 2063
         $gd_page = 'add-listing';
2064
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2064
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2065 2065
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2066
-        }elseif(isset($listing_type)){
2066
+        }elseif (isset($listing_type)) {
2067 2067
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2068 2068
         }
2069 2069
 
@@ -2077,9 +2077,9 @@  discard block
 block discarded – undo
2077 2077
      * @param string $title The page title including variables.
2078 2078
      * @param string $gd_page The GeoDirectory page type if any.
2079 2079
      */
2080
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2080
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2081 2081
 
2082
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2082
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">';
2083 2083
     echo $title;
2084 2084
     echo '</h1></header>';
2085 2085
 }
@@ -2093,7 +2093,7 @@  discard block
 block discarded – undo
2093 2093
  */
2094 2094
 function geodir_action_add_listing_page_mandatory()
2095 2095
 {?>
2096
-    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
2096
+    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
2097 2097
 <?php
2098 2098
 }
2099 2099
 
@@ -2128,7 +2128,7 @@  discard block
 block discarded – undo
2128 2128
 
2129 2129
     if (isset($_REQUEST['backandedit'])) {
2130 2130
         global $post;
2131
-        $post = (object)$gd_session->get('listing');
2131
+        $post = (object) $gd_session->get('listing');
2132 2132
         $listing_type = $post->listing_type;
2133 2133
         $title = $post->post_title;
2134 2134
         $desc = $post->post_desc;
@@ -2143,7 +2143,7 @@  discard block
 block discarded – undo
2143 2143
         $thumb_img_arr = geodir_get_images($post->ID);
2144 2144
         if ($thumb_img_arr) {
2145 2145
             foreach ($thumb_img_arr as $post_img) {
2146
-                $curImages .= $post_img->src . ',';
2146
+                $curImages .= $post_img->src.',';
2147 2147
             }
2148 2148
         }
2149 2149
 
@@ -2151,7 +2151,7 @@  discard block
 block discarded – undo
2151 2151
         $title = $post->post_title;
2152 2152
         $desc = $post->post_content;
2153 2153
         $kw_tags = $post->post_tags;
2154
-        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2154
+        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type.'_tags', array('fields' => 'names')));
2155 2155
     } else {
2156 2156
         $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2157 2157
     }
@@ -2162,18 +2162,18 @@  discard block
 block discarded – undo
2162 2162
 
2163 2163
     $post_type_info = geodir_get_posttype_info($listing_type);
2164 2164
 
2165
-    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing','geodirectory');
2165
+    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing', 'geodirectory');
2166 2166
 
2167 2167
     ?>
2168
-    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2169
-        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2170
-        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
2168
+    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
2169
+        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2170
+        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2171 2171
         <?php if ($page_id) { ?>
2172
-        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
2172
+        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
2173 2173
         <?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
2174
-            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
2174
+            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
2175 2175
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2176
-            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2176
+            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
2177 2177
         <?php
2178 2178
         } 
2179 2179
         /**
@@ -2185,7 +2185,7 @@  discard block
 block discarded – undo
2185 2185
          */
2186 2186
         do_action('geodir_before_detail_fields');
2187 2187
         ?>
2188
-        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2188
+        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
2189 2189
         <?php
2190 2190
         /**
2191 2191
          * Called at the top of the add listing page form for frontend.
@@ -2197,10 +2197,10 @@  discard block
 block discarded – undo
2197 2197
         do_action('geodir_before_main_form_fields');
2198 2198
         ?>
2199 2199
         <div id="geodir_post_title_row" class="required_field geodir_form_row clearfix gd-fieldset-details">
2200
-            <label><?php echo sprintf( __('%s Title', 'geodirectory'), $cpt_singular_name ); ?><span>*</span> </label>
2200
+            <label><?php echo sprintf(__('%s Title', 'geodirectory'), $cpt_singular_name); ?><span>*</span> </label>
2201 2201
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
2202 2202
                    value="<?php echo esc_attr(stripslashes($title)); ?>"/>
2203
-            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2203
+            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
2204 2204
         </div>
2205 2205
         <?php
2206 2206
         $show_editor = get_option('geodir_tiny_editor_on_add_listing');
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
         $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2236 2236
         
2237 2237
         $desc_class = '';
2238
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2238
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2239 2239
             /**
2240 2240
              * Called on the add listing page form for frontend just before the description field.
2241 2241
              *
@@ -2248,8 +2248,8 @@  discard block
 block discarded – undo
2248 2248
             $desc_class = ' hidden';
2249 2249
         }
2250 2250
         ?>
2251
-        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2252
-            <label><?php echo sprintf( __('%s Description', 'geodirectory'), $cpt_singular_name ); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2251
+        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
2252
+            <label><?php echo sprintf(__('%s Description', 'geodirectory'), $cpt_singular_name); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2253 2253
             <?php
2254 2254
             if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2255 2255
                 $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
@@ -2258,16 +2258,16 @@  discard block
 block discarded – undo
2258 2258
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2259 2259
                 </div>
2260 2260
             <?php if ($desc_limit != '') { ?>
2261
-                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
2261
+                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
2262 2262
             <?php } } else { ?>
2263 2263
                 <textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
2264 2264
             <?php } if ($desc_limit_msg != '') { ?>
2265 2265
                 <span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
2266 2266
             <?php } ?>
2267
-            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2267
+            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
2268 2268
         </div>
2269 2269
         <?php
2270
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2270
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2271 2271
             /**
2272 2272
              * Called on the add listing page form for frontend just after the description field.
2273 2273
              *
@@ -2306,7 +2306,7 @@  discard block
 block discarded – undo
2306 2306
         $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2307 2307
         
2308 2308
         $tags_class = '';
2309
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2309
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2310 2310
             /**
2311 2311
              * Called on the add listing page form for frontend just before the tags field.
2312 2312
              *
@@ -2317,14 +2317,14 @@  discard block
 block discarded – undo
2317 2317
             $tags_class = ' hidden';
2318 2318
         }
2319 2319
         ?>
2320
-        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2320
+        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
2321 2321
             <label><?php echo TAGKW_TEXT; ?></label>
2322 2322
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
2323
-                   maxlength="<?php echo $kw_tags_count;?>"/>
2324
-            <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2323
+                   maxlength="<?php echo $kw_tags_count; ?>"/>
2324
+            <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
2325 2325
         </div>
2326 2326
         <?php
2327
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2327
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2328 2328
             /**
2329 2329
              * Called on the add listing page form for frontend just after the tags field.
2330 2330
              *
@@ -2350,7 +2350,7 @@  discard block
 block discarded – undo
2350 2350
         $thumb_img_arr = array();
2351 2351
         $totImg = 0;
2352 2352
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2353
-            $post = (object)$gd_session->get('listing');
2353
+            $post = (object) $gd_session->get('listing');
2354 2354
             if (isset($post->post_images))
2355 2355
                 $curImages = trim($post->post_images, ",");
2356 2356
 
@@ -2363,7 +2363,7 @@  discard block
 block discarded – undo
2363 2363
             $listing_type = $post->listing_type;
2364 2364
 
2365 2365
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2366
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2366
+            $post = geodir_get_post_info((int) $_REQUEST['pid']);
2367 2367
             $listing_type = $post->post_type;
2368 2368
             $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2369 2369
 
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
                 //$curImages = $img->src.",";
2378 2378
             }
2379 2379
 
2380
-            $totImg = count((array)$thumb_img_arr);
2380
+            $totImg = count((array) $thumb_img_arr);
2381 2381
         }
2382 2382
 
2383 2383
         if ($curImages != '')
@@ -2398,15 +2398,15 @@  discard block
 block discarded – undo
2398 2398
         if ($show_image_input_box) {
2399 2399
             ?>
2400 2400
 
2401
-            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2401
+            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
2402 2402
                 <?php if ($image_limit == 1) {
2403
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2403
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('image with this package', 'geodirectory').')</small>';
2404 2404
                 } ?>
2405 2405
                 <?php if ($image_limit > 1) {
2406
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2406
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('images with this package', 'geodirectory').')</small>';
2407 2407
                 } ?>
2408 2408
                 <?php if ($image_limit == '') {
2409
-                    echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2409
+                    echo '<br /><small>('.__('You can upload unlimited images with this package', 'geodirectory').')</small>';
2410 2410
                 } ?>
2411 2411
             </h5>
2412 2412
 
@@ -2421,11 +2421,11 @@  discard block
 block discarded – undo
2421 2421
                 <div
2422 2422
                     class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
2423 2423
                     id="<?php echo $id; ?>plupload-upload-ui">
2424
-                    <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
2424
+                    <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
2425 2425
                     <input id="<?php echo $id; ?>plupload-browse-button" type="button"
2426 2426
                            value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
2427 2427
                     <span class="ajaxnonceplu"
2428
-                          id="ajaxnonceplu<?php echo wp_create_nonce($id . 'pluploadan'); ?>"></span>
2428
+                          id="ajaxnonceplu<?php echo wp_create_nonce($id.'pluploadan'); ?>"></span>
2429 2429
                     <?php if ($width && $height): ?>
2430 2430
                         <span class="plupload-resize"></span>
2431 2431
                         <span class="plupload-width" id="plupload-width<?php echo $width; ?>"></span>
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
                      id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
2439 2439
                 </div>
2440 2440
                 <span
2441
-                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory');?></span>
2441
+                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory'); ?></span>
2442 2442
                 <span id="<?php echo $id; ?>upload-error" style="display:none"></span>
2443 2443
             </div>
2444 2444
 
@@ -2450,7 +2450,7 @@  discard block
 block discarded – undo
2450 2450
          *
2451 2451
          * @since 1.0.0
2452 2452
          */
2453
-        do_action('geodir_after_main_form_fields');?>
2453
+        do_action('geodir_after_main_form_fields'); ?>
2454 2454
 
2455 2455
 
2456 2456
         <!-- add captcha code -->
@@ -2461,7 +2461,7 @@  discard block
 block discarded – undo
2461 2461
         </script>
2462 2462
         <noscript>
2463 2463
             <div>
2464
-                <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
2464
+                <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
2465 2465
                 <input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
2466 2466
             </div>
2467 2467
         </noscript>
@@ -2471,10 +2471,10 @@  discard block
 block discarded – undo
2471 2471
         <!-- end captcha code -->
2472 2472
 
2473 2473
         <div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
2474
-            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
2475
-                   class="geodir_button" <?php echo $submit_button;?>/>
2474
+            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
2475
+                   class="geodir_button" <?php echo $submit_button; ?>/>
2476 2476
             <span class="geodir_message_note"
2477
-                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
2477
+                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
2478 2478
         </div>
2479 2479
 
2480 2480
     </form>
@@ -2536,7 +2536,7 @@  discard block
 block discarded – undo
2536 2536
         class="<?php
2537 2537
         /** This action is documented in geodirectory_template_actions.php */
2538 2538
         echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2539
-        <?php dynamic_sidebar('Reg/Login Top Section');?>
2539
+        <?php dynamic_sidebar('Reg/Login Top Section'); ?>
2540 2540
     </div><!-- clearfix ends here-->
2541 2541
 <?php
2542 2542
 }
@@ -2558,7 +2558,7 @@  discard block
 block discarded – undo
2558 2558
 
2559 2559
     ?>
2560 2560
     <script type="text/javascript">
2561
-        <?php if ( $user_login ) { ?>
2561
+        <?php if ($user_login) { ?>
2562 2562
         setTimeout(function () {
2563 2563
             try {
2564 2564
                 d = document.getElementById('user_pass');
@@ -2575,7 +2575,7 @@  discard block
 block discarded – undo
2575 2575
         <?php } ?>
2576 2576
     </script>
2577 2577
     <script type="text/javascript">
2578
-        <?php if ( $user_login ) { ?>
2578
+        <?php if ($user_login) { ?>
2579 2579
         setTimeout(function () {
2580 2580
             try {
2581 2581
                 d = document.getElementById('user_pass');
@@ -2600,7 +2600,7 @@  discard block
 block discarded – undo
2600 2600
         foreach ($errors as $errorsObj) {
2601 2601
             foreach ($errorsObj as $key => $val) {
2602 2602
                 for ($i = 0; $i < count($val); $i++) {
2603
-                    echo "<div class=sucess_msg>" . $val[$i] . '</div>';
2603
+                    echo "<div class=sucess_msg>".$val[$i].'</div>';
2604 2604
                     $registration_error_msg = 1;
2605 2605
                 }
2606 2606
             }
@@ -2617,7 +2617,7 @@  discard block
 block discarded – undo
2617 2617
              *
2618 2618
              * @since 1.0.0
2619 2619
              */
2620
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2620
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2621 2621
         </div>
2622 2622
 
2623 2623
     <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up') { ?>
@@ -2629,7 +2629,7 @@  discard block
 block discarded – undo
2629 2629
              *
2630 2630
              * @since 1.0.0
2631 2631
              */
2632
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2632
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2633 2633
         </div>
2634 2634
 
2635 2635
     <?php } else { ?>
@@ -2641,7 +2641,7 @@  discard block
 block discarded – undo
2641 2641
              *
2642 2642
              * @since 1.0.0
2643 2643
              */
2644
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2644
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2645 2645
         </div>
2646 2646
         <div class="registration_form_r">
2647 2647
             <?php
@@ -2650,7 +2650,7 @@  discard block
 block discarded – undo
2650 2650
              *
2651 2651
              * @since 1.0.0
2652 2652
              */
2653
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2653
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2654 2654
         </div>
2655 2655
 
2656 2656
     <?php }?>
@@ -2686,12 +2686,12 @@  discard block
 block discarded – undo
2686 2686
     $gd_post_type = geodir_get_current_posttype();
2687 2687
     $post_type_info = get_post_type_object($gd_post_type);
2688 2688
 
2689
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
2689
+    $add_string_in_title = __('All', 'geodirectory').' ';
2690 2690
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2691
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2691
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
2692 2692
     }
2693 2693
 
2694
-    $list_title = $add_string_in_title . $post_type_info->labels->name;
2694
+    $list_title = $add_string_in_title.$post_type_info->labels->name;
2695 2695
     $single_name = $post_type_info->labels->singular_name;
2696 2696
 
2697 2697
     $taxonomy = geodir_get_taxonomies($gd_post_type);
@@ -2699,12 +2699,12 @@  discard block
 block discarded – undo
2699 2699
     if (!empty($term)) {
2700 2700
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
2701 2701
         if (!empty($current_term))
2702
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2702
+            $list_title .= __(' in', 'geodirectory')." '".geodir_ucwords($current_term->name)."'";
2703 2703
     }
2704 2704
 
2705 2705
 
2706 2706
     if (is_search()) {
2707
-        $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2707
+        $list_title = __('Search', 'geodirectory').' '.__($post_type_info->labels->name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2708 2708
 
2709 2709
     }
2710 2710
     /** This action is documented in geodirectory_template_actions.php */
@@ -2713,11 +2713,11 @@  discard block
 block discarded – undo
2713 2713
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2714 2714
 
2715 2715
     $title = $list_title;
2716
-    if(geodir_is_page('author')){
2716
+    if (geodir_is_page('author')) {
2717 2717
         $gd_page = 'author';
2718
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2718
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2719 2719
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2720
-        }else{
2720
+        } else {
2721 2721
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2722 2722
         }
2723 2723
 
@@ -2731,16 +2731,16 @@  discard block
 block discarded – undo
2731 2731
      * @param string $title The page title including variables.
2732 2732
      * @param string $gd_page The GeoDirectory page type if any.
2733 2733
      */
2734
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2734
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2735 2735
 
2736
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2736
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2737 2737
         /**
2738 2738
          * Filter the author page title text.
2739 2739
          *
2740 2740
          * @since 1.0.0
2741 2741
          * @param string $list_title The title for the page.
2742 2742
          */
2743
-        apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2743
+        apply_filters('geodir_author_page_title_text', $title).'</h1></header>';
2744 2744
 }
2745 2745
 
2746 2746
 
@@ -2945,19 +2945,19 @@  discard block
 block discarded – undo
2945 2945
     $post_type_info = get_post_type_object($gd_post_type);
2946 2946
 
2947 2947
     $pt_name = '';
2948
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2948
+    if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
2949 2949
 
2950 2950
     if (is_search()) {
2951
-        $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2951
+        $list_title = __('Search', 'geodirectory').' '.__($pt_name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2952 2952
 
2953 2953
     }
2954 2954
     /** This action is documented in geodirectory_template_actions.php */
2955 2955
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2956 2956
     /** This action is documented in geodirectory_template_actions.php */
2957 2957
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2958
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2958
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2959 2959
         /** This action is documented in geodirectory_template_actions.php */
2960
-        apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
2960
+        apply_filters('geodir_listing_page_title', wptexturize($list_title)).'</h1></header>';
2961 2961
 }
2962 2962
 
2963 2963
 // action for adding the listings page top widget area
@@ -3361,7 +3361,7 @@  discard block
 block discarded – undo
3361 3361
         $gd_post_type = geodir_get_current_posttype();
3362 3362
         $post_type_info = get_post_type_object($gd_post_type);
3363 3363
 
3364
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3364
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' :', 'geodirectory');
3365 3365
     }
3366 3366
     return $list_title;
3367 3367
 }
@@ -3377,7 +3377,7 @@  discard block
 block discarded – undo
3377 3377
  * @param string $position Position to add the post content. 'before' or 'after'. Default 'before'.
3378 3378
  * @param string $gd_page The geodirectory page type. Default null.
3379 3379
  */
3380
-function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
3380
+function geodir_add_page_content($position = 'before', $gd_page = '') {
3381 3381
     global $post;
3382 3382
         
3383 3383
     $gd_page_id = NULL;
Please login to merge, or discard this patch.