Passed
Pull Request — master (#250)
by Viruthagiri
09:05
created
geodirectory-admin/admin_template_tags.php 3 patches
Indentation   +515 added lines, -515 removed lines patch added patch discarded remove patch
@@ -7,33 +7,33 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if (!function_exists('geodir_admin_panel')) {
10
-    /**
11
-     * GeoDirectory Backend Admin Panel.
12
-     *
13
-     * Handles the display of the main GeoDirectory admin panel.
14
-     *
15
-     * @since 1.0.0
16
-     * @package GeoDirectory
17
-     * @global string $current_tab Current tab in geodirectory settings.
18
-     * @global object $geodirectory GeoDirectory plugin object.
19
-     */
20
-    function geodir_admin_panel()
21
-    {
22
-        global $geodirectory;
23
-        global $current_tab;
24
-
25
-
26
-        ?>
10
+	/**
11
+	 * GeoDirectory Backend Admin Panel.
12
+	 *
13
+	 * Handles the display of the main GeoDirectory admin panel.
14
+	 *
15
+	 * @since 1.0.0
16
+	 * @package GeoDirectory
17
+	 * @global string $current_tab Current tab in geodirectory settings.
18
+	 * @global object $geodirectory GeoDirectory plugin object.
19
+	 */
20
+	function geodir_admin_panel()
21
+	{
22
+		global $geodirectory;
23
+		global $current_tab;
24
+
25
+
26
+		?>
27 27
 
28 28
         <div id="gd-wrapper-main" class="wrap geodirectory">
29 29
             <?php
30
-            /**
31
-             * Called just after the opening wrapper div for the GD settings page in the admin area.
32
-             *
33
-             * @since 1.0.0
34
-             */
35
-            do_action('geodir_before_admin_panel');
36
-            ?>
30
+			/**
31
+			 * Called just after the opening wrapper div for the GD settings page in the admin area.
32
+			 *
33
+			 * @since 1.0.0
34
+			 */
35
+			do_action('geodir_before_admin_panel');
36
+			?>
37 37
 
38 38
             <div class="gd-wrapper gd-wrapper-vr clearfix">
39 39
 
@@ -44,75 +44,75 @@  discard block
 block discarded – undo
44 44
                          alt="geo-logo" class="geo-logoalter"/>
45 45
                     <ul>
46 46
                         <?php
47
-                        $tabs = array();
48
-                        /**
49
-                         * Filter the GD admin settings tabs on the left of the admin menu.
50
-                         *
51
-                         * @since 1.0.0
52
-                         * @param array $tabs The array of tabs to display.
53
-                         */
54
-                        $tabs = apply_filters('geodir_settings_tabs_array', $tabs);
55
-                        update_option('geodir_tabs', $tabs);// Important to show settings menu dropdown
56
-
57
-                        foreach ($tabs as $name => $args) :
58
-                            $label = $args['label'];
59
-
60
-
61
-                            $query_string = '';
62
-                            if (isset($args['subtabs']) && !empty($args['subtabs'])):
63
-
64
-                                $subtabs = $args['subtabs'];
65
-
66
-                                $query_string = '&subtab=' . $subtabs[0]['subtab'];
67
-
68
-                            endif;
69
-
70
-
71
-                            $tab_link = admin_url('admin.php?page=geodirectory&tab=' . $name . $query_string);
72
-
73
-                            if (isset($args['url']) && $args['url'] != '') {
74
-                                $tab_link = $args['url'];
75
-                            }
76
-
77
-                            if (!empty($args['request']))
78
-                                $tab_link = geodir_getlink($tab_link, $args['request']);
79
-
80
-                            if (isset($args['target']) && $args['target'] != '') {
81
-                                $tab_target = " target='" . sanitize_text_field($args['target']) . "' ";
82
-                            } else
83
-                                $tab_target = '';
84
-
85
-                            $tab_active = '';
86
-                            if ($current_tab == $name)
87
-                                $tab_active = ' class="tab-active" ';
88
-                            /**
89
-                             * Called before the individual settings tabs are output.
90
-                             *
91
-                             * @since 1.0.0
92
-                             * @param string $name The name of the settings tab.
93
-                             * @see 'geodir_after_settings_tabs'
94
-                             */
95
-                            do_action('geodir_before_settings_tabs', $name);
96
-                            echo '<li ' . $tab_active . ' ><a href="' . esc_url($tab_link) . '"  ' . $tab_target . ' >' . $label . '</a></li>';
97
-                            /**
98
-                             * Called after the individual settings tabs are output.
99
-                             *
100
-                             * @since 1.0.0
101
-                             * @param string $name The name of the settings tab.
102
-                             * @see 'geodir_before_settings_tabs'
103
-                             */
104
-                            do_action('geodir_after_settings_tabs', $name);
105
-                        endforeach;
106
-
107
-                        /**
108
-                         * Called after the GD settings tabs have been output.
109
-                         *
110
-                         * Called before the closing `ul` so can be used to add new settings tab links.
111
-                         *
112
-                         * @since 1.0.0
113
-                         */
114
-                        do_action('geodir_settings_tabs');
115
-                        ?>
47
+						$tabs = array();
48
+						/**
49
+						 * Filter the GD admin settings tabs on the left of the admin menu.
50
+						 *
51
+						 * @since 1.0.0
52
+						 * @param array $tabs The array of tabs to display.
53
+						 */
54
+						$tabs = apply_filters('geodir_settings_tabs_array', $tabs);
55
+						update_option('geodir_tabs', $tabs);// Important to show settings menu dropdown
56
+
57
+						foreach ($tabs as $name => $args) :
58
+							$label = $args['label'];
59
+
60
+
61
+							$query_string = '';
62
+							if (isset($args['subtabs']) && !empty($args['subtabs'])):
63
+
64
+								$subtabs = $args['subtabs'];
65
+
66
+								$query_string = '&subtab=' . $subtabs[0]['subtab'];
67
+
68
+							endif;
69
+
70
+
71
+							$tab_link = admin_url('admin.php?page=geodirectory&tab=' . $name . $query_string);
72
+
73
+							if (isset($args['url']) && $args['url'] != '') {
74
+								$tab_link = $args['url'];
75
+							}
76
+
77
+							if (!empty($args['request']))
78
+								$tab_link = geodir_getlink($tab_link, $args['request']);
79
+
80
+							if (isset($args['target']) && $args['target'] != '') {
81
+								$tab_target = " target='" . sanitize_text_field($args['target']) . "' ";
82
+							} else
83
+								$tab_target = '';
84
+
85
+							$tab_active = '';
86
+							if ($current_tab == $name)
87
+								$tab_active = ' class="tab-active" ';
88
+							/**
89
+							 * Called before the individual settings tabs are output.
90
+							 *
91
+							 * @since 1.0.0
92
+							 * @param string $name The name of the settings tab.
93
+							 * @see 'geodir_after_settings_tabs'
94
+							 */
95
+							do_action('geodir_before_settings_tabs', $name);
96
+							echo '<li ' . $tab_active . ' ><a href="' . esc_url($tab_link) . '"  ' . $tab_target . ' >' . $label . '</a></li>';
97
+							/**
98
+							 * Called after the individual settings tabs are output.
99
+							 *
100
+							 * @since 1.0.0
101
+							 * @param string $name The name of the settings tab.
102
+							 * @see 'geodir_before_settings_tabs'
103
+							 */
104
+							do_action('geodir_after_settings_tabs', $name);
105
+						endforeach;
106
+
107
+						/**
108
+						 * Called after the GD settings tabs have been output.
109
+						 *
110
+						 * Called before the closing `ul` so can be used to add new settings tab links.
111
+						 *
112
+						 * @since 1.0.0
113
+						 */
114
+						do_action('geodir_settings_tabs');
115
+						?>
116 116
                     </ul>
117 117
                 </div>
118 118
                 <!--gd-left-nav ends here-->
@@ -121,52 +121,52 @@  discard block
 block discarded – undo
121 121
                     <div class="gd-tabs-main">
122 122
 
123 123
                         <?php
124
-                        unset($subtabs);
125
-                        if (isset($tabs[$current_tab]['subtabs']))
126
-                            $subtabs = $tabs[$current_tab]['subtabs'];
127
-                        $form_action = '';
124
+						unset($subtabs);
125
+						if (isset($tabs[$current_tab]['subtabs']))
126
+							$subtabs = $tabs[$current_tab]['subtabs'];
127
+						$form_action = '';
128 128
 
129
-                        if (!empty($subtabs)):
130
-                        ?>
129
+						if (!empty($subtabs)):
130
+						?>
131 131
                             <dl class="gd-tab-head">
132 132
                                 <?php
133
-                                foreach ($subtabs as $sub) {
134
-                                    $subtab_active = '';
135
-                                    if (isset($_REQUEST['subtab']) && $sub['subtab'] == $_REQUEST['subtab']) {
136
-                                        $subtab_active = 'class="gd-tab-active"';
137
-                                        $form_action = isset($sub['form_action']) ? $sub['form_action'] : '';
138
-                                    }
139
-
140
-                                    $sub_tabs_link = admin_url() . 'admin.php?page=geodirectory&tab=' . $current_tab . '&subtab=' . $sub['subtab'];
141
-                                    if (isset($sub['request']) && is_array($sub['request']) && !empty($sub['request'])) {
142
-                                        $sub_tabs_link = geodir_getlink($sub_tabs_link, $sub['request']);
143
-                                    }
144
-                                    echo '<dd ' . $subtab_active . ' id="claim_listing"><a href="' . esc_url($sub_tabs_link) . '" >' . sanitize_text_field($sub['label']) . '</a></dd>';
145
-                                }
146
-                                ?>
133
+								foreach ($subtabs as $sub) {
134
+									$subtab_active = '';
135
+									if (isset($_REQUEST['subtab']) && $sub['subtab'] == $_REQUEST['subtab']) {
136
+										$subtab_active = 'class="gd-tab-active"';
137
+										$form_action = isset($sub['form_action']) ? $sub['form_action'] : '';
138
+									}
139
+
140
+									$sub_tabs_link = admin_url() . 'admin.php?page=geodirectory&tab=' . $current_tab . '&subtab=' . $sub['subtab'];
141
+									if (isset($sub['request']) && is_array($sub['request']) && !empty($sub['request'])) {
142
+										$sub_tabs_link = geodir_getlink($sub_tabs_link, $sub['request']);
143
+									}
144
+									echo '<dd ' . $subtab_active . ' id="claim_listing"><a href="' . esc_url($sub_tabs_link) . '" >' . sanitize_text_field($sub['label']) . '</a></dd>';
145
+								}
146
+								?>
147 147
                             </dl>
148 148
 
149 149
                         <?php endif; ?>
150 150
                         <div class="gd-tab-content <?php if (empty($subtabs)) {
151
-                            echo "inner_contet_tabs";
152
-                        } ?>">
151
+							echo "inner_contet_tabs";
152
+						} ?>">
153 153
                             <form method="post" id="mainform"
154 154
                                   class="geodir_optionform <?php echo $current_tab . ' '; ?><?php if (isset($sub['subtab'])) {
155
-                                      echo sanitize_text_field($sub['subtab']);
156
-                                  } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data">
155
+									  echo sanitize_text_field($sub['subtab']);
156
+								  } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data">
157 157
                                 <input type="hidden" class="active_tab" name="active_tab"
158 158
                                        value="<?php if (isset($_REQUEST['active_tab'])) {
159
-                                           echo sanitize_text_field($_REQUEST['active_tab']);
160
-                                       } ?>"/>
159
+										   echo sanitize_text_field($_REQUEST['active_tab']);
160
+									   } ?>"/>
161 161
                                 <?php wp_nonce_field('geodir-settings', '_wpnonce', true, true); ?>
162 162
                                 <?php wp_nonce_field('geodir-settings-' . $current_tab, '_wpnonce-' . $current_tab, true, true); ?>
163 163
                                 <?php
164
-                                /**
165
-                                 * Used to call the content of each GD settings tab page.
166
-                                 *
167
-                                 * @since 1.0.0
168
-                                 */
169
-                                do_action('geodir_admin_option_form', $current_tab); ?>
164
+								/**
165
+								 * Used to call the content of each GD settings tab page.
166
+								 *
167
+								 * @since 1.0.0
168
+								 */
169
+								do_action('geodir_admin_option_form', $current_tab); ?>
170 170
                             </form>
171 171
                         </div>
172 172
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         </script>
268 268
     <?php
269 269
 
270
-    }
270
+	}
271 271
 }
272 272
 
273 273
 
@@ -283,48 +283,48 @@  discard block
 block discarded – undo
283 283
 function geodir_admin_option_form($tab_name)
284 284
 {
285 285
 
286
-    //echo $tab_name.'_array.php' ;
287
-    global $geodir_settings, $is_default, $mapzoom;
288
-    if (file_exists(dirname(__FILE__) . '/option-pages/' . $tab_name . '_array.php')) {
289
-        /**
290
-         * Contains settings array for given tab.
291
-         *
292
-         * @since 1.0.0
293
-         * @package GeoDirectory
294
-         */
295
-        include_once('option-pages/' . $tab_name . '_array.php');
296
-    }
297
-
298
-    $listing_type = isset($_REQUEST['listing_type']) ? $_REQUEST['listing_type'] : '';
299
-
300
-    switch ($tab_name) {
301
-
302
-        case 'general_settings':
303
-
304
-            geodir_admin_fields($geodir_settings['general_settings']);
305
-            /**
306
-             *
307
-             * Update Taxonomy Options *
308
-             *
309
-             **/
310
-            /*add_action('updated_option_place_prefix','update_listing_prefix');
286
+	//echo $tab_name.'_array.php' ;
287
+	global $geodir_settings, $is_default, $mapzoom;
288
+	if (file_exists(dirname(__FILE__) . '/option-pages/' . $tab_name . '_array.php')) {
289
+		/**
290
+		 * Contains settings array for given tab.
291
+		 *
292
+		 * @since 1.0.0
293
+		 * @package GeoDirectory
294
+		 */
295
+		include_once('option-pages/' . $tab_name . '_array.php');
296
+	}
297
+
298
+	$listing_type = isset($_REQUEST['listing_type']) ? $_REQUEST['listing_type'] : '';
299
+
300
+	switch ($tab_name) {
301
+
302
+		case 'general_settings':
303
+
304
+			geodir_admin_fields($geodir_settings['general_settings']);
305
+			/**
306
+			 *
307
+			 * Update Taxonomy Options *
308
+			 *
309
+			 **/
310
+			/*add_action('updated_option_place_prefix','update_listing_prefix');
311 311
             function update_listing_prefix(){
312 312
                 geodir_register_defaults();
313 313
             }*/
314 314
 
315
-            if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings'))
316
-                $hide_save_button = "style='display:none;'";
317
-            else
318
-                $hide_save_button = '';
315
+			if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings'))
316
+				$hide_save_button = "style='display:none;'";
317
+			else
318
+				$hide_save_button = '';
319 319
 
320
-            /**
321
-             * Filter weather the default save button in the GD admin settings pages should be shown.
322
-             *
323
-             * @since 1.0.0
324
-             * @param string $hide_save_button The style element, either blank or: style='display:none;'.
325
-             */
326
-            $hide_save_button = apply_filters('geodir_hide_save_button', $hide_save_button);
327
-            ?>
320
+			/**
321
+			 * Filter weather the default save button in the GD admin settings pages should be shown.
322
+			 *
323
+			 * @since 1.0.0
324
+			 * @param string $hide_save_button The style element, either blank or: style='display:none;'.
325
+			 */
326
+			$hide_save_button = apply_filters('geodir_hide_save_button', $hide_save_button);
327
+			?>
328 328
 
329 329
             <p class="submit">
330 330
             <input <?php echo $hide_save_button;?> name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" />
@@ -334,36 +334,36 @@  discard block
 block discarded – undo
334 334
             </div>
335 335
             
336 336
 		<?php break;
337
-        case 'design_settings' :
338
-            geodir_admin_fields($geodir_settings['design_settings']);
337
+		case 'design_settings' :
338
+			geodir_admin_fields($geodir_settings['design_settings']);
339 339
 
340 340
 
341 341
 
342
-            ?>
342
+			?>
343 343
 			<p class="submit">
344 344
 			<input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" />
345 345
 			<input type="hidden" name="subtab" id="last_tab" />
346 346
 			</p>
347 347
 			</div>
348 348
         <?php break;
349
-        case 'permalink_settings' :
350
-            geodir_admin_fields($geodir_settings['permalink_settings']); ?>
349
+		case 'permalink_settings' :
350
+			geodir_admin_fields($geodir_settings['permalink_settings']); ?>
351 351
             <p class="submit">
352 352
             <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" />
353 353
             <input type="hidden" name="subtab" id="last_tab" />
354 354
             </p>
355 355
             </div>	
356 356
 		<?php break;
357
-        case 'title_meta_settings' :
358
-            geodir_admin_fields($geodir_settings['title_meta_settings']); ?>
357
+		case 'title_meta_settings' :
358
+			geodir_admin_fields($geodir_settings['title_meta_settings']); ?>
359 359
             <p class="submit">
360 360
             <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" />
361 361
             <input type="hidden" name="subtab" id="last_tab" />
362 362
             </p>
363 363
             </div>
364 364
 		<?php break;
365
-        case 'notifications_settings' :
366
-            geodir_admin_fields($geodir_settings['notifications_settings']); ?>
365
+		case 'notifications_settings' :
366
+			geodir_admin_fields($geodir_settings['notifications_settings']); ?>
367 367
 			
368 368
 			<p class="submit">
369 369
 				
@@ -373,36 +373,36 @@  discard block
 block discarded – undo
373 373
 			</div>
374 374
 			
375 375
 		<?php break;
376
-        case 'default_location_settings' :
377
-            ?>
376
+		case 'default_location_settings' :
377
+			?>
378 378
             <div class="inner_content_tab_main">
379 379
                 <div class="gd-content-heading">
380 380
                     <?php global $wpdb;
381 381
 
382 382
 
383
-                    $location_result = geodir_get_default_location();
383
+					$location_result = geodir_get_default_location();
384 384
 
385
-                    $prefix = '';
385
+					$prefix = '';
386 386
 
387 387
 
388
-                    $lat = isset($location_result->city_latitude) ? $location_result->city_latitude : '';
389
-                    $lng = isset($location_result->city_longitude) ? $location_result->city_longitude : '';
390
-                    $city = isset($location_result->city) ? $location_result->city : '';
391
-                    $region = isset($location_result->region) ? $location_result->region : '';
392
-                    $country = isset($location_result->country) ? $location_result->country : '';
388
+					$lat = isset($location_result->city_latitude) ? $location_result->city_latitude : '';
389
+					$lng = isset($location_result->city_longitude) ? $location_result->city_longitude : '';
390
+					$city = isset($location_result->city) ? $location_result->city : '';
391
+					$region = isset($location_result->region) ? $location_result->region : '';
392
+					$country = isset($location_result->country) ? $location_result->country : '';
393 393
 
394 394
 
395
-                    $map_title = __("Set Address On Map", 'geodirectory');
395
+					$map_title = __("Set Address On Map", 'geodirectory');
396 396
 
397
-                    ?>
397
+					?>
398 398
 
399 399
                     <h3><?php _e('Set Default Location', 'geodirectory');?></h3>
400 400
 
401 401
                     <input type="hidden" name="add_location" value="location">
402 402
 
403 403
                     <input type="hidden" name="update_city" value="<?php if (isset($location_result->location_id)) {
404
-                        echo $location_result->location_id;
405
-                    } ?>">
404
+						echo $location_result->location_id;
405
+					} ?>">
406 406
 
407 407
                     <input type="hidden" name="address" id="<?php echo $prefix;?>address" value="">
408 408
 
@@ -415,8 +415,8 @@  discard block
 block discarded – undo
415 415
                                     <input class="require" type="text" size="80" style="width:440px"
416 416
                                            id="<?php echo $prefix;?>city" name="city"
417 417
                                            value="<?php if (isset($location_result->city)) {
418
-                                               echo $location_result->city;
419
-                                           } ?>"/>
418
+											   echo $location_result->city;
419
+										   } ?>"/>
420 420
 
421 421
                                     <div
422 422
                                         class="gd-location_message_error"> <?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -431,8 +431,8 @@  discard block
 block discarded – undo
431 431
                                     <input class="require" type="text" size="80" style="width:440px"
432 432
                                            id="<?php echo $prefix;?>region" name="region"
433 433
                                            value="<?php if (isset($location_result->region)) {
434
-                                               echo $location_result->region;
435
-                                           } ?>"/>
434
+											   echo $location_result->region;
435
+										   } ?>"/>
436 436
 
437 437
                                     <div
438 438
                                         class="gd-location_message_error"> <?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -446,8 +446,8 @@  discard block
 block discarded – undo
446 446
                                 <div class="gtd-formfeild required" style="padding-top:10px;">
447 447
                                     <?php
448 448
 
449
-                                    $country_result = isset($location_result->country) ? $location_result->country : '';
450
-                                    ?>
449
+									$country_result = isset($location_result->country) ? $location_result->country : '';
450
+									?>
451 451
                                     <select id="<?php echo $prefix ?>country" class="chosen_select"
452 452
                                             data-location_type="country" name="<?php echo $prefix ?>country"
453 453
                                             data-placeholder="<?php _e('Choose a country.', 'geodirectory');?>"
@@ -470,12 +470,12 @@  discard block
 block discarded – undo
470 470
                                 scope="row"><?php _e('Set Location on Map', 'geodirectory');?></th>
471 471
                             <td class="forminp">
472 472
                                 <?php
473
-                                /**
474
-                                 * Contains add listing page map functions.
475
-                                 *
476
-                                 * @since 1.0.0
477
-                                 */
478
-                                include(geodir_plugin_path() . "/geodirectory-functions/map-functions/map_on_add_listing_page.php");?>
473
+								/**
474
+								 * Contains add listing page map functions.
475
+								 *
476
+								 * @since 1.0.0
477
+								 */
478
+								include(geodir_plugin_path() . "/geodirectory-functions/map-functions/map_on_add_listing_page.php");?>
479 479
                             </td>
480 480
                         </tr>
481 481
                         <tr valign="top" class="single_select_page">
@@ -485,8 +485,8 @@  discard block
 block discarded – undo
485 485
                                     <input type="text" class="require" size="80" style="width:440px"
486 486
                                            id="<?php echo $prefix;?>latitude" name="latitude"
487 487
                                            value="<?php if (isset($location_result->city_latitude)) {
488
-                                               echo $location_result->city_latitude;
489
-                                           } ?>"/>
488
+											   echo $location_result->city_latitude;
489
+										   } ?>"/>
490 490
 
491 491
                                     <div
492 492
                                         class="gd-location_message_error"><?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -502,8 +502,8 @@  discard block
 block discarded – undo
502 502
                                     <input type="text" class="require" size="80" style="width:440px"
503 503
                                            id="<?php echo $prefix;?>longitude" name="longitude"
504 504
                                            value="<?php if (isset($location_result->city_longitude)) {
505
-                                               echo $location_result->city_longitude;
506
-                                           } ?>"/>
505
+											   echo $location_result->city_longitude;
506
+										   } ?>"/>
507 507
 
508 508
                                     <div
509 509
                                         class="gd-location_message_error"><?php _e('This field is required.', 'geodirectory'); ?></div>
@@ -535,22 +535,22 @@  discard block
 block discarded – undo
535 535
                 </div>
536 536
             </div>
537 537
             <?php break;
538
-        case $listing_type . '_fields_settings' :
538
+		case $listing_type . '_fields_settings' :
539 539
 
540
-            geodir_custom_post_type_form();
540
+			geodir_custom_post_type_form();
541 541
 
542
-            break;
543
-        case 'tools_settings' :
544
-            geodir_diagnostic_tools_setting_page();
545
-            break;
546
-        case 'compatibility_settings' :
547
-            geodir_theme_compatibility_setting_page();
548
-            break;		
542
+			break;
543
+		case 'tools_settings' :
544
+			geodir_diagnostic_tools_setting_page();
545
+			break;
546
+		case 'compatibility_settings' :
547
+			geodir_theme_compatibility_setting_page();
548
+			break;		
549 549
 		case 'import_export' :
550
-            geodir_import_export_page();
551
-            break;
550
+			geodir_import_export_page();
551
+			break;
552 552
 
553
-    }// end of switch
553
+	}// end of switch
554 554
 }
555 555
 
556 556
 
@@ -590,170 +590,170 @@  discard block
 block discarded – undo
590 590
 function geodir_update_options_compatibility_settings()
591 591
 {
592 592
 
593
-    global $wpdb;
593
+	global $wpdb;
594 594
 
595 595
 
596
-    $theme_settings = array();
596
+	$theme_settings = array();
597 597
 
598
-    $theme_settings['geodir_wrapper_open_id'] = $_POST['geodir_wrapper_open_id'];
599
-    $theme_settings['geodir_wrapper_open_class'] = $_POST['geodir_wrapper_open_class'];
600
-    $theme_settings['geodir_wrapper_open_replace'] = stripslashes($_POST['geodir_wrapper_open_replace']);
598
+	$theme_settings['geodir_wrapper_open_id'] = $_POST['geodir_wrapper_open_id'];
599
+	$theme_settings['geodir_wrapper_open_class'] = $_POST['geodir_wrapper_open_class'];
600
+	$theme_settings['geodir_wrapper_open_replace'] = stripslashes($_POST['geodir_wrapper_open_replace']);
601 601
 
602
-    $theme_settings['geodir_wrapper_close_replace'] = stripslashes($_POST['geodir_wrapper_close_replace']);
602
+	$theme_settings['geodir_wrapper_close_replace'] = stripslashes($_POST['geodir_wrapper_close_replace']);
603 603
 
604
-    $theme_settings['geodir_wrapper_content_open_id'] = $_POST['geodir_wrapper_content_open_id'];
605
-    $theme_settings['geodir_wrapper_content_open_class'] = $_POST['geodir_wrapper_content_open_class'];
606
-    $theme_settings['geodir_wrapper_content_open_replace'] = stripslashes($_POST['geodir_wrapper_content_open_replace']);
604
+	$theme_settings['geodir_wrapper_content_open_id'] = $_POST['geodir_wrapper_content_open_id'];
605
+	$theme_settings['geodir_wrapper_content_open_class'] = $_POST['geodir_wrapper_content_open_class'];
606
+	$theme_settings['geodir_wrapper_content_open_replace'] = stripslashes($_POST['geodir_wrapper_content_open_replace']);
607 607
 
608
-    $theme_settings['geodir_wrapper_content_close_replace'] = stripslashes($_POST['geodir_wrapper_content_close_replace']);
608
+	$theme_settings['geodir_wrapper_content_close_replace'] = stripslashes($_POST['geodir_wrapper_content_close_replace']);
609 609
 
610
-    $theme_settings['geodir_article_open_id'] = $_POST['geodir_article_open_id'];
611
-    $theme_settings['geodir_article_open_class'] = $_POST['geodir_article_open_class'];
612
-    $theme_settings['geodir_article_open_replace'] = stripslashes($_POST['geodir_article_open_replace']);
610
+	$theme_settings['geodir_article_open_id'] = $_POST['geodir_article_open_id'];
611
+	$theme_settings['geodir_article_open_class'] = $_POST['geodir_article_open_class'];
612
+	$theme_settings['geodir_article_open_replace'] = stripslashes($_POST['geodir_article_open_replace']);
613 613
 
614
-    $theme_settings['geodir_article_close_replace'] = stripslashes($_POST['geodir_article_close_replace']);
614
+	$theme_settings['geodir_article_close_replace'] = stripslashes($_POST['geodir_article_close_replace']);
615 615
 
616
-    $theme_settings['geodir_sidebar_right_open_id'] = $_POST['geodir_sidebar_right_open_id'];
617
-    $theme_settings['geodir_sidebar_right_open_class'] = $_POST['geodir_sidebar_right_open_class'];
618
-    $theme_settings['geodir_sidebar_right_open_replace'] = stripslashes($_POST['geodir_sidebar_right_open_replace']);
616
+	$theme_settings['geodir_sidebar_right_open_id'] = $_POST['geodir_sidebar_right_open_id'];
617
+	$theme_settings['geodir_sidebar_right_open_class'] = $_POST['geodir_sidebar_right_open_class'];
618
+	$theme_settings['geodir_sidebar_right_open_replace'] = stripslashes($_POST['geodir_sidebar_right_open_replace']);
619 619
 
620
-    $theme_settings['geodir_sidebar_right_close_replace'] = stripslashes($_POST['geodir_sidebar_right_close_replace']);
620
+	$theme_settings['geodir_sidebar_right_close_replace'] = stripslashes($_POST['geodir_sidebar_right_close_replace']);
621 621
 
622
-    $theme_settings['geodir_sidebar_left_open_id'] = $_POST['geodir_sidebar_left_open_id'];
623
-    $theme_settings['geodir_sidebar_left_open_class'] = $_POST['geodir_sidebar_left_open_class'];
624
-    $theme_settings['geodir_sidebar_left_open_replace'] = stripslashes($_POST['geodir_sidebar_left_open_replace']);
622
+	$theme_settings['geodir_sidebar_left_open_id'] = $_POST['geodir_sidebar_left_open_id'];
623
+	$theme_settings['geodir_sidebar_left_open_class'] = $_POST['geodir_sidebar_left_open_class'];
624
+	$theme_settings['geodir_sidebar_left_open_replace'] = stripslashes($_POST['geodir_sidebar_left_open_replace']);
625 625
 
626
-    $theme_settings['geodir_sidebar_left_close_replace'] = stripslashes($_POST['geodir_sidebar_left_close_replace']);
626
+	$theme_settings['geodir_sidebar_left_close_replace'] = stripslashes($_POST['geodir_sidebar_left_close_replace']);
627 627
 
628
-    $theme_settings['geodir_main_content_open_id'] = $_POST['geodir_main_content_open_id'];
629
-    $theme_settings['geodir_main_content_open_class'] = $_POST['geodir_main_content_open_class'];
630
-    $theme_settings['geodir_main_content_open_replace'] = stripslashes($_POST['geodir_main_content_open_replace']);
628
+	$theme_settings['geodir_main_content_open_id'] = $_POST['geodir_main_content_open_id'];
629
+	$theme_settings['geodir_main_content_open_class'] = $_POST['geodir_main_content_open_class'];
630
+	$theme_settings['geodir_main_content_open_replace'] = stripslashes($_POST['geodir_main_content_open_replace']);
631 631
 
632
-    $theme_settings['geodir_main_content_close_replace'] = stripslashes($_POST['geodir_main_content_close_replace']);
632
+	$theme_settings['geodir_main_content_close_replace'] = stripslashes($_POST['geodir_main_content_close_replace']);
633 633
 
634 634
 // Other Actions
635
-    $theme_settings['geodir_top_content_add'] = stripslashes($_POST['geodir_top_content_add']);
636
-    $theme_settings['geodir_before_main_content_add'] = stripslashes($_POST['geodir_before_main_content_add']);
635
+	$theme_settings['geodir_top_content_add'] = stripslashes($_POST['geodir_top_content_add']);
636
+	$theme_settings['geodir_before_main_content_add'] = stripslashes($_POST['geodir_before_main_content_add']);
637 637
 
638 638
 // Filters
639
-    $theme_settings['geodir_full_page_class_filter'] = stripslashes($_POST['geodir_full_page_class_filter']);
640
-    $theme_settings['geodir_before_widget_filter'] = stripslashes($_POST['geodir_before_widget_filter']);
641
-    $theme_settings['geodir_after_widget_filter'] = stripslashes($_POST['geodir_after_widget_filter']);
642
-    $theme_settings['geodir_before_title_filter'] = stripslashes($_POST['geodir_before_title_filter']);
643
-    $theme_settings['geodir_after_title_filter'] = stripslashes($_POST['geodir_after_title_filter']);
644
-    $theme_settings['geodir_menu_li_class_filter'] = stripslashes($_POST['geodir_menu_li_class_filter']);
645
-    $theme_settings['geodir_sub_menu_ul_class_filter'] = stripslashes($_POST['geodir_sub_menu_ul_class_filter']);
646
-    $theme_settings['geodir_sub_menu_li_class_filter'] = stripslashes($_POST['geodir_sub_menu_li_class_filter']);
647
-    $theme_settings['geodir_menu_a_class_filter'] = stripslashes($_POST['geodir_menu_a_class_filter']);
648
-    $theme_settings['geodir_sub_menu_a_class_filter'] = stripslashes($_POST['geodir_sub_menu_a_class_filter']);
639
+	$theme_settings['geodir_full_page_class_filter'] = stripslashes($_POST['geodir_full_page_class_filter']);
640
+	$theme_settings['geodir_before_widget_filter'] = stripslashes($_POST['geodir_before_widget_filter']);
641
+	$theme_settings['geodir_after_widget_filter'] = stripslashes($_POST['geodir_after_widget_filter']);
642
+	$theme_settings['geodir_before_title_filter'] = stripslashes($_POST['geodir_before_title_filter']);
643
+	$theme_settings['geodir_after_title_filter'] = stripslashes($_POST['geodir_after_title_filter']);
644
+	$theme_settings['geodir_menu_li_class_filter'] = stripslashes($_POST['geodir_menu_li_class_filter']);
645
+	$theme_settings['geodir_sub_menu_ul_class_filter'] = stripslashes($_POST['geodir_sub_menu_ul_class_filter']);
646
+	$theme_settings['geodir_sub_menu_li_class_filter'] = stripslashes($_POST['geodir_sub_menu_li_class_filter']);
647
+	$theme_settings['geodir_menu_a_class_filter'] = stripslashes($_POST['geodir_menu_a_class_filter']);
648
+	$theme_settings['geodir_sub_menu_a_class_filter'] = stripslashes($_POST['geodir_sub_menu_a_class_filter']);
649 649
 //location manager filters
650
-    $theme_settings['geodir_location_switcher_menu_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_li_class_filter']);
651
-    $theme_settings['geodir_location_switcher_menu_a_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_a_class_filter']);
652
-    $theme_settings['geodir_location_switcher_menu_sub_ul_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_ul_class_filter']);
653
-    $theme_settings['geodir_location_switcher_menu_sub_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_li_class_filter']);
650
+	$theme_settings['geodir_location_switcher_menu_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_li_class_filter']);
651
+	$theme_settings['geodir_location_switcher_menu_a_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_a_class_filter']);
652
+	$theme_settings['geodir_location_switcher_menu_sub_ul_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_ul_class_filter']);
653
+	$theme_settings['geodir_location_switcher_menu_sub_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_li_class_filter']);
654 654
 
655 655
 
656 656
 // theme required css
657
-    $theme_settings['geodir_theme_compat_css'] = stripslashes($_POST['geodir_theme_compat_css']);
657
+	$theme_settings['geodir_theme_compat_css'] = stripslashes($_POST['geodir_theme_compat_css']);
658 658
 
659 659
 // theme required js
660
-    $theme_settings['geodir_theme_compat_js'] = stripslashes($_POST['geodir_theme_compat_js']);
660
+	$theme_settings['geodir_theme_compat_js'] = stripslashes($_POST['geodir_theme_compat_js']);
661 661
 
662 662
 // theme compat name
663
-    $theme_settings['gd_theme_compat'] = $_POST['gd_theme_compat'];
664
-    if ($theme_settings['gd_theme_compat'] == '') {
665
-        update_option('gd_theme_compat', '');
666
-        update_option('theme_compatibility_setting', '');
667
-        return;
668
-    }
663
+	$theme_settings['gd_theme_compat'] = $_POST['gd_theme_compat'];
664
+	if ($theme_settings['gd_theme_compat'] == '') {
665
+		update_option('gd_theme_compat', '');
666
+		update_option('theme_compatibility_setting', '');
667
+		return;
668
+	}
669 669
 
670 670
 // theme default options
671
-    $theme_settings['geodir_theme_compat_default_options'] = '';
671
+	$theme_settings['geodir_theme_compat_default_options'] = '';
672 672
 
673 673
 
674 674
 //suported theme code
675
-    $theme_settings['geodir_theme_compat_code'] = false;
676
-
677
-    $theme = wp_get_theme();
678
-
679
-    if ($theme->parent()) {
680
-        $theme_name = str_replace(" ", "_", $theme->parent()->get('Name'));
681
-    } else {
682
-        $theme_name = str_replace(" ", "_", $theme->get('Name'));
683
-    }
684
-
685
-    if (in_array($theme_name, array('Avada', 'Enfold', 'X', 'Divi', 'Genesis', 'Jupiter', 'Multi_News'))) {// list of themes that have php files
686
-        $theme_settings['geodir_theme_compat_code'] = $theme_name;
687
-    }
688
-
689
-
690
-    $theme_name = $theme_name . "_custom";
691
-    $theme_arr = get_option('gd_theme_compats');
692
-    update_option('gd_theme_compat', $theme_name);
693
-    /**
694
-     * Called before the theme compatibility settings are saved to the DB.
695
-     *
696
-     * @since 1.4.0
697
-     * @param array $theme_settings {
698
-     *    Attributes of the theme compatibility settings array.
699
-     *
700
-     *    @type string $geodir_wrapper_open_id Geodir wrapper open html id.
701
-     *    @type string $geodir_wrapper_open_class Geodir wrapper open html class.
702
-     *    @type string $geodir_wrapper_open_replace Geodir wrapper open content replace.
703
-     *    @type string $geodir_wrapper_close_replace Geodir wrapper close content replace.
704
-     *    @type string $geodir_wrapper_content_open_id Geodir wrapper content open html id.
705
-     *    @type string $geodir_wrapper_content_open_class Geodir wrapper content open html class.
706
-     *    @type string $geodir_wrapper_content_open_replace Geodir wrapper content open content replace.
707
-     *    @type string $geodir_wrapper_content_close_replace Geodir wrapper content close content replace.
708
-     *    @type string $geodir_article_open_id Geodir article open html id.
709
-     *    @type string $geodir_article_open_class Geodir article open html class.
710
-     *    @type string $geodir_article_open_replace Geodir article open content replace.
711
-     *    @type string $geodir_article_close_replace Geodir article close content replace.
712
-     *    @type string $geodir_sidebar_right_open_id Geodir sidebar right open html id.
713
-     *    @type string $geodir_sidebar_right_open_class Geodir sidebar right open html class.
714
-     *    @type string $geodir_sidebar_right_open_replace Geodir sidebar right open content replace.
715
-     *    @type string $geodir_sidebar_right_close_replace Geodir sidebar right close content replace.
716
-     *    @type string $geodir_sidebar_left_open_id Geodir sidebar left open html id.
717
-     *    @type string $geodir_sidebar_left_open_class Geodir sidebar left open html class.
718
-     *    @type string $geodir_sidebar_left_open_replace Geodir sidebar left open content replace.
719
-     *    @type string $geodir_sidebar_left_close_replace Geodir sidebar left close content replace.
720
-     *    @type string $geodir_main_content_open_id Geodir main content open html id.
721
-     *    @type string $geodir_main_content_open_class Geodir main content open html class.
722
-     *    @type string $geodir_main_content_open_replace Geodir main content open content replace.
723
-     *    @type string $geodir_main_content_close_replace Geodir main content close content replace.
724
-     *    @type string $geodir_top_content_add Geodir top content add.
725
-     *    @type string $geodir_before_main_content_add Geodir before main content add.
726
-     *    @type string $geodir_full_page_class_filter Geodir full page class filter.
727
-     *    @type string $geodir_before_widget_filter Geodir before widget filter.
728
-     *    @type string $geodir_after_widget_filter Geodir after widget filter.
729
-     *    @type string $geodir_before_title_filter Geodir before title filter.
730
-     *    @type string $geodir_after_title_filter Geodir after title filter.
731
-     *    @type string $geodir_menu_li_class_filter Geodir menu li class filter.
732
-     *    @type string $geodir_sub_menu_ul_class_filter Geodir sub menu ul class filter.
733
-     *    @type string $geodir_sub_menu_li_class_filter Geodir sub menu li class filter.
734
-     *    @type string $geodir_menu_a_class_filter Geodir menu a class filter.
735
-     *    @type string $geodir_sub_menu_a_class_filter Geodir sub menu a class filter.
736
-     *    @type string $geodir_location_switcher_menu_li_class_filter Geodir location switcher menu li class filter.
737
-     *    @type string $geodir_location_switcher_menu_a_class_filter Geodir location switcher menu a class filter.
738
-     *    @type string $geodir_location_switcher_menu_sub_ul_class_filter Geodir location switcher menu sub ul class filter.
739
-     *    @type string $geodir_location_switcher_menu_sub_li_class_filter Geodir location switcher menu sub li class filter.
740
-     *    @type string $geodir_theme_compat_css Geodir theme compatibility css.
741
-     *    @type string $geodir_theme_compat_js Geodir theme compatibility js.
742
-     *    @type string $gd_theme_compat Gd theme compatibility.
743
-     *    @type string $geodir_theme_compat_default_options Geodir theme compatibility default options.
744
-     *    @type bool $geodir_theme_compat_code Geodir theme compatibility code Ex: 'Avada.
745
-     *
746
-     * }
747
-     */
748
-    do_action('gd_compat_save_settings', $theme_settings);
675
+	$theme_settings['geodir_theme_compat_code'] = false;
676
+
677
+	$theme = wp_get_theme();
678
+
679
+	if ($theme->parent()) {
680
+		$theme_name = str_replace(" ", "_", $theme->parent()->get('Name'));
681
+	} else {
682
+		$theme_name = str_replace(" ", "_", $theme->get('Name'));
683
+	}
684
+
685
+	if (in_array($theme_name, array('Avada', 'Enfold', 'X', 'Divi', 'Genesis', 'Jupiter', 'Multi_News'))) {// list of themes that have php files
686
+		$theme_settings['geodir_theme_compat_code'] = $theme_name;
687
+	}
688
+
689
+
690
+	$theme_name = $theme_name . "_custom";
691
+	$theme_arr = get_option('gd_theme_compats');
692
+	update_option('gd_theme_compat', $theme_name);
693
+	/**
694
+	 * Called before the theme compatibility settings are saved to the DB.
695
+	 *
696
+	 * @since 1.4.0
697
+	 * @param array $theme_settings {
698
+	 *    Attributes of the theme compatibility settings array.
699
+	 *
700
+	 *    @type string $geodir_wrapper_open_id Geodir wrapper open html id.
701
+	 *    @type string $geodir_wrapper_open_class Geodir wrapper open html class.
702
+	 *    @type string $geodir_wrapper_open_replace Geodir wrapper open content replace.
703
+	 *    @type string $geodir_wrapper_close_replace Geodir wrapper close content replace.
704
+	 *    @type string $geodir_wrapper_content_open_id Geodir wrapper content open html id.
705
+	 *    @type string $geodir_wrapper_content_open_class Geodir wrapper content open html class.
706
+	 *    @type string $geodir_wrapper_content_open_replace Geodir wrapper content open content replace.
707
+	 *    @type string $geodir_wrapper_content_close_replace Geodir wrapper content close content replace.
708
+	 *    @type string $geodir_article_open_id Geodir article open html id.
709
+	 *    @type string $geodir_article_open_class Geodir article open html class.
710
+	 *    @type string $geodir_article_open_replace Geodir article open content replace.
711
+	 *    @type string $geodir_article_close_replace Geodir article close content replace.
712
+	 *    @type string $geodir_sidebar_right_open_id Geodir sidebar right open html id.
713
+	 *    @type string $geodir_sidebar_right_open_class Geodir sidebar right open html class.
714
+	 *    @type string $geodir_sidebar_right_open_replace Geodir sidebar right open content replace.
715
+	 *    @type string $geodir_sidebar_right_close_replace Geodir sidebar right close content replace.
716
+	 *    @type string $geodir_sidebar_left_open_id Geodir sidebar left open html id.
717
+	 *    @type string $geodir_sidebar_left_open_class Geodir sidebar left open html class.
718
+	 *    @type string $geodir_sidebar_left_open_replace Geodir sidebar left open content replace.
719
+	 *    @type string $geodir_sidebar_left_close_replace Geodir sidebar left close content replace.
720
+	 *    @type string $geodir_main_content_open_id Geodir main content open html id.
721
+	 *    @type string $geodir_main_content_open_class Geodir main content open html class.
722
+	 *    @type string $geodir_main_content_open_replace Geodir main content open content replace.
723
+	 *    @type string $geodir_main_content_close_replace Geodir main content close content replace.
724
+	 *    @type string $geodir_top_content_add Geodir top content add.
725
+	 *    @type string $geodir_before_main_content_add Geodir before main content add.
726
+	 *    @type string $geodir_full_page_class_filter Geodir full page class filter.
727
+	 *    @type string $geodir_before_widget_filter Geodir before widget filter.
728
+	 *    @type string $geodir_after_widget_filter Geodir after widget filter.
729
+	 *    @type string $geodir_before_title_filter Geodir before title filter.
730
+	 *    @type string $geodir_after_title_filter Geodir after title filter.
731
+	 *    @type string $geodir_menu_li_class_filter Geodir menu li class filter.
732
+	 *    @type string $geodir_sub_menu_ul_class_filter Geodir sub menu ul class filter.
733
+	 *    @type string $geodir_sub_menu_li_class_filter Geodir sub menu li class filter.
734
+	 *    @type string $geodir_menu_a_class_filter Geodir menu a class filter.
735
+	 *    @type string $geodir_sub_menu_a_class_filter Geodir sub menu a class filter.
736
+	 *    @type string $geodir_location_switcher_menu_li_class_filter Geodir location switcher menu li class filter.
737
+	 *    @type string $geodir_location_switcher_menu_a_class_filter Geodir location switcher menu a class filter.
738
+	 *    @type string $geodir_location_switcher_menu_sub_ul_class_filter Geodir location switcher menu sub ul class filter.
739
+	 *    @type string $geodir_location_switcher_menu_sub_li_class_filter Geodir location switcher menu sub li class filter.
740
+	 *    @type string $geodir_theme_compat_css Geodir theme compatibility css.
741
+	 *    @type string $geodir_theme_compat_js Geodir theme compatibility js.
742
+	 *    @type string $gd_theme_compat Gd theme compatibility.
743
+	 *    @type string $geodir_theme_compat_default_options Geodir theme compatibility default options.
744
+	 *    @type bool $geodir_theme_compat_code Geodir theme compatibility code Ex: 'Avada.
745
+	 *
746
+	 * }
747
+	 */
748
+	do_action('gd_compat_save_settings', $theme_settings);
749 749
 
750 750
 //if($_POST['gd_theme_compat'])==
751
-    $theme_arr[$theme_name] = $theme_settings;
752
-    update_option('gd_theme_compats', $theme_arr);
751
+	$theme_arr[$theme_name] = $theme_settings;
752
+	update_option('gd_theme_compats', $theme_arr);
753 753
 
754 754
 
755 755
 //print_r($theme_settings);exit;
756
-    update_option('theme_compatibility_setting', $theme_settings);
756
+	update_option('theme_compatibility_setting', $theme_settings);
757 757
 
758 758
 }
759 759
 
@@ -766,12 +766,12 @@  discard block
 block discarded – undo
766 766
  */
767 767
 function geodir_theme_compatibility_setting_page()
768 768
 {
769
-    global $wpdb;
770
-    $tc = get_option('theme_compatibility_setting');
771
-    //print_r($tc);
772
-    //print_r(wp_get_theme());
769
+	global $wpdb;
770
+	$tc = get_option('theme_compatibility_setting');
771
+	//print_r($tc);
772
+	//print_r(wp_get_theme());
773 773
 
774
-    ?>
774
+	?>
775 775
     <div class="inner_content_tab_main">
776 776
         <div class="gd-content-heading">
777 777
 
@@ -813,21 +813,21 @@  discard block
 block discarded – undo
813 813
                 <option value=""><?php _e('Select Theme', 'geodirectory');?></option>
814 814
                 <option value="custom"><?php _e('Custom', 'geodirectory');?></option>
815 815
                 <?php
816
-                $theme_arr = get_option('gd_theme_compats');
817
-                $theme_active = get_option('gd_theme_compat');
818
-                if (is_array($theme_arr)) {
819
-                    foreach ($theme_arr as $key => $theme) {
820
-                        $sel = '';
821
-                        if ($theme_active == $key) {
822
-                            $sel = "selected";
823
-                        }
824
-                        echo "<option $sel>$key</option>";
825
-                    }
816
+				$theme_arr = get_option('gd_theme_compats');
817
+				$theme_active = get_option('gd_theme_compat');
818
+				if (is_array($theme_arr)) {
819
+					foreach ($theme_arr as $key => $theme) {
820
+						$sel = '';
821
+						if ($theme_active == $key) {
822
+							$sel = "selected";
823
+						}
824
+						echo "<option $sel>$key</option>";
825
+					}
826 826
 
827 827
 
828
-                }
828
+				}
829 829
 
830
-                ?>
830
+				?>
831 831
             </select>
832 832
             <button onclick="gd_comp_export();" type="button"
833 833
                     class="button-primary"><?php _e('Export', 'geodirectory');?></button>
@@ -936,11 +936,11 @@  discard block
 block discarded – undo
936 936
                         <small>geodir_wrapper_open</small>
937 937
                     </td>
938 938
                     <td><input value="<?php if (isset($tc['geodir_wrapper_open_id'])) {
939
-                            echo $tc['geodir_wrapper_open_id'];
940
-                        }?>" type="text" name="geodir_wrapper_open_id" placeholder="geodir-wrapper"/></td>
939
+							echo $tc['geodir_wrapper_open_id'];
940
+						}?>" type="text" name="geodir_wrapper_open_id" placeholder="geodir-wrapper"/></td>
941 941
                     <td><input value="<?php if (isset($tc['geodir_wrapper_open_class'])) {
942
-                            echo $tc['geodir_wrapper_open_class'];
943
-                        }?>" type="text" name="geodir_wrapper_open_class" placeholder=""/></td>
942
+							echo $tc['geodir_wrapper_open_class'];
943
+						}?>" type="text" name="geodir_wrapper_open_class" placeholder=""/></td>
944 944
                 </tr>
945 945
 
946 946
                 <tr class="gd-theme-comp-out">
@@ -948,8 +948,8 @@  discard block
 block discarded – undo
948 948
                         <span><?php _e('Output:', 'geodirectory');?></span>
949 949
                         <textarea name="geodir_wrapper_open_replace"
950 950
                                   placeholder='<div id="[id]" class="[class]">'><?php if (isset($tc['geodir_wrapper_open_replace'])) {
951
-                                echo $tc['geodir_wrapper_open_replace'];
952
-                            }?></textarea>
951
+								echo $tc['geodir_wrapper_open_replace'];
952
+							}?></textarea>
953 953
                     </td>
954 954
                 </tr>
955 955
 
@@ -969,8 +969,8 @@  discard block
 block discarded – undo
969 969
                         <span><?php _e('Output:', 'geodirectory');?></span>
970 970
                         <textarea name="geodir_wrapper_close_replace"
971 971
                                   placeholder='</div><!-- wrapper ends here-->'><?php if (isset($tc['geodir_wrapper_close_replace'])) {
972
-                                echo $tc['geodir_wrapper_close_replace'];
973
-                            }?></textarea>
972
+								echo $tc['geodir_wrapper_close_replace'];
973
+							}?></textarea>
974 974
                     </td>
975 975
                 </tr>
976 976
 
@@ -980,12 +980,12 @@  discard block
 block discarded – undo
980 980
                         <small>geodir_wrapper_content_open</small>
981 981
                     </td>
982 982
                     <td><input value="<?php if (isset($tc['geodir_wrapper_content_open_id'])) {
983
-                            echo $tc['geodir_wrapper_content_open_id'];
984
-                        }?>" type="text" name="geodir_wrapper_content_open_id" placeholder="geodir-wrapper-content"/>
983
+							echo $tc['geodir_wrapper_content_open_id'];
984
+						}?>" type="text" name="geodir_wrapper_content_open_id" placeholder="geodir-wrapper-content"/>
985 985
                     </td>
986 986
                     <td><input value="<?php if (isset($tc['geodir_wrapper_content_open_class'])) {
987
-                            echo $tc['geodir_wrapper_content_open_class'];
988
-                        }?>" type="text" name="geodir_wrapper_content_open_class" placeholder=""/></td>
987
+							echo $tc['geodir_wrapper_content_open_class'];
988
+						}?>" type="text" name="geodir_wrapper_content_open_class" placeholder=""/></td>
989 989
                 </tr>
990 990
 
991 991
                 <tr class="gd-theme-comp-out">
@@ -993,8 +993,8 @@  discard block
 block discarded – undo
993 993
                         <span><?php _e('Output:', 'geodirectory');?></span>
994 994
                         <textarea name="geodir_wrapper_content_open_replace"
995 995
                                   placeholder='<div id="[id]" class="[class]" role="main" [width_css]>'><?php if (isset($tc['geodir_wrapper_content_open_replace'])) {
996
-                                echo $tc['geodir_wrapper_content_open_replace'];
997
-                            }?></textarea>
996
+								echo $tc['geodir_wrapper_content_open_replace'];
997
+							}?></textarea>
998 998
                     </td>
999 999
                 </tr>
1000 1000
 
@@ -1014,8 +1014,8 @@  discard block
 block discarded – undo
1014 1014
                         <span><?php _e('Output:', 'geodirectory');?></span>
1015 1015
                         <textarea name="geodir_wrapper_content_close_replace"
1016 1016
                                   placeholder='</div><!-- content ends here-->'><?php if (isset($tc['geodir_wrapper_content_close_replace'])) {
1017
-                                echo $tc['geodir_wrapper_content_close_replace'];
1018
-                            }?></textarea>
1017
+								echo $tc['geodir_wrapper_content_close_replace'];
1018
+							}?></textarea>
1019 1019
                     </td>
1020 1020
                 </tr>
1021 1021
 
@@ -1024,11 +1024,11 @@  discard block
 block discarded – undo
1024 1024
                         <small>geodir_article_open</small>
1025 1025
                     </td>
1026 1026
                     <td><input value="<?php if (isset($tc['geodir_article_open_id'])) {
1027
-                            echo $tc['geodir_article_open_id'];
1028
-                        }?>" type="text" name="geodir_article_open_id" placeholder="geodir-wrapper-content"/></td>
1027
+							echo $tc['geodir_article_open_id'];
1028
+						}?>" type="text" name="geodir_article_open_id" placeholder="geodir-wrapper-content"/></td>
1029 1029
                     <td><input value="<?php if (isset($tc['geodir_article_open_class'])) {
1030
-                            echo $tc['geodir_article_open_class'];
1031
-                        }?>" type="text" name="geodir_article_open_class" placeholder=""/></td>
1030
+							echo $tc['geodir_article_open_class'];
1031
+						}?>" type="text" name="geodir_article_open_class" placeholder=""/></td>
1032 1032
                 </tr>
1033 1033
 
1034 1034
                 <tr class="gd-theme-comp-out">
@@ -1036,8 +1036,8 @@  discard block
 block discarded – undo
1036 1036
                         <span><?php _e('Output:', 'geodirectory');?></span>
1037 1037
                         <textarea name="geodir_article_open_replace"
1038 1038
                                   placeholder='<article  id="[id]" class="[class]" itemscope itemtype="[itemtype]">'><?php if (isset($tc['geodir_article_open_replace'])) {
1039
-                                echo $tc['geodir_article_open_replace'];
1040
-                            }?></textarea>
1039
+								echo $tc['geodir_article_open_replace'];
1040
+							}?></textarea>
1041 1041
                     </td>
1042 1042
                 </tr>
1043 1043
 
@@ -1056,8 +1056,8 @@  discard block
 block discarded – undo
1056 1056
                         <span><?php _e('Output:', 'geodirectory');?></span>
1057 1057
                         <textarea name="geodir_article_close_replace"
1058 1058
                                   placeholder='</article><!-- article ends here-->'><?php if (isset($tc['geodir_article_close_replace'])) {
1059
-                                echo $tc['geodir_article_close_replace'];
1060
-                            }?></textarea>
1059
+								echo $tc['geodir_article_close_replace'];
1060
+							}?></textarea>
1061 1061
                     </td>
1062 1062
                 </tr>
1063 1063
 
@@ -1066,11 +1066,11 @@  discard block
 block discarded – undo
1066 1066
                         <small>geodir_sidebar_right_open</small>
1067 1067
                     </td>
1068 1068
                     <td><input value="<?php if (isset($tc['geodir_sidebar_right_open_id'])) {
1069
-                            echo $tc['geodir_sidebar_right_open_id'];
1070
-                        }?>" type="text" name="geodir_sidebar_right_open_id" placeholder="geodir-sidebar-right"/></td>
1069
+							echo $tc['geodir_sidebar_right_open_id'];
1070
+						}?>" type="text" name="geodir_sidebar_right_open_id" placeholder="geodir-sidebar-right"/></td>
1071 1071
                     <td><input value="<?php if (isset($tc['geodir_sidebar_right_open_class'])) {
1072
-                            echo $tc['geodir_sidebar_right_open_class'];
1073
-                        }?>" type="text" name="geodir_sidebar_right_open_class"
1072
+							echo $tc['geodir_sidebar_right_open_class'];
1073
+						}?>" type="text" name="geodir_sidebar_right_open_class"
1074 1074
                                placeholder="geodir-sidebar-right geodir-listings-sidebar-right"/></td>
1075 1075
                 </tr>
1076 1076
 
@@ -1079,8 +1079,8 @@  discard block
 block discarded – undo
1079 1079
                         <span><?php _e('Output:', 'geodirectory');?></span>
1080 1080
                         <textarea name="geodir_sidebar_right_open_replace"
1081 1081
                                   placeholder='<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_right_open_replace'])) {
1082
-                                echo $tc['geodir_sidebar_right_open_replace'];
1083
-                            }?></textarea>
1082
+								echo $tc['geodir_sidebar_right_open_replace'];
1083
+							}?></textarea>
1084 1084
                     </td>
1085 1085
                 </tr>
1086 1086
 
@@ -1099,8 +1099,8 @@  discard block
 block discarded – undo
1099 1099
                         <span><?php _e('Output:', 'geodirectory');?></span>
1100 1100
                         <textarea name="geodir_sidebar_right_close_replace"
1101 1101
                                   placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_right_close_replace'])) {
1102
-                                echo $tc['geodir_sidebar_right_close_replace'];
1103
-                            }?></textarea>
1102
+								echo $tc['geodir_sidebar_right_close_replace'];
1103
+							}?></textarea>
1104 1104
                     </td>
1105 1105
                 </tr>
1106 1106
 
@@ -1110,11 +1110,11 @@  discard block
 block discarded – undo
1110 1110
                         <small>geodir_sidebar_left_open</small>
1111 1111
                     </td>
1112 1112
                     <td><input value="<?php if (isset($tc['geodir_sidebar_left_open_id'])) {
1113
-                            echo $tc['geodir_sidebar_left_open_id'];
1114
-                        }?>" type="text" name="geodir_sidebar_left_open_id" placeholder="geodir-sidebar-left"/></td>
1113
+							echo $tc['geodir_sidebar_left_open_id'];
1114
+						}?>" type="text" name="geodir_sidebar_left_open_id" placeholder="geodir-sidebar-left"/></td>
1115 1115
                     <td><input value="<?php if (isset($tc['geodir_sidebar_left_open_class'])) {
1116
-                            echo $tc['geodir_sidebar_left_open_class'];
1117
-                        }?>" type="text" name="geodir_sidebar_left_open_class"
1116
+							echo $tc['geodir_sidebar_left_open_class'];
1117
+						}?>" type="text" name="geodir_sidebar_left_open_class"
1118 1118
                                placeholder="geodir-sidebar-left geodir-listings-sidebar-left"/></td>
1119 1119
                 </tr>
1120 1120
 
@@ -1123,8 +1123,8 @@  discard block
 block discarded – undo
1123 1123
                         <span><?php _e('Output:', 'geodirectory');?></span>
1124 1124
                         <textarea name="geodir_sidebar_left_open_replace"
1125 1125
                                   placeholder='<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_left_open_replace'])) {
1126
-                                echo $tc['geodir_sidebar_left_open_replace'];
1127
-                            }?></textarea>
1126
+								echo $tc['geodir_sidebar_left_open_replace'];
1127
+							}?></textarea>
1128 1128
                     </td>
1129 1129
                 </tr>
1130 1130
 
@@ -1143,8 +1143,8 @@  discard block
 block discarded – undo
1143 1143
                         <span><?php _e('Output:', 'geodirectory');?></span>
1144 1144
                         <textarea name="geodir_sidebar_left_close_replace"
1145 1145
                                   placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_left_close_replace'])) {
1146
-                                echo $tc['geodir_sidebar_left_close_replace'];
1147
-                            }?></textarea>
1146
+								echo $tc['geodir_sidebar_left_close_replace'];
1147
+							}?></textarea>
1148 1148
                     </td>
1149 1149
                 </tr>
1150 1150
 
@@ -1153,11 +1153,11 @@  discard block
 block discarded – undo
1153 1153
                         <small>geodir_main_content_open</small>
1154 1154
                     </td>
1155 1155
                     <td><input value="<?php if (isset($tc['geodir_main_content_open_id'])) {
1156
-                            echo $tc['geodir_main_content_open_id'];
1157
-                        }?>" type="text" name="geodir_main_content_open_id" placeholder="geodir-main-content"/></td>
1156
+							echo $tc['geodir_main_content_open_id'];
1157
+						}?>" type="text" name="geodir_main_content_open_id" placeholder="geodir-main-content"/></td>
1158 1158
                     <td><input value="<?php if (isset($tc['geodir_main_content_open_class'])) {
1159
-                            echo $tc['geodir_main_content_open_class'];
1160
-                        }?>" type="text" name="geodir_main_content_open_class" placeholder="CURRENT-PAGE-page"/></td>
1159
+							echo $tc['geodir_main_content_open_class'];
1160
+						}?>" type="text" name="geodir_main_content_open_class" placeholder="CURRENT-PAGE-page"/></td>
1161 1161
                 </tr>
1162 1162
 
1163 1163
                 <tr class="gd-theme-comp-out">
@@ -1165,8 +1165,8 @@  discard block
 block discarded – undo
1165 1165
                         <span><?php _e('Output:', 'geodirectory');?></span>
1166 1166
                         <textarea name="geodir_main_content_open_replace"
1167 1167
                                   placeholder='<main  id="[id]" class="[class]"  role="main">'><?php if (isset($tc['geodir_main_content_open_replace'])) {
1168
-                                echo $tc['geodir_main_content_open_replace'];
1169
-                            }?></textarea>
1168
+								echo $tc['geodir_main_content_open_replace'];
1169
+							}?></textarea>
1170 1170
                     </td>
1171 1171
                 </tr>
1172 1172
 
@@ -1185,8 +1185,8 @@  discard block
 block discarded – undo
1185 1185
                         <span><?php _e('Output:', 'geodirectory');?></span>
1186 1186
                         <textarea name="geodir_main_content_close_replace"
1187 1187
                                   placeholder='</main><!-- main ends here-->'><?php if (isset($tc['geodir_main_content_close_replace'])) {
1188
-                                echo $tc['geodir_main_content_close_replace'];
1189
-                            }?></textarea>
1188
+								echo $tc['geodir_main_content_close_replace'];
1189
+							}?></textarea>
1190 1190
                     </td>
1191 1191
                 </tr>
1192 1192
 
@@ -1210,8 +1210,8 @@  discard block
 block discarded – undo
1210 1210
                     </td>
1211 1211
                     <td><textarea name="geodir_top_content_add"
1212 1212
                                   placeholder=''><?php if (isset($tc['geodir_top_content_add'])) {
1213
-                                echo $tc['geodir_top_content_add'];
1214
-                            }?></textarea></td>
1213
+								echo $tc['geodir_top_content_add'];
1214
+							}?></textarea></td>
1215 1215
                 </tr>
1216 1216
 
1217 1217
                 <tr>
@@ -1220,8 +1220,8 @@  discard block
 block discarded – undo
1220 1220
                     </td>
1221 1221
                     <td><textarea name="geodir_before_main_content_add"
1222 1222
                                   placeholder=''><?php if (isset($tc['geodir_before_main_content_add'])) {
1223
-                                echo $tc['geodir_before_main_content_add'];
1224
-                            }?></textarea></td>
1223
+								echo $tc['geodir_before_main_content_add'];
1224
+							}?></textarea></td>
1225 1225
                 </tr>
1226 1226
 
1227 1227
 
@@ -1244,8 +1244,8 @@  discard block
 block discarded – undo
1244 1244
                     </td>
1245 1245
                     <td><textarea name="geodir_full_page_class_filter"
1246 1246
                                   placeholder='geodir_full_page clearfix'><?php if (isset($tc['geodir_full_page_class_filter'])) {
1247
-                                echo $tc['geodir_full_page_class_filter'];
1248
-                            }?></textarea></td>
1247
+								echo $tc['geodir_full_page_class_filter'];
1248
+							}?></textarea></td>
1249 1249
                 </tr>
1250 1250
 
1251 1251
                 <tr>
@@ -1254,8 +1254,8 @@  discard block
 block discarded – undo
1254 1254
                     </td>
1255 1255
                     <td><textarea name="geodir_before_widget_filter"
1256 1256
                                   placeholder='<section id="%1$s" class="widget geodir-widget %2$s">'><?php if (isset($tc['geodir_before_widget_filter'])) {
1257
-                                echo $tc['geodir_before_widget_filter'];
1258
-                            }?></textarea></td>
1257
+								echo $tc['geodir_before_widget_filter'];
1258
+							}?></textarea></td>
1259 1259
                 </tr>
1260 1260
 
1261 1261
                 <tr>
@@ -1264,8 +1264,8 @@  discard block
 block discarded – undo
1264 1264
                     </td>
1265 1265
                     <td><textarea name="geodir_after_widget_filter"
1266 1266
                                   placeholder='</section>'><?php if (isset($tc['geodir_after_widget_filter'])) {
1267
-                                echo $tc['geodir_after_widget_filter'];
1268
-                            }?></textarea></td>
1267
+								echo $tc['geodir_after_widget_filter'];
1268
+							}?></textarea></td>
1269 1269
                 </tr>
1270 1270
 
1271 1271
                 <tr>
@@ -1274,8 +1274,8 @@  discard block
 block discarded – undo
1274 1274
                     </td>
1275 1275
                     <td><textarea name="geodir_before_title_filter"
1276 1276
                                   placeholder='<h3 class="widget-title">'><?php if (isset($tc['geodir_before_title_filter'])) {
1277
-                                echo $tc['geodir_before_title_filter'];
1278
-                            }?></textarea></td>
1277
+								echo $tc['geodir_before_title_filter'];
1278
+							}?></textarea></td>
1279 1279
                 </tr>
1280 1280
 
1281 1281
                 <tr>
@@ -1284,8 +1284,8 @@  discard block
 block discarded – undo
1284 1284
                     </td>
1285 1285
                     <td><textarea name="geodir_after_title_filter"
1286 1286
                                   placeholder='</h3>'><?php if (isset($tc['geodir_after_title_filter'])) {
1287
-                                echo $tc['geodir_after_title_filter'];
1288
-                            }?></textarea></td>
1287
+								echo $tc['geodir_after_title_filter'];
1288
+							}?></textarea></td>
1289 1289
                 </tr>
1290 1290
 
1291 1291
                 <tr>
@@ -1294,8 +1294,8 @@  discard block
 block discarded – undo
1294 1294
                     </td>
1295 1295
                     <td><textarea name="geodir_menu_li_class_filter"
1296 1296
                                   placeholder='menu-item'><?php if (isset($tc['geodir_menu_li_class_filter'])) {
1297
-                                echo $tc['geodir_menu_li_class_filter'];
1298
-                            }?></textarea></td>
1297
+								echo $tc['geodir_menu_li_class_filter'];
1298
+							}?></textarea></td>
1299 1299
                 </tr>
1300 1300
 
1301 1301
                 <tr>
@@ -1304,8 +1304,8 @@  discard block
 block discarded – undo
1304 1304
                     </td>
1305 1305
                     <td><textarea name="geodir_sub_menu_ul_class_filter"
1306 1306
                                   placeholder='sub-menu'><?php if (isset($tc['geodir_sub_menu_ul_class_filter'])) {
1307
-                                echo $tc['geodir_sub_menu_ul_class_filter'];
1308
-                            }?></textarea></td>
1307
+								echo $tc['geodir_sub_menu_ul_class_filter'];
1308
+							}?></textarea></td>
1309 1309
                 </tr>
1310 1310
 
1311 1311
                 <tr>
@@ -1314,8 +1314,8 @@  discard block
 block discarded – undo
1314 1314
                     </td>
1315 1315
                     <td><textarea name="geodir_sub_menu_li_class_filter"
1316 1316
                                   placeholder='menu-item'><?php if (isset($tc['geodir_sub_menu_li_class_filter'])) {
1317
-                                echo $tc['geodir_sub_menu_li_class_filter'];
1318
-                            }?></textarea></td>
1317
+								echo $tc['geodir_sub_menu_li_class_filter'];
1318
+							}?></textarea></td>
1319 1319
                 </tr>
1320 1320
 
1321 1321
                 <tr>
@@ -1324,8 +1324,8 @@  discard block
 block discarded – undo
1324 1324
                     </td>
1325 1325
                     <td><textarea name="geodir_menu_a_class_filter"
1326 1326
                                   placeholder=''><?php if (isset($tc['geodir_menu_a_class_filter'])) {
1327
-                                echo $tc['geodir_menu_a_class_filter'];
1328
-                            }?></textarea></td>
1327
+								echo $tc['geodir_menu_a_class_filter'];
1328
+							}?></textarea></td>
1329 1329
                 </tr>
1330 1330
 
1331 1331
                 <tr>
@@ -1334,8 +1334,8 @@  discard block
 block discarded – undo
1334 1334
                     </td>
1335 1335
                     <td><textarea name="geodir_sub_menu_a_class_filter"
1336 1336
                                   placeholder=''><?php if (isset($tc['geodir_sub_menu_a_class_filter'])) {
1337
-                                echo $tc['geodir_sub_menu_a_class_filter'];
1338
-                            }?></textarea></td>
1337
+								echo $tc['geodir_sub_menu_a_class_filter'];
1338
+							}?></textarea></td>
1339 1339
                 </tr>
1340 1340
 
1341 1341
 
@@ -1345,8 +1345,8 @@  discard block
 block discarded – undo
1345 1345
                     </td>
1346 1346
                     <td><textarea name="geodir_location_switcher_menu_li_class_filter"
1347 1347
                                   placeholder='menu-item menu-item-type-social menu-item-type-social gd-location-switcher'><?php if (isset($tc['geodir_location_switcher_menu_li_class_filter'])) {
1348
-                                echo $tc['geodir_location_switcher_menu_li_class_filter'];
1349
-                            }?></textarea></td>
1348
+								echo $tc['geodir_location_switcher_menu_li_class_filter'];
1349
+							}?></textarea></td>
1350 1350
                 </tr>
1351 1351
 
1352 1352
                 <tr>
@@ -1355,8 +1355,8 @@  discard block
 block discarded – undo
1355 1355
                     </td>
1356 1356
                     <td><textarea name="geodir_location_switcher_menu_a_class_filter"
1357 1357
                                   placeholder=''><?php if (isset($tc['geodir_location_switcher_menu_a_class_filter'])) {
1358
-                                echo $tc['geodir_location_switcher_menu_a_class_filter'];
1359
-                            }?></textarea></td>
1358
+								echo $tc['geodir_location_switcher_menu_a_class_filter'];
1359
+							}?></textarea></td>
1360 1360
                 </tr>
1361 1361
 
1362 1362
                 <tr>
@@ -1365,8 +1365,8 @@  discard block
 block discarded – undo
1365 1365
                     </td>
1366 1366
                     <td><textarea name="geodir_location_switcher_menu_sub_ul_class_filter"
1367 1367
                                   placeholder='sub-menu'><?php if (isset($tc['geodir_location_switcher_menu_sub_ul_class_filter'])) {
1368
-                                echo $tc['geodir_location_switcher_menu_sub_ul_class_filter'];
1369
-                            }?></textarea></td>
1368
+								echo $tc['geodir_location_switcher_menu_sub_ul_class_filter'];
1369
+							}?></textarea></td>
1370 1370
                 </tr>
1371 1371
 
1372 1372
                 <tr>
@@ -1375,21 +1375,21 @@  discard block
 block discarded – undo
1375 1375
                     </td>
1376 1376
                     <td><textarea name="geodir_location_switcher_menu_sub_li_class_filter"
1377 1377
                                   placeholder='menu-item gd-location-switcher-menu-item'><?php if (isset($tc['geodir_location_switcher_menu_sub_li_class_filter'])) {
1378
-                                echo $tc['geodir_location_switcher_menu_sub_li_class_filter'];
1379
-                            }?></textarea></td>
1378
+								echo $tc['geodir_location_switcher_menu_sub_li_class_filter'];
1379
+							}?></textarea></td>
1380 1380
                 </tr>
1381 1381
 
1382 1382
 
1383 1383
 
1384 1384
                 <?php
1385
-                /**
1386
-                 * Allows more filter setting to be added to theme compatibility settings page.
1387
-                 *
1388
-                 * Called after the last setting in "Other filters" section of theme compatibility settings.
1389
-                 *
1390
-                 * @since 1.4.0
1391
-                 */
1392
-                do_action('gd_compat_other_filters');?>
1385
+				/**
1386
+				 * Allows more filter setting to be added to theme compatibility settings page.
1387
+				 *
1388
+				 * Called after the last setting in "Other filters" section of theme compatibility settings.
1389
+				 *
1390
+				 * @since 1.4.0
1391
+				 */
1392
+				do_action('gd_compat_other_filters');?>
1393 1393
 
1394 1394
                 </tbody>
1395 1395
             </table>
@@ -1402,8 +1402,8 @@  discard block
 block discarded – undo
1402 1402
                 <tr>
1403 1403
                     <td><textarea name="geodir_theme_compat_css"
1404 1404
                                   placeholder=''><?php if (isset($tc['geodir_theme_compat_css'])) {
1405
-                                echo $tc['geodir_theme_compat_css'];
1406
-                            }?></textarea></td>
1405
+								echo $tc['geodir_theme_compat_css'];
1406
+							}?></textarea></td>
1407 1407
                 </tr>
1408 1408
 
1409 1409
 
@@ -1417,8 +1417,8 @@  discard block
 block discarded – undo
1417 1417
                 <tr>
1418 1418
                     <td><textarea name="geodir_theme_compat_js"
1419 1419
                                   placeholder=''><?php if (isset($tc['geodir_theme_compat_js'])) {
1420
-                                echo $tc['geodir_theme_compat_js'];
1421
-                            }?></textarea></td>
1420
+								echo $tc['geodir_theme_compat_js'];
1421
+							}?></textarea></td>
1422 1422
                 </tr>
1423 1423
 
1424 1424
 
@@ -1445,23 +1445,23 @@  discard block
 block discarded – undo
1445 1445
  */
1446 1446
 function geodir_custom_post_type_form()
1447 1447
 {
1448
-    $listing_type = ($_REQUEST['listing_type'] != '') ? $_REQUEST['listing_type'] : 'gd_place';
1448
+	$listing_type = ($_REQUEST['listing_type'] != '') ? $_REQUEST['listing_type'] : 'gd_place';
1449 1449
 
1450
-    $sub_tab = ($_REQUEST['subtab'] != '') ? $_REQUEST['subtab'] : '';
1450
+	$sub_tab = ($_REQUEST['subtab'] != '') ? $_REQUEST['subtab'] : '';
1451 1451
 
1452 1452
 
1453
-    ?>
1453
+	?>
1454 1454
 
1455 1455
     <div class="gd-content-heading">
1456 1456
         <?php
1457
-        /**
1458
-         * Filter custom fields panel heading.
1459
-         *
1460
-         * @since 1.0.0
1461
-         * @param string $sub_tab Sub tab name.
1462
-         * @param string $listing_type Post type.
1463
-         */
1464
-        ?>
1457
+		/**
1458
+		 * Filter custom fields panel heading.
1459
+		 *
1460
+		 * @since 1.0.0
1461
+		 * @param string $sub_tab Sub tab name.
1462
+		 * @param string $listing_type Post type.
1463
+		 */
1464
+		?>
1465 1465
         <h3><?php echo apply_filters('geodir_custom_fields_panel_head', '', $sub_tab, $listing_type);?></h3>
1466 1466
     </div>
1467 1467
     <div id="container_general" class="clearfix">
@@ -1469,25 +1469,25 @@  discard block
 block discarded – undo
1469 1469
 
1470 1470
             <div class="side-sortables" id="geodir-available-fields">
1471 1471
                 <?php
1472
-                /**
1473
-                 * Filter custom field available fields heading.
1474
-                 *
1475
-                 * @since 1.0.0
1476
-                 * @param string $sub_tab Sub tab name.
1477
-                 * @param string $listing_type Post type.
1478
-                 */
1479
-                ?>
1472
+				/**
1473
+				 * Filter custom field available fields heading.
1474
+				 *
1475
+				 * @since 1.0.0
1476
+				 * @param string $sub_tab Sub tab name.
1477
+				 * @param string $listing_type Post type.
1478
+				 */
1479
+				?>
1480 1480
                 <h3 class="hndle"><span><?php echo apply_filters('geodir_cf_panel_available_fields_head', '', $sub_tab, $listing_type);?>
1481 1481
 							</span></h3>
1482 1482
                 <?php
1483
-                /**
1484
-                 * Filter custom field available fields note text.
1485
-                 *
1486
-                 * @since 1.0.0
1487
-                 * @param string $sub_tab Sub tab name.
1488
-                 * @param string $listing_type Post type.
1489
-                 */
1490
-                ?>
1483
+				/**
1484
+				 * Filter custom field available fields note text.
1485
+				 *
1486
+				 * @since 1.0.0
1487
+				 * @param string $sub_tab Sub tab name.
1488
+				 * @param string $listing_type Post type.
1489
+				 */
1490
+				?>
1491 1491
                 <p><?php echo apply_filters('geodir_cf_panel_available_fields_note', '', $sub_tab, $listing_type);?></p>
1492 1492
 
1493 1493
                 <div class="inside">
@@ -1495,13 +1495,13 @@  discard block
 block discarded – undo
1495 1495
                     <div id="gt-form-builder-tab" class="gt-tabs-panel">
1496 1496
 
1497 1497
                         <?php
1498
-                        /**
1499
-                         * Adds the available fields to the custom fields settings page per post type.
1500
-                         *
1501
-                         * @since 1.0.0
1502
-                         * @param string $sub_tab The current settings tab name.
1503
-                         */
1504
-                        do_action('geodir_manage_available_fields', $sub_tab); ?>
1498
+						/**
1499
+						 * Adds the available fields to the custom fields settings page per post type.
1500
+						 *
1501
+						 * @since 1.0.0
1502
+						 * @param string $sub_tab The current settings tab name.
1503
+						 */
1504
+						do_action('geodir_manage_available_fields', $sub_tab); ?>
1505 1505
 
1506 1506
                         <div style="clear:both"></div>
1507 1507
                     </div>
@@ -1514,25 +1514,25 @@  discard block
 block discarded – undo
1514 1514
             <div class="side-sortables" id="geodir-selected-fields">
1515 1515
                 <h3 class="hndle">
1516 1516
                     <?php
1517
-                    /**
1518
-                     * Filter custom field selected fields heading.
1519
-                     *
1520
-                     * @since 1.0.0
1521
-                     * @param string $sub_tab Sub tab name.
1522
-                     * @param string $listing_type Post type.
1523
-                     */
1524
-                    ?>
1517
+					/**
1518
+					 * Filter custom field selected fields heading.
1519
+					 *
1520
+					 * @since 1.0.0
1521
+					 * @param string $sub_tab Sub tab name.
1522
+					 * @param string $listing_type Post type.
1523
+					 */
1524
+					?>
1525 1525
                     <span><?php echo apply_filters('geodir_cf_panel_selected_fields_head', '', $sub_tab, $listing_type);?></span>
1526 1526
                 </h3>
1527 1527
                 <?php
1528
-                /**
1529
-                 * Filter custom field selected fields note text.
1530
-                 *
1531
-                 * @since 1.0.0
1532
-                 * @param string $sub_tab Sub tab name.
1533
-                 * @param string $listing_type Post type.
1534
-                 */
1535
-                ?>
1528
+				/**
1529
+				 * Filter custom field selected fields note text.
1530
+				 *
1531
+				 * @since 1.0.0
1532
+				 * @param string $sub_tab Sub tab name.
1533
+				 * @param string $listing_type Post type.
1534
+				 */
1535
+				?>
1536 1536
                 <p><?php echo apply_filters('geodir_cf_panel_selected_fields_note', '', $sub_tab, $listing_type);?></p>
1537 1537
 
1538 1538
                 <div class="inside">
@@ -1540,13 +1540,13 @@  discard block
 block discarded – undo
1540 1540
                     <div id="gt-form-builder-tab" class="gt-tabs-panel">
1541 1541
                         <div class="field_row_main">
1542 1542
                             <?php
1543
-                            /**
1544
-                             * Adds the selected fields and setting to the custom fields settings page per post type.
1545
-                             *
1546
-                             * @since 1.0.0
1547
-                             * @param string $sub_tab The current settings tab name.
1548
-                             */
1549
-                            do_action('geodir_manage_selected_fields', $sub_tab); ?>
1543
+							/**
1544
+							 * Adds the selected fields and setting to the custom fields settings page per post type.
1545
+							 *
1546
+							 * @since 1.0.0
1547
+							 * @param string $sub_tab The current settings tab name.
1548
+							 */
1549
+							do_action('geodir_manage_selected_fields', $sub_tab); ?>
1550 1550
                         </div>
1551 1551
                         <div style="clear:both"></div>
1552 1552
                     </div>
@@ -1569,7 +1569,7 @@  discard block
 block discarded – undo
1569 1569
  */
1570 1570
 function geodir_diagnostic_tools_setting_page()
1571 1571
 {
1572
-    ?>
1572
+	?>
1573 1573
     <div class="inner_content_tab_main">
1574 1574
         <div class="gd-content-heading">
1575 1575
 
@@ -1671,13 +1671,13 @@  discard block
 block discarded – undo
1671 1671
 					</td>
1672 1672
 				</tr>
1673 1673
                 <?php
1674
-                /**
1675
-                 * Allows you to add more setting to the GD>Tools settings page.
1676
-                 *
1677
-                 * Called after the last setting on the GD>Tools page.
1678
-                 * @since 1.0.0
1679
-                 */
1680
-                do_action('geodir_diagnostic_tool');?>
1674
+				/**
1675
+				 * Allows you to add more setting to the GD>Tools settings page.
1676
+				 *
1677
+				 * Called after the last setting on the GD>Tools page.
1678
+				 * @since 1.0.0
1679
+				 */
1680
+				do_action('geodir_diagnostic_tool');?>
1681 1681
 
1682 1682
                 </tbody>
1683 1683
             </table>
Please login to merge, or discard this patch.
Braces   +21 added lines, -13 removed lines patch added patch discarded remove patch
@@ -74,17 +74,20 @@  discard block
 block discarded – undo
74 74
                                 $tab_link = $args['url'];
75 75
                             }
76 76
 
77
-                            if (!empty($args['request']))
78
-                                $tab_link = geodir_getlink($tab_link, $args['request']);
77
+                            if (!empty($args['request'])) {
78
+                                                            $tab_link = geodir_getlink($tab_link, $args['request']);
79
+                            }
79 80
 
80 81
                             if (isset($args['target']) && $args['target'] != '') {
81 82
                                 $tab_target = " target='" . sanitize_text_field($args['target']) . "' ";
82
-                            } else
83
-                                $tab_target = '';
83
+                            } else {
84
+                                                            $tab_target = '';
85
+                            }
84 86
 
85 87
                             $tab_active = '';
86
-                            if ($current_tab == $name)
87
-                                $tab_active = ' class="tab-active" ';
88
+                            if ($current_tab == $name) {
89
+                                                            $tab_active = ' class="tab-active" ';
90
+                            }
88 91
                             /**
89 92
                              * Called before the individual settings tabs are output.
90 93
                              *
@@ -122,8 +125,9 @@  discard block
 block discarded – undo
122 125
 
123 126
                         <?php
124 127
                         unset($subtabs);
125
-                        if (isset($tabs[$current_tab]['subtabs']))
126
-                            $subtabs = $tabs[$current_tab]['subtabs'];
128
+                        if (isset($tabs[$current_tab]['subtabs'])) {
129
+                                                    $subtabs = $tabs[$current_tab]['subtabs'];
130
+                        }
127 131
                         $form_action = '';
128 132
 
129 133
                         if (!empty($subtabs)):
@@ -189,7 +193,10 @@  discard block
 block discarded – undo
189 193
                      jQuery('#last_tab').val( jQuery(this).attr('href') );
190 194
                      return false;*/
191 195
                 });
192
-                <?php if (isset($_GET['subtab']) && $_GET['subtab']) echo 'jQuery(\'ul.subsubsub li a[href="#' . sanitize_text_field($_GET['subtab']) . '"]\').click();'; ?>
196
+                <?php if (isset($_GET['subtab']) && $_GET['subtab']) {
197
+	echo 'jQuery(\'ul.subsubsub li a[href="#' . sanitize_text_field($_GET['subtab']) . '"]\').click();';
198
+}
199
+?>
193 200
                 // Countries
194 201
                 jQuery('select#geodirectory_allowed_countries').change(function () {
195 202
                     if (jQuery(this).val() == "specific") {
@@ -312,10 +319,11 @@  discard block
 block discarded – undo
312 319
                 geodir_register_defaults();
313 320
             }*/
314 321
 
315
-            if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings'))
316
-                $hide_save_button = "style='display:none;'";
317
-            else
318
-                $hide_save_button = '';
322
+            if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings')) {
323
+                            $hide_save_button = "style='display:none;'";
324
+            } else {
325
+                            $hide_save_button = '';
326
+            }
319 327
 
320 328
             /**
321 329
              * Filter weather the default save button in the GD admin settings pages should be shown.
Please login to merge, or discard this patch.
Spacing   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                          * @param array $tabs The array of tabs to display.
53 53
                          */
54 54
                         $tabs = apply_filters('geodir_settings_tabs_array', $tabs);
55
-                        update_option('geodir_tabs', $tabs);// Important to show settings menu dropdown
55
+                        update_option('geodir_tabs', $tabs); // Important to show settings menu dropdown
56 56
 
57 57
                         foreach ($tabs as $name => $args) :
58 58
                             $label = $args['label'];
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 
64 64
                                 $subtabs = $args['subtabs'];
65 65
 
66
-                                $query_string = '&subtab=' . $subtabs[0]['subtab'];
66
+                                $query_string = '&subtab='.$subtabs[0]['subtab'];
67 67
 
68 68
                             endif;
69 69
 
70 70
 
71
-                            $tab_link = admin_url('admin.php?page=geodirectory&tab=' . $name . $query_string);
71
+                            $tab_link = admin_url('admin.php?page=geodirectory&tab='.$name.$query_string);
72 72
 
73 73
                             if (isset($args['url']) && $args['url'] != '') {
74 74
                                 $tab_link = $args['url'];
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                                 $tab_link = geodir_getlink($tab_link, $args['request']);
79 79
 
80 80
                             if (isset($args['target']) && $args['target'] != '') {
81
-                                $tab_target = " target='" . sanitize_text_field($args['target']) . "' ";
81
+                                $tab_target = " target='".sanitize_text_field($args['target'])."' ";
82 82
                             } else
83 83
                                 $tab_target = '';
84 84
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                              * @see 'geodir_after_settings_tabs'
94 94
                              */
95 95
                             do_action('geodir_before_settings_tabs', $name);
96
-                            echo '<li ' . $tab_active . ' ><a href="' . esc_url($tab_link) . '"  ' . $tab_target . ' >' . $label . '</a></li>';
96
+                            echo '<li '.$tab_active.' ><a href="'.esc_url($tab_link).'"  '.$tab_target.' >'.$label.'</a></li>';
97 97
                             /**
98 98
                              * Called after the individual settings tabs are output.
99 99
                              *
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
                                         $form_action = isset($sub['form_action']) ? $sub['form_action'] : '';
138 138
                                     }
139 139
 
140
-                                    $sub_tabs_link = admin_url() . 'admin.php?page=geodirectory&tab=' . $current_tab . '&subtab=' . $sub['subtab'];
140
+                                    $sub_tabs_link = admin_url().'admin.php?page=geodirectory&tab='.$current_tab.'&subtab='.$sub['subtab'];
141 141
                                     if (isset($sub['request']) && is_array($sub['request']) && !empty($sub['request'])) {
142 142
                                         $sub_tabs_link = geodir_getlink($sub_tabs_link, $sub['request']);
143 143
                                     }
144
-                                    echo '<dd ' . $subtab_active . ' id="claim_listing"><a href="' . esc_url($sub_tabs_link) . '" >' . sanitize_text_field($sub['label']) . '</a></dd>';
144
+                                    echo '<dd '.$subtab_active.' id="claim_listing"><a href="'.esc_url($sub_tabs_link).'" >'.sanitize_text_field($sub['label']).'</a></dd>';
145 145
                                 }
146 146
                                 ?>
147 147
                             </dl>
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                             echo "inner_contet_tabs";
152 152
                         } ?>">
153 153
                             <form method="post" id="mainform"
154
-                                  class="geodir_optionform <?php echo $current_tab . ' '; ?><?php if (isset($sub['subtab'])) {
154
+                                  class="geodir_optionform <?php echo $current_tab.' '; ?><?php if (isset($sub['subtab'])) {
155 155
                                       echo sanitize_text_field($sub['subtab']);
156 156
                                   } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data">
157 157
                                 <input type="hidden" class="active_tab" name="active_tab"
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                                            echo sanitize_text_field($_REQUEST['active_tab']);
160 160
                                        } ?>"/>
161 161
                                 <?php wp_nonce_field('geodir-settings', '_wpnonce', true, true); ?>
162
-                                <?php wp_nonce_field('geodir-settings-' . $current_tab, '_wpnonce-' . $current_tab, true, true); ?>
162
+                                <?php wp_nonce_field('geodir-settings-'.$current_tab, '_wpnonce-'.$current_tab, true, true); ?>
163 163
                                 <?php
164 164
                                 /**
165 165
                                  * Used to call the content of each GD settings tab page.
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                      jQuery('#last_tab').val( jQuery(this).attr('href') );
190 190
                      return false;*/
191 191
                 });
192
-                <?php if (isset($_GET['subtab']) && $_GET['subtab']) echo 'jQuery(\'ul.subsubsub li a[href="#' . sanitize_text_field($_GET['subtab']) . '"]\').click();'; ?>
192
+                <?php if (isset($_GET['subtab']) && $_GET['subtab']) echo 'jQuery(\'ul.subsubsub li a[href="#'.sanitize_text_field($_GET['subtab']).'"]\').click();'; ?>
193 193
                 // Countries
194 194
                 jQuery('select#geodirectory_allowed_countries').change(function () {
195 195
                     if (jQuery(this).val() == "specific") {
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                     jQuery('.geodirectory-nav-tab-wrapper a').click(function () {
223 223
                         if (changed) {
224 224
                             window.onbeforeunload = function () {
225
-                                return '<?php echo __( 'The changes you made will be lost if you navigate away from this page.', 'geodirectory'); ?>';
225
+                                return '<?php echo __('The changes you made will be lost if you navigate away from this page.', 'geodirectory'); ?>';
226 226
                             }
227 227
                         } else {
228 228
                             window.onbeforeunload = '';
@@ -285,14 +285,14 @@  discard block
 block discarded – undo
285 285
 
286 286
     //echo $tab_name.'_array.php' ;
287 287
     global $geodir_settings, $is_default, $mapzoom;
288
-    if (file_exists(dirname(__FILE__) . '/option-pages/' . $tab_name . '_array.php')) {
288
+    if (file_exists(dirname(__FILE__).'/option-pages/'.$tab_name.'_array.php')) {
289 289
         /**
290 290
          * Contains settings array for given tab.
291 291
          *
292 292
          * @since 1.0.0
293 293
          * @package GeoDirectory
294 294
          */
295
-        include_once('option-pages/' . $tab_name . '_array.php');
295
+        include_once('option-pages/'.$tab_name.'_array.php');
296 296
     }
297 297
 
298 298
     $listing_type = isset($_REQUEST['listing_type']) ? $_REQUEST['listing_type'] : '';
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             ?>
328 328
 
329 329
             <p class="submit">
330
-            <input <?php echo $hide_save_button;?> name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" />
330
+            <input <?php echo $hide_save_button; ?> name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" />
331 331
             <input type="hidden" name="subtab" id="last_tab" />
332 332
             </p>
333 333
             
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
                     ?>
398 398
 
399
-                    <h3><?php _e('Set Default Location', 'geodirectory');?></h3>
399
+                    <h3><?php _e('Set Default Location', 'geodirectory'); ?></h3>
400 400
 
401 401
                     <input type="hidden" name="add_location" value="location">
402 402
 
@@ -404,16 +404,16 @@  discard block
 block discarded – undo
404 404
                         echo $location_result->location_id;
405 405
                     } ?>">
406 406
 
407
-                    <input type="hidden" name="address" id="<?php echo $prefix;?>address" value="">
407
+                    <input type="hidden" name="address" id="<?php echo $prefix; ?>address" value="">
408 408
 
409 409
                     <table class="form-table default_location_form">
410 410
                         <tbody>
411 411
                         <tr valign="top" class="single_select_page">
412
-                            <th class="titledesc" scope="row"><?php _e('City', 'geodirectory');?></th>
412
+                            <th class="titledesc" scope="row"><?php _e('City', 'geodirectory'); ?></th>
413 413
                             <td class="forminp">
414 414
                                 <div class="gtd-formfeild required">
415 415
                                     <input class="require" type="text" size="80" style="width:440px"
416
-                                           id="<?php echo $prefix;?>city" name="city"
416
+                                           id="<?php echo $prefix; ?>city" name="city"
417 417
                                            value="<?php if (isset($location_result->city)) {
418 418
                                                echo $location_result->city;
419 419
                                            } ?>"/>
@@ -425,11 +425,11 @@  discard block
 block discarded – undo
425 425
                             </td>
426 426
                         </tr>
427 427
                         <tr valign="top" class="single_select_page">
428
-                            <th class="titledesc" scope="row"><?php _e('Region', 'geodirectory');?></th>
428
+                            <th class="titledesc" scope="row"><?php _e('Region', 'geodirectory'); ?></th>
429 429
                             <td class="forminp">
430 430
                                 <div class="gtd-formfeild required">
431 431
                                     <input class="require" type="text" size="80" style="width:440px"
432
-                                           id="<?php echo $prefix;?>region" name="region"
432
+                                           id="<?php echo $prefix; ?>region" name="region"
433 433
                                            value="<?php if (isset($location_result->region)) {
434 434
                                                echo $location_result->region;
435 435
                                            } ?>"/>
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
                             </td>
442 442
                         </tr>
443 443
                         <tr valign="top" class="single_select_page">
444
-                            <th class="titledesc" scope="row"><?php _e('Country', 'geodirectory');?></th>
444
+                            <th class="titledesc" scope="row"><?php _e('Country', 'geodirectory'); ?></th>
445 445
                             <td class="forminp">
446 446
                                 <div class="gtd-formfeild required" style="padding-top:10px;">
447 447
                                     <?php
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
                                     ?>
451 451
                                     <select id="<?php echo $prefix ?>country" class="chosen_select"
452 452
                                             data-location_type="country" name="<?php echo $prefix ?>country"
453
-                                            data-placeholder="<?php _e('Choose a country.', 'geodirectory');?>"
453
+                                            data-placeholder="<?php _e('Choose a country.', 'geodirectory'); ?>"
454 454
                                             data-addsearchtermonnorecord="1" data-ajaxchosen="0" data-autoredirect="0"
455 455
                                             data-showeverywhere="0">
456 456
                                         <?php geodir_get_country_dl($country, $prefix); ?>
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                         </tr>
468 468
                         <tr valign="top" class="single_select_page gd-add-location-map">
469 469
                             <th class="titledesc"
470
-                                scope="row"><?php _e('Set Location on Map', 'geodirectory');?></th>
470
+                                scope="row"><?php _e('Set Location on Map', 'geodirectory'); ?></th>
471 471
                             <td class="forminp">
472 472
                                 <?php
473 473
                                 /**
@@ -475,15 +475,15 @@  discard block
 block discarded – undo
475 475
                                  *
476 476
                                  * @since 1.0.0
477 477
                                  */
478
-                                include(geodir_plugin_path() . "/geodirectory-functions/map-functions/map_on_add_listing_page.php");?>
478
+                                include(geodir_plugin_path()."/geodirectory-functions/map-functions/map_on_add_listing_page.php"); ?>
479 479
                             </td>
480 480
                         </tr>
481 481
                         <tr valign="top" class="single_select_page">
482
-                            <th class="titledesc" scope="row"><?php _e('City Latitude', 'geodirectory');?></th>
482
+                            <th class="titledesc" scope="row"><?php _e('City Latitude', 'geodirectory'); ?></th>
483 483
                             <td class="forminp">
484 484
                                 <div class="gtd-formfeild required" style="padding-top:10px;">
485 485
                                     <input type="text" class="require" size="80" style="width:440px"
486
-                                           id="<?php echo $prefix;?>latitude" name="latitude"
486
+                                           id="<?php echo $prefix; ?>latitude" name="latitude"
487 487
                                            value="<?php if (isset($location_result->city_latitude)) {
488 488
                                                echo $location_result->city_latitude;
489 489
                                            } ?>"/>
@@ -496,11 +496,11 @@  discard block
 block discarded – undo
496 496
                         </tr>
497 497
                         <tr valign="top" class="single_select_page">
498 498
                             <th class="titledesc"
499
-                                scope="row"><?php _e('City Longitude', 'geodirectory');?></th>
499
+                                scope="row"><?php _e('City Longitude', 'geodirectory'); ?></th>
500 500
                             <td class="forminp">
501 501
                                 <div class="gtd-formfeild required" style="padding-top:10px;">
502 502
                                     <input type="text" class="require" size="80" style="width:440px"
503
-                                           id="<?php echo $prefix;?>longitude" name="longitude"
503
+                                           id="<?php echo $prefix; ?>longitude" name="longitude"
504 504
                                            value="<?php if (isset($location_result->city_longitude)) {
505 505
                                                echo $location_result->city_longitude;
506 506
                                            } ?>"/>
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
                 </div>
536 536
             </div>
537 537
             <?php break;
538
-        case $listing_type . '_fields_settings' :
538
+        case $listing_type.'_fields_settings' :
539 539
 
540 540
             geodir_custom_post_type_form();
541 541
 
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
     }
688 688
 
689 689
 
690
-    $theme_name = $theme_name . "_custom";
690
+    $theme_name = $theme_name."_custom";
691 691
     $theme_arr = get_option('gd_theme_compats');
692 692
     update_option('gd_theme_compat', $theme_name);
693 693
     /**
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
         <div class="gd-content-heading">
777 777
 
778 778
 
779
-            <h3><?php _e('Theme Compatibility Settings', 'geodirectory');?></h3>
779
+            <h3><?php _e('Theme Compatibility Settings', 'geodirectory'); ?></h3>
780 780
             <style>
781 781
                 .gd-theme-compat-table {
782 782
                     width: 100%;
@@ -807,11 +807,11 @@  discard block
 block discarded – undo
807 807
                 </div>
808 808
             <?php }?>
809 809
 
810
-            <h4><?php _e('Select Theme Compatibility Pack', 'geodirectory');?></h4>
810
+            <h4><?php _e('Select Theme Compatibility Pack', 'geodirectory'); ?></h4>
811 811
 
812 812
             <select name="gd_theme_compat" id="gd_theme_compat">
813
-                <option value=""><?php _e('Select Theme', 'geodirectory');?></option>
814
-                <option value="custom"><?php _e('Custom', 'geodirectory');?></option>
813
+                <option value=""><?php _e('Select Theme', 'geodirectory'); ?></option>
814
+                <option value="custom"><?php _e('Custom', 'geodirectory'); ?></option>
815 815
                 <?php
816 816
                 $theme_arr = get_option('gd_theme_compats');
817 817
                 $theme_active = get_option('gd_theme_compat');
@@ -830,20 +830,20 @@  discard block
 block discarded – undo
830 830
                 ?>
831 831
             </select>
832 832
             <button onclick="gd_comp_export();" type="button"
833
-                    class="button-primary"><?php _e('Export', 'geodirectory');?></button>
833
+                    class="button-primary"><?php _e('Export', 'geodirectory'); ?></button>
834 834
             <button onclick="gd_comp_import();" type="button"
835
-                    class="button-primary"><?php _e('Import', 'geodirectory');?></button>
835
+                    class="button-primary"><?php _e('Import', 'geodirectory'); ?></button>
836 836
 
837 837
             <div class="gd-comp-import-export">
838 838
                 <textarea id="gd-import-export-theme-comp"
839
-                          placeholder="<?php _e('Paste the JSON code here and then click import again', 'geodirectory');?>"></textarea>
839
+                          placeholder="<?php _e('Paste the JSON code here and then click import again', 'geodirectory'); ?>"></textarea>
840 840
             </div>
841 841
             <script>
842 842
 
843 843
                 function gd_comp_export() {
844 844
                     theme = jQuery('#gd_theme_compat').val();
845 845
                     if (theme == '' || theme == 'custom') {
846
-                        alert("<?php _e('Please select a theme to export','geodirectory');?>");
846
+                        alert("<?php _e('Please select a theme to export', 'geodirectory'); ?>");
847 847
                         return false;
848 848
                     }
849 849
                     jQuery('.gd-comp-import-export').show();
@@ -877,9 +877,9 @@  discard block
 block discarded – undo
877 877
 
878 878
                     jQuery.post(ajaxurl, data, function (response) {
879 879
                         if (response == '0') {
880
-                            alert("<?php _e('Something went wrong','geodirectory');?>");
880
+                            alert("<?php _e('Something went wrong', 'geodirectory'); ?>");
881 881
                         } else {
882
-                            alert("<?php _e('Theme Compatibility Imported','geodirectory');?>");
882
+                            alert("<?php _e('Theme Compatibility Imported', 'geodirectory'); ?>");
883 883
                             jQuery('#gd-import-export-theme-comp').val('');
884 884
                             jQuery('.gd-comp-import-export').hide();
885 885
                             jQuery('#gd_theme_compat').append(new Option(response, response));
@@ -920,14 +920,14 @@  discard block
 block discarded – undo
920 920
 
921 921
             </script>
922 922
 
923
-            <h4><?php _e('Main Wrapper Actions', 'geodirectory');?></h4>
923
+            <h4><?php _e('Main Wrapper Actions', 'geodirectory'); ?></h4>
924 924
 
925 925
             <table class="form-table gd-theme-compat-table">
926 926
                 <tbody>
927 927
                 <tr>
928
-                    <td><strong><?php _e('Hook', 'geodirectory');?></strong></td>
929
-                    <td><strong><?php _e('ID', 'geodirectory');?></strong></td>
930
-                    <td><strong><?php _e('Class', 'geodirectory');?></strong></td>
928
+                    <td><strong><?php _e('Hook', 'geodirectory'); ?></strong></td>
929
+                    <td><strong><?php _e('ID', 'geodirectory'); ?></strong></td>
930
+                    <td><strong><?php _e('Class', 'geodirectory'); ?></strong></td>
931 931
                 </tr>
932 932
 
933 933
 
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
 
946 946
                 <tr class="gd-theme-comp-out">
947 947
                     <td colspan="3">
948
-                        <span><?php _e('Output:', 'geodirectory');?></span>
948
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
949 949
                         <textarea name="geodir_wrapper_open_replace"
950 950
                                   placeholder='<div id="[id]" class="[class]">'><?php if (isset($tc['geodir_wrapper_open_replace'])) {
951 951
                                 echo $tc['geodir_wrapper_open_replace'];
@@ -959,14 +959,14 @@  discard block
 block discarded – undo
959 959
                         <small>geodir_wrapper_close</small>
960 960
                     </td>
961 961
                     <td><input disabled="disabled" type="text" name="geodir_wrapper_open_id"
962
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
962
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
963 963
                     <td><input disabled="disabled" type="text" name="geodir_wrapper_open_class"
964
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
964
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
965 965
                 </tr>
966 966
 
967 967
                 <tr class="gd-theme-comp-out">
968 968
                     <td colspan="3">
969
-                        <span><?php _e('Output:', 'geodirectory');?></span>
969
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
970 970
                         <textarea name="geodir_wrapper_close_replace"
971 971
                                   placeholder='</div><!-- wrapper ends here-->'><?php if (isset($tc['geodir_wrapper_close_replace'])) {
972 972
                                 echo $tc['geodir_wrapper_close_replace'];
@@ -990,7 +990,7 @@  discard block
 block discarded – undo
990 990
 
991 991
                 <tr class="gd-theme-comp-out">
992 992
                     <td colspan="3">
993
-                        <span><?php _e('Output:', 'geodirectory');?></span>
993
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
994 994
                         <textarea name="geodir_wrapper_content_open_replace"
995 995
                                   placeholder='<div id="[id]" class="[class]" role="main" [width_css]>'><?php if (isset($tc['geodir_wrapper_content_open_replace'])) {
996 996
                                 echo $tc['geodir_wrapper_content_open_replace'];
@@ -1004,14 +1004,14 @@  discard block
 block discarded – undo
1004 1004
                         <small>geodir_wrapper_content_close</small>
1005 1005
                     </td>
1006 1006
                     <td><input disabled="disabled" type="text" name="geodir_wrapper_content_close_id"
1007
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1007
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1008 1008
                     <td><input disabled="disabled" type="text" name="geodir_wrapper_content_close_class"
1009
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1009
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1010 1010
                 </tr>
1011 1011
 
1012 1012
                 <tr class="gd-theme-comp-out">
1013 1013
                     <td colspan="3">
1014
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1014
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1015 1015
                         <textarea name="geodir_wrapper_content_close_replace"
1016 1016
                                   placeholder='</div><!-- content ends here-->'><?php if (isset($tc['geodir_wrapper_content_close_replace'])) {
1017 1017
                                 echo $tc['geodir_wrapper_content_close_replace'];
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
 
1034 1034
                 <tr class="gd-theme-comp-out">
1035 1035
                     <td colspan="3">
1036
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1036
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1037 1037
                         <textarea name="geodir_article_open_replace"
1038 1038
                                   placeholder='<article  id="[id]" class="[class]" itemscope itemtype="[itemtype]">'><?php if (isset($tc['geodir_article_open_replace'])) {
1039 1039
                                 echo $tc['geodir_article_open_replace'];
@@ -1046,14 +1046,14 @@  discard block
 block discarded – undo
1046 1046
                         <small>geodir_article_close</small>
1047 1047
                     </td>
1048 1048
                     <td><input disabled="disabled" type="text" name="geodir_article_close_id"
1049
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1049
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1050 1050
                     <td><input disabled="disabled" type="text" name="geodir_article_close_class"
1051
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1051
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1052 1052
                 </tr>
1053 1053
 
1054 1054
                 <tr class="gd-theme-comp-out">
1055 1055
                     <td colspan="3">
1056
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1056
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1057 1057
                         <textarea name="geodir_article_close_replace"
1058 1058
                                   placeholder='</article><!-- article ends here-->'><?php if (isset($tc['geodir_article_close_replace'])) {
1059 1059
                                 echo $tc['geodir_article_close_replace'];
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
 
1077 1077
                 <tr class="gd-theme-comp-out">
1078 1078
                     <td colspan="3">
1079
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1079
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1080 1080
                         <textarea name="geodir_sidebar_right_open_replace"
1081 1081
                                   placeholder='<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_right_open_replace'])) {
1082 1082
                                 echo $tc['geodir_sidebar_right_open_replace'];
@@ -1089,14 +1089,14 @@  discard block
 block discarded – undo
1089 1089
                         <small>geodir_sidebar_right_close</small>
1090 1090
                     </td>
1091 1091
                     <td><input disabled="disabled" type="text" name="geodir_sidebar_right_close_id"
1092
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1092
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1093 1093
                     <td><input disabled="disabled" type="text" name="geodir_sidebar_right_close_class"
1094
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1094
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1095 1095
                 </tr>
1096 1096
 
1097 1097
                 <tr class="gd-theme-comp-out">
1098 1098
                     <td colspan="3">
1099
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1099
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1100 1100
                         <textarea name="geodir_sidebar_right_close_replace"
1101 1101
                                   placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_right_close_replace'])) {
1102 1102
                                 echo $tc['geodir_sidebar_right_close_replace'];
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
 
1121 1121
                 <tr class="gd-theme-comp-out">
1122 1122
                     <td colspan="3">
1123
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1123
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1124 1124
                         <textarea name="geodir_sidebar_left_open_replace"
1125 1125
                                   placeholder='<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_left_open_replace'])) {
1126 1126
                                 echo $tc['geodir_sidebar_left_open_replace'];
@@ -1133,14 +1133,14 @@  discard block
 block discarded – undo
1133 1133
                         <small>geodir_sidebar_left_close</small>
1134 1134
                     </td>
1135 1135
                     <td><input disabled="disabled" type="text" name="geodir_sidebar_left_close_id"
1136
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1136
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1137 1137
                     <td><input disabled="disabled" type="text" name="geodir_sidebar_left_close_class"
1138
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1138
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1139 1139
                 </tr>
1140 1140
 
1141 1141
                 <tr class="gd-theme-comp-out">
1142 1142
                     <td colspan="3">
1143
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1143
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1144 1144
                         <textarea name="geodir_sidebar_left_close_replace"
1145 1145
                                   placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_left_close_replace'])) {
1146 1146
                                 echo $tc['geodir_sidebar_left_close_replace'];
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
 
1163 1163
                 <tr class="gd-theme-comp-out">
1164 1164
                     <td colspan="3">
1165
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1165
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1166 1166
                         <textarea name="geodir_main_content_open_replace"
1167 1167
                                   placeholder='<main  id="[id]" class="[class]"  role="main">'><?php if (isset($tc['geodir_main_content_open_replace'])) {
1168 1168
                                 echo $tc['geodir_main_content_open_replace'];
@@ -1175,14 +1175,14 @@  discard block
 block discarded – undo
1175 1175
                         <small>geodir_main_content_close</small>
1176 1176
                     </td>
1177 1177
                     <td><input disabled="disabled" type="text" name="geodir_main_content_close_id"
1178
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1178
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1179 1179
                     <td><input disabled="disabled" type="text" name="geodir_main_content_close_class"
1180
-                               placeholder="<?php _e('Not used', 'geodirectory');?>"/></td>
1180
+                               placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td>
1181 1181
                 </tr>
1182 1182
 
1183 1183
                 <tr class="gd-theme-comp-out">
1184 1184
                     <td colspan="3">
1185
-                        <span><?php _e('Output:', 'geodirectory');?></span>
1185
+                        <span><?php _e('Output:', 'geodirectory'); ?></span>
1186 1186
                         <textarea name="geodir_main_content_close_replace"
1187 1187
                                   placeholder='</main><!-- main ends here-->'><?php if (isset($tc['geodir_main_content_close_replace'])) {
1188 1188
                                 echo $tc['geodir_main_content_close_replace'];
@@ -1194,13 +1194,13 @@  discard block
 block discarded – undo
1194 1194
                 </tbody>
1195 1195
             </table>
1196 1196
 
1197
-            <h4><?php _e('Other Actions', 'geodirectory');?></h4>
1197
+            <h4><?php _e('Other Actions', 'geodirectory'); ?></h4>
1198 1198
 
1199 1199
             <table class="form-table gd-theme-compat-table">
1200 1200
                 <tbody>
1201 1201
                 <tr>
1202
-                    <td><strong><?php _e('Hook', 'geodirectory');?></strong></td>
1203
-                    <td><strong><?php _e('Content', 'geodirectory');?></strong></td>
1202
+                    <td><strong><?php _e('Hook', 'geodirectory'); ?></strong></td>
1203
+                    <td><strong><?php _e('Content', 'geodirectory'); ?></strong></td>
1204 1204
                 </tr>
1205 1205
 
1206 1206
 
@@ -1229,13 +1229,13 @@  discard block
 block discarded – undo
1229 1229
             </table>
1230 1230
 
1231 1231
 
1232
-            <h4><?php _e('Other Filters', 'geodirectory');?></h4>
1232
+            <h4><?php _e('Other Filters', 'geodirectory'); ?></h4>
1233 1233
 
1234 1234
             <table class="form-table gd-theme-compat-table">
1235 1235
                 <tbody>
1236 1236
                 <tr>
1237
-                    <td><strong><?php _e('Filter', 'geodirectory');?></strong></td>
1238
-                    <td><strong><?php _e('Content', 'geodirectory');?></strong></td>
1237
+                    <td><strong><?php _e('Filter', 'geodirectory'); ?></strong></td>
1238
+                    <td><strong><?php _e('Content', 'geodirectory'); ?></strong></td>
1239 1239
                 </tr>
1240 1240
 
1241 1241
                 <tr>
@@ -1389,13 +1389,13 @@  discard block
 block discarded – undo
1389 1389
                  *
1390 1390
                  * @since 1.4.0
1391 1391
                  */
1392
-                do_action('gd_compat_other_filters');?>
1392
+                do_action('gd_compat_other_filters'); ?>
1393 1393
 
1394 1394
                 </tbody>
1395 1395
             </table>
1396 1396
 
1397 1397
 
1398
-            <h4><?php _e('Required CSS', 'geodirectory');?></h4>
1398
+            <h4><?php _e('Required CSS', 'geodirectory'); ?></h4>
1399 1399
 
1400 1400
             <table class="form-table gd-theme-compat-table">
1401 1401
                 <tbody>
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
                 </tbody>
1411 1411
             </table>
1412 1412
 
1413
-            <h4><?php _e('Required JS', 'geodirectory');?></h4>
1413
+            <h4><?php _e('Required JS', 'geodirectory'); ?></h4>
1414 1414
 
1415 1415
             <table class="form-table gd-theme-compat-table">
1416 1416
                 <tbody>
@@ -1428,7 +1428,7 @@  discard block
 block discarded – undo
1428 1428
 
1429 1429
             <p class="submit">
1430 1430
                 <input name="save" class="button-primary" type="submit"
1431
-                       value="<?php _e('Save changes', 'geodirectory');?>">
1431
+                       value="<?php _e('Save changes', 'geodirectory'); ?>">
1432 1432
             </p>
1433 1433
 
1434 1434
         </div>
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
          * @param string $listing_type Post type.
1463 1463
          */
1464 1464
         ?>
1465
-        <h3><?php echo apply_filters('geodir_custom_fields_panel_head', '', $sub_tab, $listing_type);?></h3>
1465
+        <h3><?php echo apply_filters('geodir_custom_fields_panel_head', '', $sub_tab, $listing_type); ?></h3>
1466 1466
     </div>
1467 1467
     <div id="container_general" class="clearfix">
1468 1468
         <div class="general-form-builder-frame">
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
                  * @param string $listing_type Post type.
1478 1478
                  */
1479 1479
                 ?>
1480
-                <h3 class="hndle"><span><?php echo apply_filters('geodir_cf_panel_available_fields_head', '', $sub_tab, $listing_type);?>
1480
+                <h3 class="hndle"><span><?php echo apply_filters('geodir_cf_panel_available_fields_head', '', $sub_tab, $listing_type); ?>
1481 1481
 							</span></h3>
1482 1482
                 <?php
1483 1483
                 /**
@@ -1488,7 +1488,7 @@  discard block
 block discarded – undo
1488 1488
                  * @param string $listing_type Post type.
1489 1489
                  */
1490 1490
                 ?>
1491
-                <p><?php echo apply_filters('geodir_cf_panel_available_fields_note', '', $sub_tab, $listing_type);?></p>
1491
+                <p><?php echo apply_filters('geodir_cf_panel_available_fields_note', '', $sub_tab, $listing_type); ?></p>
1492 1492
 
1493 1493
                 <div class="inside">
1494 1494
 
@@ -1522,7 +1522,7 @@  discard block
 block discarded – undo
1522 1522
                      * @param string $listing_type Post type.
1523 1523
                      */
1524 1524
                     ?>
1525
-                    <span><?php echo apply_filters('geodir_cf_panel_selected_fields_head', '', $sub_tab, $listing_type);?></span>
1525
+                    <span><?php echo apply_filters('geodir_cf_panel_selected_fields_head', '', $sub_tab, $listing_type); ?></span>
1526 1526
                 </h3>
1527 1527
                 <?php
1528 1528
                 /**
@@ -1533,7 +1533,7 @@  discard block
 block discarded – undo
1533 1533
                  * @param string $listing_type Post type.
1534 1534
                  */
1535 1535
                 ?>
1536
-                <p><?php echo apply_filters('geodir_cf_panel_selected_fields_note', '', $sub_tab, $listing_type);?></p>
1536
+                <p><?php echo apply_filters('geodir_cf_panel_selected_fields_note', '', $sub_tab, $listing_type); ?></p>
1537 1537
 
1538 1538
                 <div class="inside">
1539 1539
 
@@ -1574,7 +1574,7 @@  discard block
 block discarded – undo
1574 1574
         <div class="gd-content-heading">
1575 1575
 
1576 1576
 
1577
-            <h3><?php _e('GD Diagnostic Tools', 'geodirectory');?></h3>
1577
+            <h3><?php _e('GD Diagnostic Tools', 'geodirectory'); ?></h3>
1578 1578
             <style>
1579 1579
                 .gd-tools-table {
1580 1580
                     width: 100%;
@@ -1593,81 +1593,81 @@  discard block
 block discarded – undo
1593 1593
             <table class="form-table gd-tools-table">
1594 1594
                 <tbody>
1595 1595
                 <tr>
1596
-                    <td><strong><?php _e('Tool', 'geodirectory');?></strong></td>
1597
-                    <td><strong><?php _e('Description', 'geodirectory');?></strong></td>
1598
-                    <td><strong><?php _e('Action', 'geodirectory');?></strong></td>
1596
+                    <td><strong><?php _e('Tool', 'geodirectory'); ?></strong></td>
1597
+                    <td><strong><?php _e('Description', 'geodirectory'); ?></strong></td>
1598
+                    <td><strong><?php _e('Action', 'geodirectory'); ?></strong></td>
1599 1599
                 </tr>
1600 1600
 
1601 1601
 
1602 1602
                 <tr>
1603
-                    <td><?php _e('GD pages check', 'geodirectory');?></td>
1603
+                    <td><?php _e('GD pages check', 'geodirectory'); ?></td>
1604 1604
                     <td>
1605
-                        <small><?php _e('Checks if the GD pages are installed correctly or not.', 'geodirectory');?></small>
1605
+                        <small><?php _e('Checks if the GD pages are installed correctly or not.', 'geodirectory'); ?></small>
1606 1606
                     </td>
1607 1607
                     <td>
1608
-                        <input type="button" value="<?php _e('Run', 'geodirectory');?>"
1608
+                        <input type="button" value="<?php _e('Run', 'geodirectory'); ?>"
1609 1609
                                class="button-primary geodir_diagnosis_button" data-diagnose="default_pages"/>
1610 1610
                     </td>
1611 1611
                 </tr>
1612 1612
 
1613 1613
 
1614 1614
                 <tr>
1615
-                    <td><?php _e('Multisite DB conversion check', 'geodirectory');?></td>
1615
+                    <td><?php _e('Multisite DB conversion check', 'geodirectory'); ?></td>
1616 1616
                     <td>
1617
-                        <small><?php _e('Checks if the GD database tables have been converted to use multisite correctly.', 'geodirectory');?></small>
1617
+                        <small><?php _e('Checks if the GD database tables have been converted to use multisite correctly.', 'geodirectory'); ?></small>
1618 1618
                     </td>
1619
-                    <td><input type="button" value="<?php _e('Run', 'geodirectory');?>"
1619
+                    <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>"
1620 1620
                                class="button-primary geodir_diagnosis_button" data-diagnose="multisite_conversion"/>
1621 1621
                     </td>
1622 1622
                 </tr>
1623 1623
 
1624 1624
                 <tr>
1625
-                    <td><?php _e('Ratings check', 'geodirectory');?></td>
1625
+                    <td><?php _e('Ratings check', 'geodirectory'); ?></td>
1626 1626
                     <td>
1627
-                        <small><?php _e('Checks ratings for correct location and content settings', 'geodirectory');?></small>
1627
+                        <small><?php _e('Checks ratings for correct location and content settings', 'geodirectory'); ?></small>
1628 1628
                     </td>
1629
-                    <td><input type="button" value="<?php _e('Run', 'geodirectory');?>"
1629
+                    <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>"
1630 1630
                                class="button-primary geodir_diagnosis_button" data-diagnose="ratings"/>
1631 1631
                     </td>
1632 1632
                 </tr>
1633 1633
 
1634 1634
                 <tr>
1635
-                    <td><?php _e('Sync GD tags', 'geodirectory');?></td>
1635
+                    <td><?php _e('Sync GD tags', 'geodirectory'); ?></td>
1636 1636
                     <td>
1637
-                        <small><?php _e('This tool can be used when tags are showing in the backend but missing from the front end.', 'geodirectory');?></small>
1637
+                        <small><?php _e('This tool can be used when tags are showing in the backend but missing from the front end.', 'geodirectory'); ?></small>
1638 1638
                     </td>
1639
-                    <td><input type="button" value="<?php _e('Run', 'geodirectory');?>"
1639
+                    <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>"
1640 1640
                                class="button-primary geodir_diagnosis_button" data-diagnose="tags_sync"/>
1641 1641
                     </td>
1642 1642
                 </tr>
1643 1643
 
1644 1644
                 <tr>
1645
-                    <td><?php _e('Sync GD Categories', 'geodirectory');?></td>
1645
+                    <td><?php _e('Sync GD Categories', 'geodirectory'); ?></td>
1646 1646
                     <td>
1647
-                        <small><?php _e('This tool can be used when categories are missing from the details table but showing in other places in the backend (only checks posts with missing category info in details table)', 'geodirectory');?></small>
1647
+                        <small><?php _e('This tool can be used when categories are missing from the details table but showing in other places in the backend (only checks posts with missing category info in details table)', 'geodirectory'); ?></small>
1648 1648
                     </td>
1649
-                    <td><input type="button" value="<?php _e('Run', 'geodirectory');?>"
1649
+                    <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>"
1650 1650
                                class="button-primary geodir_diagnosis_button" data-diagnose="cats_sync"/>
1651 1651
                     </td>
1652 1652
                 </tr>
1653 1653
 
1654 1654
 
1655 1655
                 <tr>
1656
-                    <td><?php _e('Clear all GD version numbers', 'geodirectory');?></td>
1656
+                    <td><?php _e('Clear all GD version numbers', 'geodirectory'); ?></td>
1657 1657
                     <td>
1658
-                        <small><?php _e('This tool will clear all GD version numbers so any upgrade functions will run again.', 'geodirectory');?></small>
1658
+                        <small><?php _e('This tool will clear all GD version numbers so any upgrade functions will run again.', 'geodirectory'); ?></small>
1659 1659
                     </td>
1660
-                    <td><input type="button" value="<?php _e('Run', 'geodirectory');?>"
1660
+                    <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>"
1661 1661
                                class="button-primary geodir_diagnosis_button" data-diagnose="version_clear"/>
1662 1662
                     </td>
1663 1663
                 </tr>
1664 1664
 				<tr>
1665
-					<td><?php _e('Load custom fields translation', 'geodirectory');?></td>
1665
+					<td><?php _e('Load custom fields translation', 'geodirectory'); ?></td>
1666 1666
 					<td>
1667
-						<small><?php _e('This tool will load strings from the database into a file to translate via po editor.Ex: custom fields', 'geodirectory');?></small>
1667
+						<small><?php _e('This tool will load strings from the database into a file to translate via po editor.Ex: custom fields', 'geodirectory'); ?></small>
1668 1668
 					</td>
1669 1669
 					<td>
1670
-						<input type="button" value="<?php _e('Run', 'geodirectory');?>" class="button-primary geodir_diagnosis_button" data-diagnose="load_db_language"/>
1670
+						<input type="button" value="<?php _e('Run', 'geodirectory'); ?>" class="button-primary geodir_diagnosis_button" data-diagnose="load_db_language"/>
1671 1671
 					</td>
1672 1672
 				</tr>
1673 1673
                 <?php
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
                  * Called after the last setting on the GD>Tools page.
1678 1678
                  * @since 1.0.0
1679 1679
                  */
1680
-                do_action('geodir_diagnostic_tool');?>
1680
+                do_action('geodir_diagnostic_tool'); ?>
1681 1681
 
1682 1682
                 </tbody>
1683 1683
             </table>
Please login to merge, or discard this patch.
geodirectory_template_actions.php 3 patches
Braces   +31 added lines, -24 removed lines patch added patch discarded remove patch
@@ -714,8 +714,9 @@  discard block
 block discarded – undo
714 714
 
715 715
                         if (isset($post->post_default_category) && $post->post_default_category == $cat_id) {
716 716
                             if ($term_icon_url = get_tax_meta($cat_id, 'ct_cat_icon', false, $post_type)) {
717
-                                if (isset($term_icon_url['src']) && $term_icon_url['src'] != '')
718
-                                    $term_icon = $term_icon_url['src'];
717
+                                if (isset($term_icon_url['src']) && $term_icon_url['src'] != '') {
718
+                                                                    $term_icon = $term_icon_url['src'];
719
+                                }
719 720
                                 break;
720 721
                             }
721 722
                         }
@@ -1246,8 +1247,9 @@  discard block
 block discarded – undo
1246 1247
         echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1247 1248
     }
1248 1249
 
1249
-    if (isset($taxonomies[$post_type . '_tags']))
1250
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1250
+    if (isset($taxonomies[$post_type . '_tags'])) {
1251
+            echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1252
+    }
1251 1253
 
1252 1254
     ?>
1253 1255
     </p><?php
@@ -1598,23 +1600,21 @@  discard block
 block discarded – undo
1598 1600
     if(geodir_is_page('pt')){
1599 1601
         $gd_page = 'pt';
1600 1602
         $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1601
-    }
1602
-    elseif(geodir_is_page('listing')){
1603
+    } elseif(geodir_is_page('listing')){
1603 1604
         $gd_page = 'listing';
1604 1605
         global $wp_query;
1605 1606
         $current_term = $wp_query->get_queried_object();
1606 1607
         if (strpos($current_term->taxonomy,'_tags') !== false) {
1607 1608
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1608
-        }else{
1609
+        } else{
1609 1610
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1610 1611
         }
1611 1612
 
1612
-    }
1613
-    elseif(geodir_is_page('author')){
1613
+    } elseif(geodir_is_page('author')){
1614 1614
         $gd_page = 'author';
1615 1615
         if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1616 1616
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1617
-        }else{
1617
+        } else{
1618 1618
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1619 1619
         }
1620 1620
 
@@ -2025,8 +2025,9 @@  discard block
 block discarded – undo
2025 2025
  */
2026 2026
 function geodir_action_add_listing_page_title()
2027 2027
 {
2028
-    if (isset($_REQUEST['listing_type']) && $_REQUEST['listing_type'] != '')
2029
-        $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2028
+    if (isset($_REQUEST['listing_type']) && $_REQUEST['listing_type'] != '') {
2029
+            $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2030
+    }
2030 2031
     /** This action is documented in geodirectory_template_actions.php */
2031 2032
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2032 2033
     /** This action is documented in geodirectory_template_actions.php */
@@ -2038,7 +2039,7 @@  discard block
 block discarded – undo
2038 2039
         $gd_page = 'add-listing';
2039 2040
         if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2040 2041
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2041
-        }elseif(isset($listing_type)){
2042
+        } elseif(isset($listing_type)){
2042 2043
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2043 2044
         }
2044 2045
 
@@ -2321,8 +2322,9 @@  discard block
 block discarded – undo
2321 2322
         $totImg = 0;
2322 2323
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2323 2324
             $post = (object)$gd_session->get('listing');
2324
-            if (isset($post->post_images))
2325
-                $curImages = trim($post->post_images, ",");
2325
+            if (isset($post->post_images)) {
2326
+                            $curImages = trim($post->post_images, ",");
2327
+            }
2326 2328
 
2327 2329
 
2328 2330
             if ($curImages != '') {
@@ -2350,10 +2352,13 @@  discard block
 block discarded – undo
2350 2352
             $totImg = count((array)$thumb_img_arr);
2351 2353
         }
2352 2354
 
2353
-        if ($curImages != '')
2354
-            $svalue = $curImages; // this will be initial value of the above form field. Image urls.
2355
-        else
2356
-            $svalue = '';
2355
+        if ($curImages != '') {
2356
+                    $svalue = $curImages;
2357
+        }
2358
+        // this will be initial value of the above form field. Image urls.
2359
+        else {
2360
+                    $svalue = '';
2361
+        }
2357 2362
 
2358 2363
         $image_limit = $package_info->image_limit;
2359 2364
         $show_image_input_box = ($image_limit != '0');
@@ -2563,8 +2568,9 @@  discard block
 block discarded – undo
2563 2568
     </script><?php
2564 2569
 
2565 2570
     global $errors;
2566
-    if (isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'claim')
2567
-        $errors->add('claim_login', LOGIN_CLAIM);
2571
+    if (isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'claim') {
2572
+            $errors->add('claim_login', LOGIN_CLAIM);
2573
+    }
2568 2574
 
2569 2575
     if (!empty($errors)) {
2570 2576
         foreach ($errors as $errorsObj) {
@@ -2668,8 +2674,9 @@  discard block
 block discarded – undo
2668 2674
 
2669 2675
     if (!empty($term)) {
2670 2676
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
2671
-        if (!empty($current_term))
2672
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2677
+        if (!empty($current_term)) {
2678
+                    $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2679
+        }
2673 2680
     }
2674 2681
 
2675 2682
 
@@ -2687,7 +2694,7 @@  discard block
 block discarded – undo
2687 2694
         $gd_page = 'author';
2688 2695
         if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2689 2696
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2690
-        }else{
2697
+        } else{
2691 2698
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2692 2699
         }
2693 2700
 
Please login to merge, or discard this patch.
Spacing   +158 added lines, -158 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
@@ -1137,8 +1137,8 @@  discard block
 block discarded – undo
1137 1137
                 $post_term = trim($post_term);
1138 1138
 
1139 1139
                 $priority_location = false;
1140
-                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1141
-                    $term = get_term_by('name', $post_term, $post_type . '_tags');
1140
+                if ($insert_term = term_exists($post_term, $post_type.'_tags')) {
1141
+                    $term = get_term_by('name', $post_term, $post_type.'_tags');
1142 1142
                 } else {
1143 1143
                     $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1144 1144
                     $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
@@ -1148,10 +1148,10 @@  discard block
 block discarded – undo
1148 1148
                     $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1149 1149
                     if ($match_country || $match_region || $match_city) {
1150 1150
                         $priority_location = true;
1151
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1151
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1152 1152
                     } else {
1153
-                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
1154
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1153
+                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
1154
+                        $term = get_term_by('name', $post_term, $post_type.'_tags');
1155 1155
                     }
1156 1156
                 }
1157 1157
 
@@ -1168,12 +1168,12 @@  discard block
 block discarded – undo
1168 1168
                          * @param string $tag_link The tag link html.
1169 1169
                          * @param object $term The tag term object.
1170 1170
                          */
1171
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1171
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1172 1172
                         $links[] = $tag_link;
1173 1173
                     } else {
1174
-                        $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1174
+                        $tag_link = "<a href='".esc_attr(get_term_link($term->term_id, $term->taxonomy))."'>$term->name</a>";
1175 1175
                         /** This action is documented in geodirectory-template_actions.php */
1176
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1176
+                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link', $tag_link, $term);
1177 1177
                         $links[] = $tag_link;
1178 1178
                     }
1179 1179
                     $terms[] = $term;
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
             if (!isset($listing_label)) {
1184 1184
                 $listing_label = '';
1185 1185
             }
1186
-            $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1186
+            $taxonomies[$post_type.'_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1187 1187
         endif;
1188 1188
 
1189 1189
     }
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
                     $term = get_term_by('id', $post_term, $post_taxonomy);
1212 1212
 
1213 1213
                     if (is_object($term)) {
1214
-                        $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1214
+                        $term_link = "<a href='".esc_attr(get_term_link($term, $post_taxonomy))."'>$term->name</a>";
1215 1215
                         /**
1216 1216
                          * Filter the category name on the details page.
1217 1217
                          *
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
                          * @param string $term_link The link html to the category.
1220 1220
                          * @param object $term The category term object.
1221 1221
                          */
1222
-                        $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1222
+                        $term_link = apply_filters('geodir_details_taxonomies_cat_link', $term_link, $term);
1223 1223
                         $links[] = $term_link;
1224 1224
                         $terms[] = $term;
1225 1225
                     }
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
         if (!isset($listing_label)) {
1238 1238
             $listing_label = '';
1239 1239
         }
1240
-        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1240
+        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object) $terms);
1241 1241
 
1242 1242
     }
1243 1243
 
@@ -1250,14 +1250,14 @@  discard block
 block discarded – undo
1250 1250
      * @param string $listing_label The post type label.
1251 1251
      * @param string $listing_label The post type label with ucwords function.
1252 1252
      */
1253
-    $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1253
+    $taxonomies = apply_filters('geodir_details_taxonomies_output', $taxonomies, $post_type, $listing_label, geodir_ucwords($listing_label));
1254 1254
 
1255 1255
     if (isset($taxonomies[$post_taxonomy])) {
1256
-        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1256
+        echo '<span class="geodir-category">'.$taxonomies[$post_taxonomy].'</span>';
1257 1257
     }
1258 1258
 
1259
-    if (isset($taxonomies[$post_type . '_tags']))
1260
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1259
+    if (isset($taxonomies[$post_type.'_tags']))
1260
+        echo '<span class="geodir-tags">'.$taxonomies[$post_type.'_tags'].'</span>';
1261 1261
 
1262 1262
     ?>
1263 1263
     </p><?php
@@ -1278,11 +1278,11 @@  discard block
 block discarded – undo
1278 1278
  * @param object $post Optional. The post object or blank.
1279 1279
  * @package GeoDirectory
1280 1280
  */
1281
-function geodir_action_details_micordata($post='')
1281
+function geodir_action_details_micordata($post = '')
1282 1282
 {
1283 1283
 
1284 1284
     global $preview;
1285
-    if(empty($post)){global $post;}
1285
+    if (empty($post)) {global $post; }
1286 1286
     if ($preview || !geodir_is_page('detail')) {
1287 1287
         return;
1288 1288
     }
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
                 "description" => $review->comment_content,
1304 1304
                 "reviewRating" => array(
1305 1305
                     "@type" => "Rating",
1306
-                    "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1306
+                    "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1307 1307
                     "ratingValue" => geodir_get_commentoverall($review->comment_ID),
1308 1308
                     "worstRating" => "1"
1309 1309
                 )
@@ -1331,13 +1331,13 @@  discard block
 block discarded – undo
1331 1331
     }
1332 1332
     //print_r($post);
1333 1333
     // external links
1334
-    $external_links =  array();
1334
+    $external_links = array();
1335 1335
     $external_links[] = $post->geodir_website;
1336 1336
     $external_links[] = $post->geodir_twitter;
1337 1337
     $external_links[] = $post->geodir_facebook;
1338 1338
     $external_links = array_filter($external_links);
1339 1339
 
1340
-    if(!empty($external_links)){
1340
+    if (!empty($external_links)) {
1341 1341
         $external_links = array_values($external_links);
1342 1342
     }
1343 1343
 
@@ -1347,17 +1347,17 @@  discard block
 block discarded – undo
1347 1347
 
1348 1348
     // schema type
1349 1349
     $schema_type = 'LocalBusiness';
1350
-    if(isset($post->default_category) && $post->default_category){
1350
+    if (isset($post->default_category) && $post->default_category) {
1351 1351
         $cat_schema = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1352
-        if($cat_schema){$schema_type = $cat_schema;}
1353
-        if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1352
+        if ($cat_schema) {$schema_type = $cat_schema; }
1353
+        if (!$schema_type && $post->post_type == 'gd_event') {$schema_type = 'Event'; }
1354 1354
     }
1355 1355
 
1356 1356
     $schema = array();
1357 1357
     $schema['@context'] = "http://schema.org";
1358 1358
     $schema['@type'] = $schema_type;
1359 1359
     $schema['name'] = $post->post_name;
1360
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1360
+    $schema['description'] = wp_strip_all_tags($post->post_content, true);
1361 1361
     $schema['telephone'] = $post->geodir_contact;
1362 1362
     $schema['url'] = $c_url;
1363 1363
     $schema['sameAs'] = $external_links;
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
         "postalCode" => $post->post_zip
1372 1372
     );
1373 1373
 
1374
-    if($post->post_latitude && $post->post_longitude) {
1374
+    if ($post->post_latitude && $post->post_longitude) {
1375 1375
         $schema['geo'] = array(
1376 1376
             "@type" => "GeoCoordinates",
1377 1377
             "latitude" => $post->post_latitude,
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
         );
1380 1380
     }
1381 1381
 
1382
-    if($post_avgratings) {
1382
+    if ($post_avgratings) {
1383 1383
         $schema['aggregateRating'] = array(
1384 1384
             "@type" => "AggregateRating",
1385 1385
             "ratingValue" => $post_avgratings,
@@ -1398,10 +1398,10 @@  discard block
 block discarded – undo
1398 1398
      * @param array $schema The array of schema data to be filtered.
1399 1399
      * @param object $post The post object.
1400 1400
      */
1401
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1401
+    $schema = apply_filters('geodir_details_schema', $schema, $post);
1402 1402
 
1403 1403
 
1404
-    echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1404
+    echo '<script type="application/ld+json">'.json_encode($schema).'</script>';
1405 1405
 
1406 1406
 }
1407 1407
 
@@ -1422,9 +1422,9 @@  discard block
 block discarded – undo
1422 1422
     ?>
1423 1423
     <div class="geodir-pos_navigation clearfix">
1424 1424
     <div
1425
-        class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
1425
+        class="geodir-post_left"><?php previous_post_link('%link', ''.__('Previous', 'geodirectory'), false) ?></div>
1426 1426
     <div
1427
-        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory') . '', false) ?></div>
1427
+        class="geodir-post_right"><?php next_post_link('%link', __('Next', 'geodirectory').'', false) ?></div>
1428 1428
     </div><?php
1429 1429
 }
1430 1430
 
@@ -1493,12 +1493,12 @@  discard block
 block discarded – undo
1493 1493
     $gd_post_type = geodir_get_current_posttype();
1494 1494
     $post_type_info = get_post_type_object($gd_post_type);
1495 1495
 
1496
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
1496
+    $add_string_in_title = __('All', 'geodirectory').' ';
1497 1497
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1498
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1498
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
1499 1499
     }
1500 1500
 
1501
-    $list_title = $add_string_in_title . __(ucfirst($post_type_info->labels->name), 'geodirectory');
1501
+    $list_title = $add_string_in_title.__(ucfirst($post_type_info->labels->name), 'geodirectory');
1502 1502
     $single_name = $post_type_info->labels->singular_name;
1503 1503
 
1504 1504
     $taxonomy = geodir_get_taxonomies($gd_post_type, true);
@@ -1526,12 +1526,12 @@  discard block
 block discarded – undo
1526 1526
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
1527 1527
         if (!empty($current_term)) {
1528 1528
             $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1529
-            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1529
+            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1530 1530
                 $location_last_char = substr($location_name, -1);
1531 1531
                 $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1532
-                $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1532
+                $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1533 1533
             } else {
1534
-                $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1534
+                $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1535 1535
             }
1536 1536
         } else {
1537 1537
             if (count($taxonomy) > 1) {
@@ -1539,12 +1539,12 @@  discard block
 block discarded – undo
1539 1539
 
1540 1540
                 if (!empty($current_term)) {
1541 1541
                     $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1542
-                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1542
+                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type.'category') {
1543 1543
                         $location_last_char = substr($location_name, -1);
1544 1544
                         $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1545
-                        $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1545
+                        $list_title .= __(' in', 'geodirectory').' '.$location_name.$location_name_attach.' '.$current_term_name;
1546 1546
                     } else {
1547
-                        $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1547
+                        $list_title .= __(' in', 'geodirectory')." '".$current_term_name."'";
1548 1548
                     }
1549 1549
                 }
1550 1550
             }
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
                 $gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1573 1573
             }
1574 1574
 
1575
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1575
+            $list_title .= __(' in', 'geodirectory')." '".$gd_city."'";
1576 1576
         } else if ($gd_region != '') {
1577 1577
             if ($gd_region_actual != '') {
1578 1578
                 $gd_region = $gd_region_actual;
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
                 $gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1583 1583
             }
1584 1584
 
1585
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1585
+            $list_title .= __(' in', 'geodirectory')." '".$gd_region."'";
1586 1586
         } else if ($gd_country != '') {
1587 1587
             if ($gd_country_actual != '') {
1588 1588
                 $gd_country = $gd_country_actual;
@@ -1592,12 +1592,12 @@  discard block
 block discarded – undo
1592 1592
                 $gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1593 1593
             }
1594 1594
 
1595
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1595
+            $list_title .= __(' in', 'geodirectory')." '".$gd_country."'";
1596 1596
         }
1597 1597
     }
1598 1598
 
1599 1599
     if (is_search()) {
1600
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1600
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
1601 1601
     }
1602 1602
     /** This action is documented in geodirectory_template_actions.php */
1603 1603
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
@@ -1606,26 +1606,26 @@  discard block
 block discarded – undo
1606 1606
 
1607 1607
 
1608 1608
     $title = $list_title;
1609
-    if(geodir_is_page('pt')){
1609
+    if (geodir_is_page('pt')) {
1610 1610
         $gd_page = 'pt';
1611
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1611
+        $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1612 1612
     }
1613
-    elseif(geodir_is_page('listing')){
1613
+    elseif (geodir_is_page('listing')) {
1614 1614
         $gd_page = 'listing';
1615 1615
         global $wp_query;
1616 1616
         $current_term = $wp_query->get_queried_object();
1617
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1617
+        if (strpos($current_term->taxonomy, '_tags') !== false) {
1618 1618
             $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1619
-        }else{
1619
+        } else {
1620 1620
             $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1621 1621
         }
1622 1622
 
1623 1623
     }
1624
-    elseif(geodir_is_page('author')){
1624
+    elseif (geodir_is_page('author')) {
1625 1625
         $gd_page = 'author';
1626
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1626
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1627 1627
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1628
-        }else{
1628
+        } else {
1629 1629
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1630 1630
         }
1631 1631
 
@@ -1639,16 +1639,16 @@  discard block
 block discarded – undo
1639 1639
      * @param string $title The page title including variables.
1640 1640
      * @param string $gd_page The GeoDirectory page type if any.
1641 1641
      */
1642
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1642
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1643 1643
 
1644
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1644
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
1645 1645
         /**
1646 1646
          * Filter the listing page title.
1647 1647
          *
1648 1648
          * @since 1.0.0
1649 1649
          * @param string $list_title The title for the category page.
1650 1650
          */
1651
-        apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1651
+        apply_filters('geodir_listing_page_title', $title).'</h1></header>';
1652 1652
 }
1653 1653
 
1654 1654
 add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
     $gd_post_type = geodir_get_current_posttype();
1668 1668
     if (isset($current_term->term_id) && $current_term->term_id != '') {
1669 1669
 
1670
-        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1670
+        $term_desc = term_description($current_term->term_id, $gd_post_type.'_tags');
1671 1671
         $saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1672 1672
         if ($term_desc && !$saved_data) {
1673 1673
             $saved_data = $term_desc;
@@ -1684,7 +1684,7 @@  discard block
 block discarded – undo
1684 1684
         if ($cat_description) {
1685 1685
             ?>
1686 1686
 
1687
-            <div class="term_description"><?php echo $cat_description;?></div> <?php
1687
+            <div class="term_description"><?php echo $cat_description; ?></div> <?php
1688 1688
         }
1689 1689
 
1690 1690
     }
@@ -1734,13 +1734,13 @@  discard block
 block discarded – undo
1734 1734
 function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
1735 1735
 {
1736 1736
     if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1737
-        $width_css = 'style="width:' . $width . '%;"';
1737
+        $width_css = 'style="width:'.$width.'%;"';
1738 1738
     } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1739
-        $width_css = 'style="width:' . $width . '%;"';
1739
+        $width_css = 'style="width:'.$width.'%;"';
1740 1740
     } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1741
-        $width_css = 'style="width:' . $width . '%;"';
1741
+        $width_css = 'style="width:'.$width.'%;"';
1742 1742
     } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1743
-        $width_css = 'style="width:' . $width . '%;"';
1743
+        $width_css = 'style="width:'.$width.'%;"';
1744 1744
     } else {
1745 1745
         $width_css = '';
1746 1746
     }
@@ -2045,11 +2045,11 @@  discard block
 block discarded – undo
2045 2045
 
2046 2046
     $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2047 2047
 
2048
-    if(geodir_is_page('add-listing')){
2048
+    if (geodir_is_page('add-listing')) {
2049 2049
         $gd_page = 'add-listing';
2050
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2050
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2051 2051
             $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2052
-        }elseif(isset($listing_type)){
2052
+        }elseif (isset($listing_type)) {
2053 2053
             $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2054 2054
         }
2055 2055
 
@@ -2063,9 +2063,9 @@  discard block
 block discarded – undo
2063 2063
      * @param string $title The page title including variables.
2064 2064
      * @param string $gd_page The GeoDirectory page type if any.
2065 2065
      */
2066
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2066
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2067 2067
 
2068
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2068
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">';
2069 2069
     echo $title;
2070 2070
     echo '</h1></header>';
2071 2071
 }
@@ -2079,7 +2079,7 @@  discard block
 block discarded – undo
2079 2079
  */
2080 2080
 function geodir_action_add_listing_page_mandatory()
2081 2081
 {?>
2082
-    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT;?></p>
2082
+    <p class="geodir-note "><span class="geodir-required">*</span>&nbsp;<?php echo INDICATES_MANDATORY_FIELDS_TEXT; ?></p>
2083 2083
 <?php
2084 2084
 }
2085 2085
 
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
 
2115 2115
     if (isset($_REQUEST['backandedit'])) {
2116 2116
         global $post;
2117
-        $post = (object)$gd_session->get('listing');
2117
+        $post = (object) $gd_session->get('listing');
2118 2118
         $listing_type = $post->listing_type;
2119 2119
         $title = $post->post_title;
2120 2120
         $desc = $post->post_desc;
@@ -2129,7 +2129,7 @@  discard block
 block discarded – undo
2129 2129
         $thumb_img_arr = geodir_get_images($post->ID);
2130 2130
         if ($thumb_img_arr) {
2131 2131
             foreach ($thumb_img_arr as $post_img) {
2132
-                $curImages .= $post_img->src . ',';
2132
+                $curImages .= $post_img->src.',';
2133 2133
             }
2134 2134
         }
2135 2135
 
@@ -2137,7 +2137,7 @@  discard block
 block discarded – undo
2137 2137
         $title = $post->post_title;
2138 2138
         $desc = $post->post_content;
2139 2139
         $kw_tags = $post->post_tags;
2140
-        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2140
+        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type.'_tags', array('fields' => 'names')));
2141 2141
     } else {
2142 2142
         $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2143 2143
     }
@@ -2150,20 +2150,20 @@  discard block
 block discarded – undo
2150 2150
 
2151 2151
     print_r($post_type_info);
2152 2152
 
2153
-    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing','geodirectory');
2153
+    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing', 'geodirectory');
2154 2154
 
2155 2155
 
2156 2156
 
2157 2157
     ?>
2158
-    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2159
-        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2160
-        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
2158
+    <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id()); ?>" method="post" enctype="multipart/form-data">
2159
+        <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2160
+        <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type); ?>"/>
2161 2161
         <?php if ($page_id) { ?>
2162
-        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id;?>"/>
2162
+        <input type="hidden" name="add_listing_page_id" value="<?php echo $page_id; ?>"/>
2163 2163
         <?php } if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?>
2164
-            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']);?>"/>
2164
+            <input type="hidden" name="pid" value="<?php echo sanitize_text_field($_REQUEST['pid']); ?>"/>
2165 2165
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2166
-            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2166
+            <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']); ?>"/>
2167 2167
         <?php
2168 2168
         } 
2169 2169
         /**
@@ -2175,7 +2175,7 @@  discard block
 block discarded – undo
2175 2175
          */
2176 2176
         do_action('geodir_before_detail_fields');
2177 2177
         ?>
2178
-        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2178
+        <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT; ?></h5>
2179 2179
         <?php
2180 2180
         /**
2181 2181
          * Called at the top of the add listing page form for frontend.
@@ -2187,10 +2187,10 @@  discard block
 block discarded – undo
2187 2187
         do_action('geodir_before_main_form_fields');
2188 2188
         ?>
2189 2189
         <div id="geodir_post_title_row" class="required_field geodir_form_row clearfix gd-fieldset-details">
2190
-            <label><?php echo sprintf( __('%s Title', 'geodirectory'), $cpt_singular_name ); ?><span>*</span> </label>
2190
+            <label><?php echo sprintf(__('%s Title', 'geodirectory'), $cpt_singular_name); ?><span>*</span> </label>
2191 2191
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
2192 2192
                    value="<?php echo esc_attr(stripslashes($title)); ?>"/>
2193
-            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2193
+            <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory'); ?></span>
2194 2194
         </div>
2195 2195
         <?php
2196 2196
         $show_editor = get_option('geodir_tiny_editor_on_add_listing');
@@ -2225,7 +2225,7 @@  discard block
 block discarded – undo
2225 2225
         $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2226 2226
         
2227 2227
         $desc_class = '';
2228
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2228
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2229 2229
             /**
2230 2230
              * Called on the add listing page form for frontend just before the description field.
2231 2231
              *
@@ -2238,8 +2238,8 @@  discard block
 block discarded – undo
2238 2238
             $desc_class = ' hidden';
2239 2239
         }
2240 2240
         ?>
2241
-        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2242
-            <label><?php echo sprintf( __('%s Description', 'geodirectory'), $cpt_singular_name ); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2241
+        <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class; ?>">
2242
+            <label><?php echo sprintf(__('%s Description', 'geodirectory'), $cpt_singular_name); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2243 2243
             <?php
2244 2244
             if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2245 2245
                 $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
@@ -2248,16 +2248,16 @@  discard block
 block discarded – undo
2248 2248
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2249 2249
                 </div>
2250 2250
             <?php if ($desc_limit != '') { ?>
2251
-                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit;?>");</script>
2251
+                <script type="text/javascript">jQuery('textarea#post_desc').attr('maxlength', "<?php echo $desc_limit; ?>");</script>
2252 2252
             <?php } } else { ?>
2253 2253
                 <textarea field_type="textarea" name="post_desc" id="post_desc" class="geodir_textarea" maxlength="<?php echo $desc_limit; ?>"><?php echo $desc; ?></textarea>
2254 2254
             <?php } if ($desc_limit_msg != '') { ?>
2255 2255
                 <span class="geodir_message_note"><?php echo $desc_limit_msg; ?></span>
2256 2256
             <?php } ?>
2257
-            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2257
+            <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory'); ?></span>
2258 2258
         </div>
2259 2259
         <?php
2260
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2260
+        if ($desc_limit === '' || (int) $desc_limit > 0) {
2261 2261
             /**
2262 2262
              * Called on the add listing page form for frontend just after the description field.
2263 2263
              *
@@ -2296,7 +2296,7 @@  discard block
 block discarded – undo
2296 2296
         $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2297 2297
         
2298 2298
         $tags_class = '';
2299
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2299
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2300 2300
             /**
2301 2301
              * Called on the add listing page form for frontend just before the tags field.
2302 2302
              *
@@ -2307,14 +2307,14 @@  discard block
 block discarded – undo
2307 2307
             $tags_class = ' hidden';
2308 2308
         }
2309 2309
         ?>
2310
-        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2310
+        <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class; ?>">
2311 2311
             <label><?php echo TAGKW_TEXT; ?></label>
2312 2312
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
2313
-                   maxlength="<?php echo $kw_tags_count;?>"/>
2314
-            <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2313
+                   maxlength="<?php echo $kw_tags_count; ?>"/>
2314
+            <span class="geodir_message_note"><?php echo $kw_tags_msg; ?></span>
2315 2315
         </div>
2316 2316
         <?php
2317
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2317
+        if ($kw_tags_count === '' || (int) $kw_tags_count > 0) {
2318 2318
             /**
2319 2319
              * Called on the add listing page form for frontend just after the tags field.
2320 2320
              *
@@ -2340,7 +2340,7 @@  discard block
 block discarded – undo
2340 2340
         $thumb_img_arr = array();
2341 2341
         $totImg = 0;
2342 2342
         if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2343
-            $post = (object)$gd_session->get('listing');
2343
+            $post = (object) $gd_session->get('listing');
2344 2344
             if (isset($post->post_images))
2345 2345
                 $curImages = trim($post->post_images, ",");
2346 2346
 
@@ -2353,7 +2353,7 @@  discard block
 block discarded – undo
2353 2353
             $listing_type = $post->listing_type;
2354 2354
 
2355 2355
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2356
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2356
+            $post = geodir_get_post_info((int) $_REQUEST['pid']);
2357 2357
             $listing_type = $post->post_type;
2358 2358
             $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2359 2359
 
@@ -2367,7 +2367,7 @@  discard block
 block discarded – undo
2367 2367
                 //$curImages = $img->src.",";
2368 2368
             }
2369 2369
 
2370
-            $totImg = count((array)$thumb_img_arr);
2370
+            $totImg = count((array) $thumb_img_arr);
2371 2371
         }
2372 2372
 
2373 2373
         if ($curImages != '')
@@ -2388,15 +2388,15 @@  discard block
 block discarded – undo
2388 2388
         if ($show_image_input_box) {
2389 2389
             ?>
2390 2390
 
2391
-            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2391
+            <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT; ?>
2392 2392
                 <?php if ($image_limit == 1) {
2393
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2393
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('image with this package', 'geodirectory').')</small>';
2394 2394
                 } ?>
2395 2395
                 <?php if ($image_limit > 1) {
2396
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2396
+                    echo '<br /><small>('.__('You can upload', 'geodirectory').' '.$image_limit.' '.__('images with this package', 'geodirectory').')</small>';
2397 2397
                 } ?>
2398 2398
                 <?php if ($image_limit == '') {
2399
-                    echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2399
+                    echo '<br /><small>('.__('You can upload unlimited images with this package', 'geodirectory').')</small>';
2400 2400
                 } ?>
2401 2401
             </h5>
2402 2402
 
@@ -2411,11 +2411,11 @@  discard block
 block discarded – undo
2411 2411
                 <div
2412 2412
                     class="plupload-upload-uic hide-if-no-js <?php if ($multiple): ?>plupload-upload-uic-multiple<?php endif; ?>"
2413 2413
                     id="<?php echo $id; ?>plupload-upload-ui">
2414
-                    <h4><?php _e('Drop files to upload', 'geodirectory');?></h4><br/>
2414
+                    <h4><?php _e('Drop files to upload', 'geodirectory'); ?></h4><br/>
2415 2415
                     <input id="<?php echo $id; ?>plupload-browse-button" type="button"
2416 2416
                            value="<?php esc_attr_e('Select Files', 'geodirectory'); ?>" class="geodir_button"/>
2417 2417
                     <span class="ajaxnonceplu"
2418
-                          id="ajaxnonceplu<?php echo wp_create_nonce($id . 'pluploadan'); ?>"></span>
2418
+                          id="ajaxnonceplu<?php echo wp_create_nonce($id.'pluploadan'); ?>"></span>
2419 2419
                     <?php if ($width && $height): ?>
2420 2420
                         <span class="plupload-resize"></span>
2421 2421
                         <span class="plupload-width" id="plupload-width<?php echo $width; ?>"></span>
@@ -2428,7 +2428,7 @@  discard block
 block discarded – undo
2428 2428
                      id="<?php echo $id; ?>plupload-thumbs" style="border-top:1px solid #ccc; padding-top:10px;">
2429 2429
                 </div>
2430 2430
                 <span
2431
-                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory');?></span>
2431
+                    id="upload-msg"><?php _e('Please drag &amp; drop the images to rearrange the order', 'geodirectory'); ?></span>
2432 2432
                 <span id="<?php echo $id; ?>upload-error" style="display:none"></span>
2433 2433
             </div>
2434 2434
 
@@ -2440,7 +2440,7 @@  discard block
 block discarded – undo
2440 2440
          *
2441 2441
          * @since 1.0.0
2442 2442
          */
2443
-        do_action('geodir_after_main_form_fields');?>
2443
+        do_action('geodir_after_main_form_fields'); ?>
2444 2444
 
2445 2445
 
2446 2446
         <!-- add captcha code -->
@@ -2451,7 +2451,7 @@  discard block
 block discarded – undo
2451 2451
         </script>
2452 2452
         <noscript>
2453 2453
             <div>
2454
-                <label><?php _e('Type 64 into this box', 'geodirectory');?></label>
2454
+                <label><?php _e('Type 64 into this box', 'geodirectory'); ?></label>
2455 2455
                 <input type="text" id="geodir_spamblocker_top_form" name="geodir_spamblocker" value="" maxlength="10"/>
2456 2456
             </div>
2457 2457
         </noscript>
@@ -2461,10 +2461,10 @@  discard block
 block discarded – undo
2461 2461
         <!-- end captcha code -->
2462 2462
 
2463 2463
         <div id="geodir-add-listing-submit" class="geodir_form_row clear_both" style="padding:2px;text-align:center;">
2464
-            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON;?>"
2465
-                   class="geodir_button" <?php echo $submit_button;?>/>
2464
+            <input type="submit" value="<?php echo PRO_PREVIEW_BUTTON; ?>"
2465
+                   class="geodir_button" <?php echo $submit_button; ?>/>
2466 2466
             <span class="geodir_message_note"
2467
-                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory');?></span>
2467
+                  style="padding-left:0px;"> <?php _e('Note: You will be able to see a preview in the next page', 'geodirectory'); ?></span>
2468 2468
         </div>
2469 2469
 
2470 2470
     </form>
@@ -2526,7 +2526,7 @@  discard block
 block discarded – undo
2526 2526
         class="<?php
2527 2527
         /** This action is documented in geodirectory_template_actions.php */
2528 2528
         echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2529
-        <?php dynamic_sidebar('Reg/Login Top Section');?>
2529
+        <?php dynamic_sidebar('Reg/Login Top Section'); ?>
2530 2530
     </div><!-- clearfix ends here-->
2531 2531
 <?php
2532 2532
 }
@@ -2548,7 +2548,7 @@  discard block
 block discarded – undo
2548 2548
 
2549 2549
     ?>
2550 2550
     <script type="text/javascript">
2551
-        <?php if ( $user_login ) { ?>
2551
+        <?php if ($user_login) { ?>
2552 2552
         setTimeout(function () {
2553 2553
             try {
2554 2554
                 d = document.getElementById('user_pass');
@@ -2565,7 +2565,7 @@  discard block
 block discarded – undo
2565 2565
         <?php } ?>
2566 2566
     </script>
2567 2567
     <script type="text/javascript">
2568
-        <?php if ( $user_login ) { ?>
2568
+        <?php if ($user_login) { ?>
2569 2569
         setTimeout(function () {
2570 2570
             try {
2571 2571
                 d = document.getElementById('user_pass');
@@ -2590,7 +2590,7 @@  discard block
 block discarded – undo
2590 2590
         foreach ($errors as $errorsObj) {
2591 2591
             foreach ($errorsObj as $key => $val) {
2592 2592
                 for ($i = 0; $i < count($val); $i++) {
2593
-                    echo "<div class=sucess_msg>" . $val[$i] . '</div>';
2593
+                    echo "<div class=sucess_msg>".$val[$i].'</div>';
2594 2594
                     $registration_error_msg = 1;
2595 2595
                 }
2596 2596
             }
@@ -2607,7 +2607,7 @@  discard block
 block discarded – undo
2607 2607
              *
2608 2608
              * @since 1.0.0
2609 2609
              */
2610
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2610
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2611 2611
         </div>
2612 2612
 
2613 2613
     <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up') { ?>
@@ -2619,7 +2619,7 @@  discard block
 block discarded – undo
2619 2619
              *
2620 2620
              * @since 1.0.0
2621 2621
              */
2622
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2622
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2623 2623
         </div>
2624 2624
 
2625 2625
     <?php } else { ?>
@@ -2631,7 +2631,7 @@  discard block
 block discarded – undo
2631 2631
              *
2632 2632
              * @since 1.0.0
2633 2633
              */
2634
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2634
+            include(geodir_plugin_path()."/geodirectory-templates/login_frm.php"); ?>
2635 2635
         </div>
2636 2636
         <div class="registration_form_r">
2637 2637
             <?php
@@ -2640,7 +2640,7 @@  discard block
 block discarded – undo
2640 2640
              *
2641 2641
              * @since 1.0.0
2642 2642
              */
2643
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2643
+            include(geodir_plugin_path()."/geodirectory-templates/reg_frm.php"); ?>
2644 2644
         </div>
2645 2645
 
2646 2646
     <?php }?>
@@ -2676,12 +2676,12 @@  discard block
 block discarded – undo
2676 2676
     $gd_post_type = geodir_get_current_posttype();
2677 2677
     $post_type_info = get_post_type_object($gd_post_type);
2678 2678
 
2679
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
2679
+    $add_string_in_title = __('All', 'geodirectory').' ';
2680 2680
     if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2681
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2681
+        $add_string_in_title = __('My Favorite', 'geodirectory').' ';
2682 2682
     }
2683 2683
 
2684
-    $list_title = $add_string_in_title . $post_type_info->labels->name;
2684
+    $list_title = $add_string_in_title.$post_type_info->labels->name;
2685 2685
     $single_name = $post_type_info->labels->singular_name;
2686 2686
 
2687 2687
     $taxonomy = geodir_get_taxonomies($gd_post_type);
@@ -2689,12 +2689,12 @@  discard block
 block discarded – undo
2689 2689
     if (!empty($term)) {
2690 2690
         $current_term = get_term_by('slug', $term, $taxonomy[0]);
2691 2691
         if (!empty($current_term))
2692
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2692
+            $list_title .= __(' in', 'geodirectory')." '".geodir_ucwords($current_term->name)."'";
2693 2693
     }
2694 2694
 
2695 2695
 
2696 2696
     if (is_search()) {
2697
-        $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2697
+        $list_title = __('Search', 'geodirectory').' '.__($post_type_info->labels->name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2698 2698
 
2699 2699
     }
2700 2700
     /** This action is documented in geodirectory_template_actions.php */
@@ -2703,11 +2703,11 @@  discard block
 block discarded – undo
2703 2703
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2704 2704
 
2705 2705
     $title = $list_title;
2706
-    if(geodir_is_page('author')){
2706
+    if (geodir_is_page('author')) {
2707 2707
         $gd_page = 'author';
2708
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2708
+        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2709 2709
             $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2710
-        }else{
2710
+        } else {
2711 2711
             $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2712 2712
         }
2713 2713
 
@@ -2721,16 +2721,16 @@  discard block
 block discarded – undo
2721 2721
      * @param string $title The page title including variables.
2722 2722
      * @param string $gd_page The GeoDirectory page type if any.
2723 2723
      */
2724
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2724
+    $title = apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2725 2725
 
2726
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2726
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2727 2727
         /**
2728 2728
          * Filter the author page title text.
2729 2729
          *
2730 2730
          * @since 1.0.0
2731 2731
          * @param string $list_title The title for the page.
2732 2732
          */
2733
-        apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2733
+        apply_filters('geodir_author_page_title_text', $title).'</h1></header>';
2734 2734
 }
2735 2735
 
2736 2736
 
@@ -2935,19 +2935,19 @@  discard block
 block discarded – undo
2935 2935
     $post_type_info = get_post_type_object($gd_post_type);
2936 2936
 
2937 2937
     $pt_name = '';
2938
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2938
+    if (isset($post_type_info->labels->name)) {$pt_name = $post_type_info->labels->name; }
2939 2939
 
2940 2940
     if (is_search()) {
2941
-        $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2941
+        $list_title = __('Search', 'geodirectory').' '.__($pt_name, 'geodirectory').__(' For :', 'geodirectory')." '".get_search_query()."'";
2942 2942
 
2943 2943
     }
2944 2944
     /** This action is documented in geodirectory_template_actions.php */
2945 2945
     $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2946 2946
     /** This action is documented in geodirectory_template_actions.php */
2947 2947
     $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2948
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2948
+    echo '<header class="'.$class_header.'"><h1 class="'.$class.'">'.
2949 2949
         /** This action is documented in geodirectory_template_actions.php */
2950
-        apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
2950
+        apply_filters('geodir_listing_page_title', wptexturize($list_title)).'</h1></header>';
2951 2951
 }
2952 2952
 
2953 2953
 // action for adding the listings page top widget area
@@ -3351,7 +3351,7 @@  discard block
 block discarded – undo
3351 3351
         $gd_post_type = geodir_get_current_posttype();
3352 3352
         $post_type_info = get_post_type_object($gd_post_type);
3353 3353
 
3354
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3354
+        $list_title = __('Search', 'geodirectory').' '.__(ucfirst($post_type_info->labels->name), 'geodirectory').__(' :', 'geodirectory');
3355 3355
     }
3356 3356
     return $list_title;
3357 3357
 }
@@ -3367,7 +3367,7 @@  discard block
 block discarded – undo
3367 3367
  * @param string $position Position to add the post content. 'before' or 'after'. Default 'before'.
3368 3368
  * @param string $gd_page The geodirectory page type. Default null.
3369 3369
  */
3370
-function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
3370
+function geodir_add_page_content($position = 'before', $gd_page = '') {
3371 3371
     global $post;
3372 3372
         
3373 3373
     $gd_page_id = NULL;
Please login to merge, or discard this patch.
Indentation   +1728 added lines, -1728 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
  */
18 18
 function gd_compat_styles()
19 19
 {
20
-    $tc = get_option('theme_compatibility_setting');
21
-    echo "<style id='gd-compat-styles' type='text/css'>";
22
-    echo $tc['geodir_theme_compat_css'];
23
-    echo "</style>";
20
+	$tc = get_option('theme_compatibility_setting');
21
+	echo "<style id='gd-compat-styles' type='text/css'>";
22
+	echo $tc['geodir_theme_compat_css'];
23
+	echo "</style>";
24 24
 }
25 25
 
26 26
 /**
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
  */
32 32
 function gd_compat_script()
33 33
 {
34
-    $tc = get_option('theme_compatibility_setting');
35
-    echo "<script>";
36
-    echo $tc['geodir_theme_compat_js'];
37
-    echo " </script>";
34
+	$tc = get_option('theme_compatibility_setting');
35
+	echo "<script>";
36
+	echo $tc['geodir_theme_compat_js'];
37
+	echo " </script>";
38 38
 }
39 39
 
40 40
 /**
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
  */
48 48
 function geodir_top_content_add_dynamic()
49 49
 {
50
-    $tc = get_option('theme_compatibility_setting');
51
-    echo $tc['geodir_top_content_add'];
50
+	$tc = get_option('theme_compatibility_setting');
51
+	echo $tc['geodir_top_content_add'];
52 52
 }
53 53
 
54 54
 /**
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
  */
62 62
 function geodir_before_main_content_add_dynamic()
63 63
 {
64
-    $tc = get_option('theme_compatibility_setting');
65
-    echo $tc['geodir_before_main_content_add'];
64
+	$tc = get_option('theme_compatibility_setting');
65
+	echo $tc['geodir_before_main_content_add'];
66 66
 }
67 67
 
68 68
 /**
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
  */
76 76
 function geodir_full_page_class_dynamic()
77 77
 {
78
-    $tc = get_option('theme_compatibility_setting');
79
-    return $tc['geodir_full_page_class_filter'];
78
+	$tc = get_option('theme_compatibility_setting');
79
+	return $tc['geodir_full_page_class_filter'];
80 80
 }
81 81
 
82 82
 /**
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
  */
90 90
 function geodir_before_widget_dynamic()
91 91
 {
92
-    $tc = get_option('theme_compatibility_setting');
93
-    return $tc['geodir_before_widget_filter'];
92
+	$tc = get_option('theme_compatibility_setting');
93
+	return $tc['geodir_before_widget_filter'];
94 94
 }
95 95
 
96 96
 /**
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
  */
104 104
 function geodir_after_widget_dynamic()
105 105
 {
106
-    $tc = get_option('theme_compatibility_setting');
107
-    return $tc['geodir_after_widget_filter'];
106
+	$tc = get_option('theme_compatibility_setting');
107
+	return $tc['geodir_after_widget_filter'];
108 108
 }
109 109
 
110 110
 /**
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
  */
118 118
 function geodir_before_title_dynamic()
119 119
 {
120
-    $tc = get_option('theme_compatibility_setting');
121
-    return $tc['geodir_before_title_filter'];
120
+	$tc = get_option('theme_compatibility_setting');
121
+	return $tc['geodir_before_title_filter'];
122 122
 }
123 123
 
124 124
 /**
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
  */
132 132
 function geodir_after_title_dynamic()
133 133
 {
134
-    $tc = get_option('theme_compatibility_setting');
135
-    return $tc['geodir_after_title_filter'];
134
+	$tc = get_option('theme_compatibility_setting');
135
+	return $tc['geodir_after_title_filter'];
136 136
 }
137 137
 
138 138
 /**
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
  */
146 146
 function geodir_menu_li_class_dynamic()
147 147
 {
148
-    $tc = get_option('theme_compatibility_setting');
149
-    return $tc['geodir_menu_li_class_filter'];
148
+	$tc = get_option('theme_compatibility_setting');
149
+	return $tc['geodir_menu_li_class_filter'];
150 150
 }
151 151
 
152 152
 /**
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
  */
160 160
 function geodir_sub_menu_ul_class_dynamic()
161 161
 {
162
-    $tc = get_option('theme_compatibility_setting');
163
-    return $tc['geodir_sub_menu_ul_class_filter'];
162
+	$tc = get_option('theme_compatibility_setting');
163
+	return $tc['geodir_sub_menu_ul_class_filter'];
164 164
 }
165 165
 
166 166
 /**
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
  */
174 174
 function geodir_sub_menu_li_class_dynamic()
175 175
 {
176
-    $tc = get_option('theme_compatibility_setting');
177
-    return $tc['geodir_sub_menu_li_class_filter'];
176
+	$tc = get_option('theme_compatibility_setting');
177
+	return $tc['geodir_sub_menu_li_class_filter'];
178 178
 }
179 179
 
180 180
 /**
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
  */
188 188
 function geodir_menu_a_class_dynamic()
189 189
 {
190
-    $tc = get_option('theme_compatibility_setting');
191
-    return $tc['geodir_menu_a_class_filter'];
190
+	$tc = get_option('theme_compatibility_setting');
191
+	return $tc['geodir_menu_a_class_filter'];
192 192
 }
193 193
 
194 194
 /**
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
  */
202 202
 function geodir_sub_menu_a_class_dynamic()
203 203
 {
204
-    $tc = get_option('theme_compatibility_setting');
205
-    return $tc['geodir_sub_menu_a_class_filter'];
204
+	$tc = get_option('theme_compatibility_setting');
205
+	return $tc['geodir_sub_menu_a_class_filter'];
206 206
 }
207 207
 
208 208
 /**
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
  */
216 216
 function geodir_location_switcher_menu_li_class_dynamic()
217 217
 {
218
-    $tc = get_option('theme_compatibility_setting');
219
-    return $tc['geodir_location_switcher_menu_li_class_filter'];
218
+	$tc = get_option('theme_compatibility_setting');
219
+	return $tc['geodir_location_switcher_menu_li_class_filter'];
220 220
 }
221 221
 
222 222
 /**
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
  */
230 230
 function geodir_location_switcher_menu_a_class_dynamic()
231 231
 {
232
-    $tc = get_option('theme_compatibility_setting');
233
-    return $tc['geodir_location_switcher_menu_a_class_filter'];
232
+	$tc = get_option('theme_compatibility_setting');
233
+	return $tc['geodir_location_switcher_menu_a_class_filter'];
234 234
 }
235 235
 
236 236
 /**
@@ -243,8 +243,8 @@  discard block
 block discarded – undo
243 243
  */
244 244
 function geodir_location_switcher_menu_sub_ul_class_dynamic()
245 245
 {
246
-    $tc = get_option('theme_compatibility_setting');
247
-    return $tc['geodir_location_switcher_menu_sub_ul_class_filter'];
246
+	$tc = get_option('theme_compatibility_setting');
247
+	return $tc['geodir_location_switcher_menu_sub_ul_class_filter'];
248 248
 }
249 249
 
250 250
 /**
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
  */
258 258
 function geodir_location_switcher_menu_sub_li_class_dynamic()
259 259
 {
260
-    $tc = get_option('theme_compatibility_setting');
261
-    return $tc['geodir_location_switcher_menu_sub_li_class_filter'];
260
+	$tc = get_option('theme_compatibility_setting');
261
+	return $tc['geodir_location_switcher_menu_sub_li_class_filter'];
262 262
 }
263 263
 
264 264
 
@@ -275,106 +275,106 @@  discard block
 block discarded – undo
275 275
 function geodir_content_actions_dynamic()
276 276
 {
277 277
 
278
-    $tc = get_option('theme_compatibility_setting');
279
-    if (empty($tc)) {
280
-        return;
281
-    }
278
+	$tc = get_option('theme_compatibility_setting');
279
+	if (empty($tc)) {
280
+		return;
281
+	}
282 282
 
283
-    //php
284
-    if (!empty($tc['geodir_theme_compat_code'])) {
285
-        include_once('geodirectory-functions/compatibility/' . $tc['geodir_theme_compat_code'] . '.php');
286
-    }
283
+	//php
284
+	if (!empty($tc['geodir_theme_compat_code'])) {
285
+		include_once('geodirectory-functions/compatibility/' . $tc['geodir_theme_compat_code'] . '.php');
286
+	}
287 287
 
288
-    //geodir_full_page_class
289
-    if (!empty($tc['geodir_full_page_class_filter'])) {
290
-        add_filter('geodir_full_page_class', 'geodir_full_page_class_dynamic', 10);
291
-    }
288
+	//geodir_full_page_class
289
+	if (!empty($tc['geodir_full_page_class_filter'])) {
290
+		add_filter('geodir_full_page_class', 'geodir_full_page_class_dynamic', 10);
291
+	}
292 292
 
293
-    //widget before filter
294
-    if (!empty($tc['geodir_before_widget_filter'])) {
295
-        add_filter('geodir_before_widget', 'geodir_before_widget_dynamic', 10);
296
-    }
293
+	//widget before filter
294
+	if (!empty($tc['geodir_before_widget_filter'])) {
295
+		add_filter('geodir_before_widget', 'geodir_before_widget_dynamic', 10);
296
+	}
297 297
 
298
-    //widget after filter
299
-    if (!empty($tc['geodir_after_widget_filter'])) {
300
-        add_filter('geodir_after_widget', 'geodir_after_widget_dynamic', 10);
301
-    }
298
+	//widget after filter
299
+	if (!empty($tc['geodir_after_widget_filter'])) {
300
+		add_filter('geodir_after_widget', 'geodir_after_widget_dynamic', 10);
301
+	}
302 302
 
303
-    //widget before title filter
304
-    if (!empty($tc['geodir_before_title_filter'])) {
305
-        add_filter('geodir_before_title', 'geodir_before_title_dynamic', 10);
306
-    }
303
+	//widget before title filter
304
+	if (!empty($tc['geodir_before_title_filter'])) {
305
+		add_filter('geodir_before_title', 'geodir_before_title_dynamic', 10);
306
+	}
307 307
 
308
-    //widget before title filter
309
-    if (!empty($tc['geodir_after_title_filter'])) {
310
-        add_filter('geodir_after_title', 'geodir_after_title_dynamic', 10);
311
-    }
308
+	//widget before title filter
309
+	if (!empty($tc['geodir_after_title_filter'])) {
310
+		add_filter('geodir_after_title', 'geodir_after_title_dynamic', 10);
311
+	}
312 312
 
313
-    //menu li class
314
-    if (!empty($tc['geodir_menu_li_class_filter'])) {
315
-        add_filter('geodir_menu_li_class', 'geodir_menu_li_class_dynamic', 10);
316
-    }
313
+	//menu li class
314
+	if (!empty($tc['geodir_menu_li_class_filter'])) {
315
+		add_filter('geodir_menu_li_class', 'geodir_menu_li_class_dynamic', 10);
316
+	}
317 317
 
318
-    //menu ul class
319
-    if (!empty($tc['geodir_sub_menu_ul_class_filter'])) {
320
-        add_filter('geodir_sub_menu_ul_class', 'geodir_sub_menu_ul_class_dynamic', 10);
321
-    }
318
+	//menu ul class
319
+	if (!empty($tc['geodir_sub_menu_ul_class_filter'])) {
320
+		add_filter('geodir_sub_menu_ul_class', 'geodir_sub_menu_ul_class_dynamic', 10);
321
+	}
322 322
 
323
-    //menu sub li class
324
-    if (!empty($tc['geodir_sub_menu_li_class_filter'])) {
325
-        add_filter('geodir_sub_menu_li_class', 'geodir_sub_menu_li_class_dynamic', 10);
326
-    }
323
+	//menu sub li class
324
+	if (!empty($tc['geodir_sub_menu_li_class_filter'])) {
325
+		add_filter('geodir_sub_menu_li_class', 'geodir_sub_menu_li_class_dynamic', 10);
326
+	}
327 327
 
328
-    //menu a class
329
-    if (!empty($tc['geodir_menu_a_class_filter'])) {
330
-        add_filter('geodir_menu_a_class', 'geodir_menu_a_class_dynamic', 10);
331
-    }
328
+	//menu a class
329
+	if (!empty($tc['geodir_menu_a_class_filter'])) {
330
+		add_filter('geodir_menu_a_class', 'geodir_menu_a_class_dynamic', 10);
331
+	}
332 332
 
333
-    //menu sub a class
334
-    if (!empty($tc['geodir_sub_menu_a_class_filter'])) {
335
-        add_filter('geodir_sub_menu_a_class', 'geodir_sub_menu_a_class_dynamic', 10);
336
-    }
333
+	//menu sub a class
334
+	if (!empty($tc['geodir_sub_menu_a_class_filter'])) {
335
+		add_filter('geodir_sub_menu_a_class', 'geodir_sub_menu_a_class_dynamic', 10);
336
+	}
337 337
 
338
-    //location menu li class
339
-    if (!empty($tc['geodir_location_switcher_menu_li_class_filter'])) {
340
-        add_filter('geodir_location_switcher_menu_li_class', 'geodir_location_switcher_menu_li_class_dynamic', 10);
341
-    }
338
+	//location menu li class
339
+	if (!empty($tc['geodir_location_switcher_menu_li_class_filter'])) {
340
+		add_filter('geodir_location_switcher_menu_li_class', 'geodir_location_switcher_menu_li_class_dynamic', 10);
341
+	}
342 342
 
343
-    //location menu sub ul class
344
-    if (!empty($tc['geodir_location_switcher_menu_sub_ul_class_filter'])) {
345
-        add_filter('geodir_location_switcher_menu_sub_ul_class', 'geodir_location_switcher_menu_sub_ul_class_dynamic', 10);
346
-    }
343
+	//location menu sub ul class
344
+	if (!empty($tc['geodir_location_switcher_menu_sub_ul_class_filter'])) {
345
+		add_filter('geodir_location_switcher_menu_sub_ul_class', 'geodir_location_switcher_menu_sub_ul_class_dynamic', 10);
346
+	}
347 347
 
348
-    //location menu sub li class
349
-    if (!empty($tc['geodir_location_switcher_menu_sub_li_class_filter'])) {
350
-        add_filter('geodir_location_switcher_menu_sub_li_class', 'geodir_location_switcher_menu_sub_li_class_dynamic', 10);
351
-    }
348
+	//location menu sub li class
349
+	if (!empty($tc['geodir_location_switcher_menu_sub_li_class_filter'])) {
350
+		add_filter('geodir_location_switcher_menu_sub_li_class', 'geodir_location_switcher_menu_sub_li_class_dynamic', 10);
351
+	}
352 352
 
353
-    //location menu a class
354
-    if (!empty($tc['geodir_location_switcher_menu_a_class_filter'])) {
355
-        add_filter('geodir_location_switcher_menu_a_class', 'geodir_location_switcher_menu_a_class_dynamic', 10);
356
-    }
353
+	//location menu a class
354
+	if (!empty($tc['geodir_location_switcher_menu_a_class_filter'])) {
355
+		add_filter('geodir_location_switcher_menu_a_class', 'geodir_location_switcher_menu_a_class_dynamic', 10);
356
+	}
357 357
 
358
-    // compat styles
359
-    if (!empty($tc['geodir_theme_compat_css'])) {
360
-        add_action('wp_head', 'gd_compat_styles');
361
-    }
358
+	// compat styles
359
+	if (!empty($tc['geodir_theme_compat_css'])) {
360
+		add_action('wp_head', 'gd_compat_styles');
361
+	}
362 362
 
363
-    // compat js
364
-    if (!empty($tc['geodir_theme_compat_js'])) {
365
-        add_action('wp_footer', 'gd_compat_script');
366
-    }
363
+	// compat js
364
+	if (!empty($tc['geodir_theme_compat_js'])) {
365
+		add_action('wp_footer', 'gd_compat_script');
366
+	}
367 367
 
368 368
 
369
-    // geodir_top_content_add
370
-    if (!empty($tc['geodir_top_content_add'])) {
371
-        add_action('geodir_top_content', 'geodir_top_content_add_dynamic', 10, 1);
372
-    }
369
+	// geodir_top_content_add
370
+	if (!empty($tc['geodir_top_content_add'])) {
371
+		add_action('geodir_top_content', 'geodir_top_content_add_dynamic', 10, 1);
372
+	}
373 373
 
374
-    // geodir_before_main_content_add
375
-    if (!empty($tc['geodir_before_main_content_add'])) {
376
-        add_action('geodir_before_main_content', 'geodir_before_main_content_add_dynamic', 10, 1);
377
-    }
374
+	// geodir_before_main_content_add
375
+	if (!empty($tc['geodir_before_main_content_add'])) {
376
+		add_action('geodir_before_main_content', 'geodir_before_main_content_add_dynamic', 10, 1);
377
+	}
378 378
 
379 379
 
380 380
 }
@@ -397,23 +397,23 @@  discard block
 block discarded – undo
397 397
  */
398 398
 function geodir_action_wrapper_open($type = '', $id = '', $class = '')
399 399
 {
400
-    $tc = get_option('theme_compatibility_setting');
401
-    if (!empty($tc['geodir_wrapper_open_replace'])) {
402
-        $text = $tc['geodir_wrapper_open_replace'];
403
-    } else {
404
-        $text = '<div id="[id]" class="[class]">';
405
-    }
400
+	$tc = get_option('theme_compatibility_setting');
401
+	if (!empty($tc['geodir_wrapper_open_replace'])) {
402
+		$text = $tc['geodir_wrapper_open_replace'];
403
+	} else {
404
+		$text = '<div id="[id]" class="[class]">';
405
+	}
406 406
 
407
-    if (!empty($tc['geodir_wrapper_open_id'])) {
408
-        $id = $tc['geodir_wrapper_open_id'];
409
-    }
410
-    if (!empty($tc['geodir_wrapper_open_class'])) {
411
-        $class = $tc['geodir_wrapper_open_class'];
412
-    }
407
+	if (!empty($tc['geodir_wrapper_open_id'])) {
408
+		$id = $tc['geodir_wrapper_open_id'];
409
+	}
410
+	if (!empty($tc['geodir_wrapper_open_class'])) {
411
+		$class = $tc['geodir_wrapper_open_class'];
412
+	}
413 413
 
414
-    $text = str_replace(array("[id]", "[class]"), array($id, $class), $text);
414
+	$text = str_replace(array("[id]", "[class]"), array($id, $class), $text);
415 415
 
416
-    echo $text;
416
+	echo $text;
417 417
 }
418 418
 
419 419
 // action for adding the wrapperdiv closing tag
@@ -428,14 +428,14 @@  discard block
 block discarded – undo
428 428
  */
429 429
 function geodir_action_wrapper_close($type = '')
430 430
 {
431
-    $tc = get_option('theme_compatibility_setting');
432
-    if (!empty($tc['geodir_wrapper_close_replace'])) {
433
-        $text = $tc['geodir_wrapper_close_replace'];
434
-    } else {
435
-        $text = '</div><!-- wrapper ends here-->';
436
-    }
431
+	$tc = get_option('theme_compatibility_setting');
432
+	if (!empty($tc['geodir_wrapper_close_replace'])) {
433
+		$text = $tc['geodir_wrapper_close_replace'];
434
+	} else {
435
+		$text = '</div><!-- wrapper ends here-->';
436
+	}
437 437
 
438
-    echo $text;
438
+	echo $text;
439 439
 }
440 440
 
441 441
 // action for adding the content div opening tag
@@ -451,35 +451,35 @@  discard block
 block discarded – undo
451 451
  */
452 452
 function geodir_action_wrapper_content_open($type = '', $id = '', $class = '')
453 453
 {
454
-    if ($type == 'home-page' && $width = get_option('geodir_width_home_contant_section')) {
455
-        $width_css = 'style="width:' . $width . '%;"';
456
-    } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_contant_section')) {
457
-        $width_css = 'style="width:' . $width . '%;"';
458
-    } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_contant_section')) {
459
-        $width_css = 'style="width:' . $width . '%;"';
460
-    } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_contant_section')) {
461
-        $width_css = 'style="width:' . $width . '%;"';
462
-    } else {
463
-        $width_css = '';
464
-    }
465
-
466
-    $tc = get_option('theme_compatibility_setting');
467
-    if (!empty($tc['geodir_wrapper_content_open_replace'])) {
468
-        $text = $tc['geodir_wrapper_content_open_replace'];
469
-    } else {
470
-        $text = '<div id="[id]" class="[class]" role="main" [width_css]>';
471
-    }
472
-
473
-    if (!empty($tc['geodir_wrapper_content_open_id'])) {
474
-        $id = $tc['geodir_wrapper_content_open_id'];
475
-    }
476
-    if (!empty($tc['geodir_wrapper_content_open_class'])) {
477
-        $class = $tc['geodir_wrapper_content_open_class'];
478
-    }
479
-
480
-    $text = str_replace(array("[id]", "[class]", "[width_css]"), array($id, $class, $width_css), $text);
481
-
482
-    echo $text;
454
+	if ($type == 'home-page' && $width = get_option('geodir_width_home_contant_section')) {
455
+		$width_css = 'style="width:' . $width . '%;"';
456
+	} elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_contant_section')) {
457
+		$width_css = 'style="width:' . $width . '%;"';
458
+	} elseif ($type == 'search-page' && $width = get_option('geodir_width_search_contant_section')) {
459
+		$width_css = 'style="width:' . $width . '%;"';
460
+	} elseif ($type == 'author-page' && $width = get_option('geodir_width_author_contant_section')) {
461
+		$width_css = 'style="width:' . $width . '%;"';
462
+	} else {
463
+		$width_css = '';
464
+	}
465
+
466
+	$tc = get_option('theme_compatibility_setting');
467
+	if (!empty($tc['geodir_wrapper_content_open_replace'])) {
468
+		$text = $tc['geodir_wrapper_content_open_replace'];
469
+	} else {
470
+		$text = '<div id="[id]" class="[class]" role="main" [width_css]>';
471
+	}
472
+
473
+	if (!empty($tc['geodir_wrapper_content_open_id'])) {
474
+		$id = $tc['geodir_wrapper_content_open_id'];
475
+	}
476
+	if (!empty($tc['geodir_wrapper_content_open_class'])) {
477
+		$class = $tc['geodir_wrapper_content_open_class'];
478
+	}
479
+
480
+	$text = str_replace(array("[id]", "[class]", "[width_css]"), array($id, $class, $width_css), $text);
481
+
482
+	echo $text;
483 483
 }
484 484
 
485 485
 // action for adding the primary div closing tag
@@ -493,13 +493,13 @@  discard block
 block discarded – undo
493 493
  */
494 494
 function geodir_action_wrapper_content_close($type = '')
495 495
 {
496
-    $tc = get_option('theme_compatibility_setting');
497
-    if (!empty($tc['geodir_wrapper_content_close_replace'])) {
498
-        $text = $tc['geodir_wrapper_content_close_replace'];
499
-    } else {
500
-        $text = '</div><!-- content ends here-->';
501
-    }
502
-    echo $text;
496
+	$tc = get_option('theme_compatibility_setting');
497
+	if (!empty($tc['geodir_wrapper_content_close_replace'])) {
498
+		$text = $tc['geodir_wrapper_content_close_replace'];
499
+	} else {
500
+		$text = '</div><!-- content ends here-->';
501
+	}
502
+	echo $text;
503 503
 }
504 504
 
505 505
 // action for adding the <article> opening tag
@@ -517,24 +517,24 @@  discard block
 block discarded – undo
517 517
  */
518 518
 function geodir_action_article_open($type = '', $id = '', $class = '', $itemtype = '')
519 519
 {
520
-    $class = implode(" ", $class);
521
-    $tc = get_option('theme_compatibility_setting');
522
-    if (!empty($tc['geodir_article_open_replace'])) {
523
-        $text = $tc['geodir_article_open_replace'];
524
-    } else {
525
-        $text = '<article  id="[id]" class="[class]" >';
526
-    }
520
+	$class = implode(" ", $class);
521
+	$tc = get_option('theme_compatibility_setting');
522
+	if (!empty($tc['geodir_article_open_replace'])) {
523
+		$text = $tc['geodir_article_open_replace'];
524
+	} else {
525
+		$text = '<article  id="[id]" class="[class]" >';
526
+	}
527 527
 
528
-    if (!empty($tc['geodir_article_open_id'])) {
529
-        $id = $tc['geodir_article_open_id'];
530
-    }
531
-    if (!empty($tc['geodir_article_open_class'])) {
532
-        $class = $tc['geodir_article_open_class'];
533
-    }
528
+	if (!empty($tc['geodir_article_open_id'])) {
529
+		$id = $tc['geodir_article_open_id'];
530
+	}
531
+	if (!empty($tc['geodir_article_open_class'])) {
532
+		$class = $tc['geodir_article_open_class'];
533
+	}
534 534
 
535
-    $text = str_replace(array("[id]", "[class]", "[itemtype]"), array($id, $class, $itemtype), $text);
535
+	$text = str_replace(array("[id]", "[class]", "[itemtype]"), array($id, $class, $itemtype), $text);
536 536
 
537
-    echo $text;
537
+	echo $text;
538 538
 }
539 539
 
540 540
 // action for adding the primary div closing tag
@@ -548,13 +548,13 @@  discard block
 block discarded – undo
548 548
  */
549 549
 function geodir_action_article_close($type = '')
550 550
 {
551
-    $tc = get_option('theme_compatibility_setting');
552
-    if (!empty($tc['geodir_article_close_replace'])) {
553
-        $text = $tc['geodir_article_close_replace'];
554
-    } else {
555
-        $text = '</article><!-- article ends here-->';
556
-    }
557
-    echo $text;
551
+	$tc = get_option('theme_compatibility_setting');
552
+	if (!empty($tc['geodir_article_close_replace'])) {
553
+		$text = $tc['geodir_article_close_replace'];
554
+	} else {
555
+		$text = '</article><!-- article ends here-->';
556
+	}
557
+	echo $text;
558 558
 }
559 559
 
560 560
 // action for adding the sidebar opening tag
@@ -571,35 +571,35 @@  discard block
 block discarded – undo
571 571
  */
572 572
 function geodir_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '')
573 573
 {
574
-    if ($type == 'home-page' && $width = get_option('geodir_width_home_right_section')) {
575
-        $width_css = 'style="width:' . $width . '%;"';
576
-    } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_right_section')) {
577
-        $width_css = 'style="width:' . $width . '%;"';
578
-    } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_right_section')) {
579
-        $width_css = 'style="width:' . $width . '%;"';
580
-    } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_right_section')) {
581
-        $width_css = 'style="width:' . $width . '%;"';
582
-    } else {
583
-        $width_css = '';
584
-    }
585
-
586
-    $tc = get_option('theme_compatibility_setting');
587
-    if (!empty($tc['geodir_sidebar_right_open_replace'])) {
588
-        $text = $tc['geodir_sidebar_right_open_replace'];
589
-    } else {
590
-        $text = '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>';
591
-    }
592
-
593
-    if (!empty($tc['geodir_sidebar_right_open_id'])) {
594
-        $id = $tc['geodir_sidebar_right_open_id'];
595
-    }
596
-    if (!empty($tc['geodir_sidebar_right_open_class'])) {
597
-        $class = $tc['geodir_sidebar_right_open_class'];
598
-    }
599
-
600
-    $text = str_replace(array("[id]", "[class]", "[itemtype]", "[width_css]"), array($id, $class, $itemtype, $width_css), $text);
601
-
602
-    echo $text;
574
+	if ($type == 'home-page' && $width = get_option('geodir_width_home_right_section')) {
575
+		$width_css = 'style="width:' . $width . '%;"';
576
+	} elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_right_section')) {
577
+		$width_css = 'style="width:' . $width . '%;"';
578
+	} elseif ($type == 'search-page' && $width = get_option('geodir_width_search_right_section')) {
579
+		$width_css = 'style="width:' . $width . '%;"';
580
+	} elseif ($type == 'author-page' && $width = get_option('geodir_width_author_right_section')) {
581
+		$width_css = 'style="width:' . $width . '%;"';
582
+	} else {
583
+		$width_css = '';
584
+	}
585
+
586
+	$tc = get_option('theme_compatibility_setting');
587
+	if (!empty($tc['geodir_sidebar_right_open_replace'])) {
588
+		$text = $tc['geodir_sidebar_right_open_replace'];
589
+	} else {
590
+		$text = '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>';
591
+	}
592
+
593
+	if (!empty($tc['geodir_sidebar_right_open_id'])) {
594
+		$id = $tc['geodir_sidebar_right_open_id'];
595
+	}
596
+	if (!empty($tc['geodir_sidebar_right_open_class'])) {
597
+		$class = $tc['geodir_sidebar_right_open_class'];
598
+	}
599
+
600
+	$text = str_replace(array("[id]", "[class]", "[itemtype]", "[width_css]"), array($id, $class, $itemtype, $width_css), $text);
601
+
602
+	echo $text;
603 603
 }
604 604
 
605 605
 // action for adding the primary div closing tag
@@ -613,13 +613,13 @@  discard block
 block discarded – undo
613 613
  */
614 614
 function geodir_action_sidebar_right_close($type = '')
615 615
 {
616
-    $tc = get_option('theme_compatibility_setting');
617
-    if (!empty($tc['geodir_sidebar_right_close_replace'])) {
618
-        $text = $tc['geodir_sidebar_right_close_replace'];
619
-    } else {
620
-        $text = '</aside><!-- sidebar ends here-->';
621
-    }
622
-    echo $text;
616
+	$tc = get_option('theme_compatibility_setting');
617
+	if (!empty($tc['geodir_sidebar_right_close_replace'])) {
618
+		$text = $tc['geodir_sidebar_right_close_replace'];
619
+	} else {
620
+		$text = '</aside><!-- sidebar ends here-->';
621
+	}
622
+	echo $text;
623 623
 }
624 624
 
625 625
 
@@ -640,121 +640,121 @@  discard block
 block discarded – undo
640 640
  */
641 641
 function geodir_action_geodir_set_preview_post()
642 642
 {
643
-    global $post, $preview, $gd_session;
644
-    $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
645
-    if (!$preview || $is_backend_preview) {
646
-        return;
647
-    }// bail if not previewing
648
-
649
-    $listing_type = isset($_REQUEST['listing_type']) ? sanitize_text_field($_REQUEST['listing_type']) : '';
650
-
651
-    $fields_info = geodir_get_custom_fields_type($listing_type);
652
-
653
-    foreach ($_REQUEST as $pkey => $pval) {
654
-        if ($pkey == 'geodir_video') {
655
-            $tags = '<iframe>';
656
-        } else if ($pkey == 'post_desc') {
657
-            $tags = '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>';
658
-        } else if (is_array($fields_info) && isset($fields_info[$pkey]) && ($fields_info[$pkey] == 'textarea' || $fields_info[$pkey] == 'html')) {
659
-            $tags = '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>';
660
-        } else if (is_array($_REQUEST[$pkey])) {
661
-            $tags = 'skip_field';
662
-        } else {
663
-            $tags = '';
664
-        }
665
-        /**
666
-         * Allows the filtering of the allowed HTML tags per field when submitting from frontend add listing page.
667
-         *
668
-         * @since 1.0.0
669
-         * @param string $tags The allowed HTML tags for the field. Can be many things, for example the description allows these tags '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>'.
670
-         * @param string|array $pkey The field id/name. If array then value is set as "skip_field".
671
-         */
672
-        $tags = apply_filters('geodir_save_post_key', $tags, $pkey);
673
-
674
-        if ($tags != 'skip_field') {
675
-            $_REQUEST[$pkey] = strip_tags($_REQUEST[$pkey], $tags);
676
-        }
677
-    }
678
-
679
-    $post = (object)$_REQUEST;
680
-
681
-
682
-    if (isset($post->video)) {
683
-        $post->video = stripslashes($post->video);
684
-    }
685
-
686
-    if (isset($post->Video2)) {
687
-        $post->Video2 = stripslashes($post->Video2);
688
-    }
689
-
690
-    $post_type = $post->listing_type;
691
-    $post_type_info = get_post_type_object($post_type);
692
-
693
-    $listing_label = $post_type_info->labels->singular_name;
694
-
695
-    $term_icon = '';
696
-
697
-    if (!empty($post->post_category)) {
698
-        foreach ($post->post_category as $post_taxonomy => $post_term) {
699
-
700
-            if ($post_term != '' && !is_array($post_term)) {
701
-                $post_term = explode(',', trim($post_term, ','));
702
-            }
643
+	global $post, $preview, $gd_session;
644
+	$is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
645
+	if (!$preview || $is_backend_preview) {
646
+		return;
647
+	}// bail if not previewing
648
+
649
+	$listing_type = isset($_REQUEST['listing_type']) ? sanitize_text_field($_REQUEST['listing_type']) : '';
650
+
651
+	$fields_info = geodir_get_custom_fields_type($listing_type);
652
+
653
+	foreach ($_REQUEST as $pkey => $pval) {
654
+		if ($pkey == 'geodir_video') {
655
+			$tags = '<iframe>';
656
+		} else if ($pkey == 'post_desc') {
657
+			$tags = '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>';
658
+		} else if (is_array($fields_info) && isset($fields_info[$pkey]) && ($fields_info[$pkey] == 'textarea' || $fields_info[$pkey] == 'html')) {
659
+			$tags = '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>';
660
+		} else if (is_array($_REQUEST[$pkey])) {
661
+			$tags = 'skip_field';
662
+		} else {
663
+			$tags = '';
664
+		}
665
+		/**
666
+		 * Allows the filtering of the allowed HTML tags per field when submitting from frontend add listing page.
667
+		 *
668
+		 * @since 1.0.0
669
+		 * @param string $tags The allowed HTML tags for the field. Can be many things, for example the description allows these tags '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>'.
670
+		 * @param string|array $pkey The field id/name. If array then value is set as "skip_field".
671
+		 */
672
+		$tags = apply_filters('geodir_save_post_key', $tags, $pkey);
673
+
674
+		if ($tags != 'skip_field') {
675
+			$_REQUEST[$pkey] = strip_tags($_REQUEST[$pkey], $tags);
676
+		}
677
+	}
678
+
679
+	$post = (object)$_REQUEST;
680
+
681
+
682
+	if (isset($post->video)) {
683
+		$post->video = stripslashes($post->video);
684
+	}
685
+
686
+	if (isset($post->Video2)) {
687
+		$post->Video2 = stripslashes($post->Video2);
688
+	}
689
+
690
+	$post_type = $post->listing_type;
691
+	$post_type_info = get_post_type_object($post_type);
692
+
693
+	$listing_label = $post_type_info->labels->singular_name;
694
+
695
+	$term_icon = '';
696
+
697
+	if (!empty($post->post_category)) {
698
+		foreach ($post->post_category as $post_taxonomy => $post_term) {
699
+
700
+			if ($post_term != '' && !is_array($post_term)) {
701
+				$post_term = explode(',', trim($post_term, ','));
702
+			}
703 703
 
704
-            if (is_array($post_term)) {
705
-                $post_term = array_unique($post_term);
706
-            }
704
+			if (is_array($post_term)) {
705
+				$post_term = array_unique($post_term);
706
+			}
707 707
 
708
-            if (!empty($post_term)) {
709
-                foreach ($post_term as $cat_id) {
710
-                    $cat_id = trim($cat_id);
711
-
712
-                    if ($cat_id != '') {
713
-                        $term_icon = get_option('geodir_default_marker_icon');
714
-
715
-                        if (isset($post->post_default_category) && $post->post_default_category == $cat_id) {
716
-                            if ($term_icon_url = get_tax_meta($cat_id, 'ct_cat_icon', false, $post_type)) {
717
-                                if (isset($term_icon_url['src']) && $term_icon_url['src'] != '')
718
-                                    $term_icon = $term_icon_url['src'];
719
-                                break;
720
-                            }
721
-                        }
722
-                    }
723
-                }
724
-            }
725
-        }
726
-    }
708
+			if (!empty($post_term)) {
709
+				foreach ($post_term as $cat_id) {
710
+					$cat_id = trim($cat_id);
711
+
712
+					if ($cat_id != '') {
713
+						$term_icon = get_option('geodir_default_marker_icon');
714
+
715
+						if (isset($post->post_default_category) && $post->post_default_category == $cat_id) {
716
+							if ($term_icon_url = get_tax_meta($cat_id, 'ct_cat_icon', false, $post_type)) {
717
+								if (isset($term_icon_url['src']) && $term_icon_url['src'] != '')
718
+									$term_icon = $term_icon_url['src'];
719
+								break;
720
+							}
721
+						}
722
+					}
723
+				}
724
+			}
725
+		}
726
+	}
727 727
 
728
-    $post_latitude = isset($post->post_latitude) ? $post->post_latitude : '';
729
-    $post_longitude = isset($post->post_longitude) ? $post->post_longitude : '';
728
+	$post_latitude = isset($post->post_latitude) ? $post->post_latitude : '';
729
+	$post_longitude = isset($post->post_longitude) ? $post->post_longitude : '';
730 730
 
731
-    $srcharr = array("'", "/", "-", '"', '\\');
732
-    $replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
731
+	$srcharr = array("'", "/", "-", '"', '\\');
732
+	$replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
733 733
 
734
-    $json_title = str_replace($srcharr, $replarr, $post->post_title);
734
+	$json_title = str_replace($srcharr, $replarr, $post->post_title);
735 735
 
736
-    $json = '{';
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 . '"';
742
-    $json .= '}';
736
+	$json = '{';
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 . '"';
742
+	$json .= '}';
743 743
 
744
-    $post->marker_json = $json;
744
+	$post->marker_json = $json;
745 745
 
746
-    $gd_session->set('listing', $_REQUEST);
746
+	$gd_session->set('listing', $_REQUEST);
747 747
 
748
-    // we need to define a few things to trick the setup_postdata
749
-    if (!isset($post->ID)) {
750
-        $post->ID = '';
751
-        $post->post_author = '';
752
-        $post->post_date = '';
753
-        $post->post_content = '';
754
-        $post->default_category = '';
755
-        $post->post_type = '';
756
-    }
757
-    setup_postdata($post);
748
+	// we need to define a few things to trick the setup_postdata
749
+	if (!isset($post->ID)) {
750
+		$post->ID = '';
751
+		$post->post_author = '';
752
+		$post->post_date = '';
753
+		$post->post_content = '';
754
+		$post->default_category = '';
755
+		$post->post_type = '';
756
+	}
757
+	setup_postdata($post);
758 758
 }
759 759
 
760 760
 /**
@@ -766,15 +766,15 @@  discard block
 block discarded – undo
766 766
  */
767 767
 function geodir_action_geodir_preview_code()
768 768
 {
769
-    global $preview;
769
+	global $preview;
770 770
 
771
-    $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
771
+	$is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
772 772
 
773
-    if (!$preview || $is_backend_preview) {
774
-        return;
775
-    }// bail if not previewing
773
+	if (!$preview || $is_backend_preview) {
774
+		return;
775
+	}// bail if not previewing
776 776
 
777
-    geodir_get_template_part('preview', 'buttons');
777
+	geodir_get_template_part('preview', 'buttons');
778 778
 }
779 779
 
780 780
 // action for adding the details page top widget area
@@ -790,20 +790,20 @@  discard block
 block discarded – undo
790 790
  */
791 791
 function geodir_action_geodir_sidebar_detail_top($class = '')
792 792
 {
793
-    if (get_option('geodir_show_detail_top_section')) { ?>
793
+	if (get_option('geodir_show_detail_top_section')) { ?>
794 794
         <div
795 795
             class="<?php
796
-            /**
797
-             * Filter the div class for the wrapper of the full width widget areas.
798
-             *
799
-             * Allows you to filter the class of the div for the HTML Container wrapper for the full width widget areas referred to as "Top Section" or "Bottom Section" in the widget areas.
800
-             *
801
-             * @since 1.0.0
802
-             * @param string $class The class of the div.
803
-             * @param string $type The page type the widget area is being used on. Values can be 'geodir_detail_top', 'geodir_detail_bottom', 'geodir_listing_top', 'geodir_listing_bottom', 'Reg/Login Top Section',
804
-             *               'geodir_author_top','geodir_author_bottom', 'geodir_search_top', 'geodir_search_bottom', 'geodir_home_top' or 'geodir_home_bottom'.
805
-             */
806
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_detail_top'); ?> <?php echo $class; ?>">
796
+			/**
797
+			 * Filter the div class for the wrapper of the full width widget areas.
798
+			 *
799
+			 * Allows you to filter the class of the div for the HTML Container wrapper for the full width widget areas referred to as "Top Section" or "Bottom Section" in the widget areas.
800
+			 *
801
+			 * @since 1.0.0
802
+			 * @param string $class The class of the div.
803
+			 * @param string $type The page type the widget area is being used on. Values can be 'geodir_detail_top', 'geodir_detail_bottom', 'geodir_listing_top', 'geodir_listing_bottom', 'Reg/Login Top Section',
804
+			 *               'geodir_author_top','geodir_author_bottom', 'geodir_search_top', 'geodir_search_bottom', 'geodir_home_top' or 'geodir_home_bottom'.
805
+			 */
806
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_detail_top'); ?> <?php echo $class; ?>">
807 807
             <?php dynamic_sidebar('geodir_detail_top'); ?>
808 808
         </div>
809 809
     <?php }
@@ -827,11 +827,11 @@  discard block
 block discarded – undo
827 827
  */
828 828
 function geodir_action_geodir_sidebar_detail_bottom_section($class = '')
829 829
 {
830
-    if (get_option('geodir_show_detail_bottom_section')) { ?>
830
+	if (get_option('geodir_show_detail_bottom_section')) { ?>
831 831
         <div
832 832
             class="<?php
833
-            /** This action is documented in geodirectory_template_actions.php */
834
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_detail_bottom'); ?> <?php echo $class; ?>">
833
+			/** This action is documented in geodirectory_template_actions.php */
834
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_detail_bottom'); ?> <?php echo $class; ?>">
835 835
             <?php dynamic_sidebar('geodir_detail_bottom'); ?>
836 836
         </div><!-- clearfix ends here-->
837 837
     <?php }
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
  */
846 846
 function geodir_details_sidebar_widget_area()
847 847
 {
848
-    dynamic_sidebar('geodir_detail_sidebar');
848
+	dynamic_sidebar('geodir_detail_sidebar');
849 849
 }
850 850
 
851 851
 /**
@@ -856,12 +856,12 @@  discard block
 block discarded – undo
856 856
  */
857 857
 function geodir_details_sidebar_place_details()
858 858
 {
859
-    /**
860
-     * Used to add items to the details page sidebar.
861
-     *
862
-     * @since 1.0.0
863
-     */
864
-    do_action('geodir_detail_page_sidebar');
859
+	/**
860
+	 * Used to add items to the details page sidebar.
861
+	 *
862
+	 * @since 1.0.0
863
+	 */
864
+	do_action('geodir_detail_page_sidebar');
865 865
 }
866 866
 
867 867
 add_action('geodir_detail_sidebar_inside', 'geodir_details_sidebar_place_details', 10);
@@ -876,68 +876,68 @@  discard block
 block discarded – undo
876 876
  */
877 877
 function geodir_action_details_sidebar()
878 878
 {
879
-    // this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='',$itemtype='')
880
-    if (get_option('geodir_detail_sidebar_left_section')) {
881
-        /**
882
-         * Called before the details page left sidebar is opened.
883
-         *
884
-         * This is used to add opening wrapper HTML to the details page left sidebar.
885
-         *
886
-         * @since 1.0.0
887
-         * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'author-page', 'search-page' or 'home-page'.
888
-         * @param string $id Usually the ID of the sidebar wrapper. Values can be 'geodir-sidebar' or 'geodir-sidebar-left'.
889
-         * @param string $class The class of the sidebar wrapper. 'geodir-sidebar-left geodir-details-sidebar-left'.
890
-         * @param string $itemtype HTML itemtype 'http://schema.org/WPSideBar'.
891
-         */
892
-        do_action('geodir_sidebar_left_open', 'details-page', 'geodir-sidebar', 'geodir-sidebar-left geodir-details-sidebar-left', 'http://schema.org/WPSideBar');
893
-        ?>
879
+	// this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='',$itemtype='')
880
+	if (get_option('geodir_detail_sidebar_left_section')) {
881
+		/**
882
+		 * Called before the details page left sidebar is opened.
883
+		 *
884
+		 * This is used to add opening wrapper HTML to the details page left sidebar.
885
+		 *
886
+		 * @since 1.0.0
887
+		 * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'author-page', 'search-page' or 'home-page'.
888
+		 * @param string $id Usually the ID of the sidebar wrapper. Values can be 'geodir-sidebar' or 'geodir-sidebar-left'.
889
+		 * @param string $class The class of the sidebar wrapper. 'geodir-sidebar-left geodir-details-sidebar-left'.
890
+		 * @param string $itemtype HTML itemtype 'http://schema.org/WPSideBar'.
891
+		 */
892
+		do_action('geodir_sidebar_left_open', 'details-page', 'geodir-sidebar', 'geodir-sidebar-left geodir-details-sidebar-left', 'http://schema.org/WPSideBar');
893
+		?>
894 894
         <div class="geodir-content-left geodir-sidebar-wrap"><?php
895
-        /**
896
-         * Called inside the HTML wrapper of the details sidebar for either the left and right sidebar.
897
-         *
898
-         * This is used to add all info to the details page sidebars.
899
-         *
900
-         * @since 1.0.0
901
-         */
902
-        do_action('geodir_detail_sidebar_inside');
903
-        ?></div><!-- end geodir-content-left --><?php
904
-        /**
905
-         * Called after the details page left sidebar.
906
-         *
907
-         * This is used to add closing wrapper HTML to the details page left sidebar.
908
-         *
909
-         * @since 1.0.0
910
-         * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'author-page', 'search-page' or 'home-page'.
911
-         */
912
-        do_action('geodir_sidebar_left_close', 'details-page');
913
-    } else {
914
-        /**
915
-         * Called before the details page right sidebar is opened.
916
-         *
917
-         * This is used to add opening wrapper HTML to the details page right sidebar.
918
-         *
919
-         * @since 1.0.0
920
-         * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'add-listing-page', 'author-page', 'search-page' or 'home-page'.
921
-         * @param string $id Usually the ID of the sidebar wrapper. Values can be 'geodir-sidebar' or 'geodir-sidebar-right'.
922
-         * @param string $class The class of the sidebar wrapper. 'geodir-sidebar-right geodir-details-sidebar-right'.
923
-         * @param string $itemtype HTML itemtype 'http://schema.org/WPSideBar'.
924
-         */
925
-        do_action('geodir_sidebar_right_open', 'details-page', 'geodir-sidebar', 'geodir-sidebar-right geodir-details-sidebar-right', 'http://schema.org/WPSideBar');
926
-        ?>
895
+		/**
896
+		 * Called inside the HTML wrapper of the details sidebar for either the left and right sidebar.
897
+		 *
898
+		 * This is used to add all info to the details page sidebars.
899
+		 *
900
+		 * @since 1.0.0
901
+		 */
902
+		do_action('geodir_detail_sidebar_inside');
903
+		?></div><!-- end geodir-content-left --><?php
904
+		/**
905
+		 * Called after the details page left sidebar.
906
+		 *
907
+		 * This is used to add closing wrapper HTML to the details page left sidebar.
908
+		 *
909
+		 * @since 1.0.0
910
+		 * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'author-page', 'search-page' or 'home-page'.
911
+		 */
912
+		do_action('geodir_sidebar_left_close', 'details-page');
913
+	} else {
914
+		/**
915
+		 * Called before the details page right sidebar is opened.
916
+		 *
917
+		 * This is used to add opening wrapper HTML to the details page right sidebar.
918
+		 *
919
+		 * @since 1.0.0
920
+		 * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'add-listing-page', 'author-page', 'search-page' or 'home-page'.
921
+		 * @param string $id Usually the ID of the sidebar wrapper. Values can be 'geodir-sidebar' or 'geodir-sidebar-right'.
922
+		 * @param string $class The class of the sidebar wrapper. 'geodir-sidebar-right geodir-details-sidebar-right'.
923
+		 * @param string $itemtype HTML itemtype 'http://schema.org/WPSideBar'.
924
+		 */
925
+		do_action('geodir_sidebar_right_open', 'details-page', 'geodir-sidebar', 'geodir-sidebar-right geodir-details-sidebar-right', 'http://schema.org/WPSideBar');
926
+		?>
927 927
         <div class="geodir-content-right geodir-sidebar-wrap"><?php
928
-        /** This action is documented in geodirectory_template_actions.php */
929
-        do_action('geodir_detail_sidebar_inside');
930
-        ?></div><!-- end geodir-content-right --><?php
931
-        /**
932
-         * Called after the details page right sidebar.
933
-         *
934
-         * This is used to add closing wrapper HTML to the details page right sidebar.
935
-         *
936
-         * @since 1.0.0
937
-         * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'author-page', 'search-page' or 'home-page'.
938
-         */
939
-        do_action('geodir_sidebar_right_close', 'details-page');
940
-    }
928
+		/** This action is documented in geodirectory_template_actions.php */
929
+		do_action('geodir_detail_sidebar_inside');
930
+		?></div><!-- end geodir-content-right --><?php
931
+		/**
932
+		 * Called after the details page right sidebar.
933
+		 *
934
+		 * This is used to add closing wrapper HTML to the details page right sidebar.
935
+		 *
936
+		 * @since 1.0.0
937
+		 * @param string $type The current page type. Values can be 'details-page', 'listings-page', 'author-page', 'search-page' or 'home-page'.
938
+		 */
939
+		do_action('geodir_sidebar_right_close', 'details-page');
940
+	}
941 941
 }
942 942
 
943 943
 add_action('geodir_page_title', 'geodir_action_page_title', 10);
@@ -951,21 +951,21 @@  discard block
 block discarded – undo
951 951
  */
952 952
 function geodir_action_page_title()
953 953
 {
954
-    /**
955
-     * Filter the page title HTML h1 class.
956
-     *
957
-     * @since 1.0.0
958
-     * @param string $class The class to use. Default is 'entry-title fn'.
959
-     */
960
-    $class = apply_filters('geodir_page_title_class', 'entry-title fn');
961
-    /**
962
-     * Filter the page title HTML header wrapper class.
963
-     *
964
-     * @since 1.0.0
965
-     * @param string $class The class to use. Default is 'entry-header'.
966
-     */
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>';
954
+	/**
955
+	 * Filter the page title HTML h1 class.
956
+	 *
957
+	 * @since 1.0.0
958
+	 * @param string $class The class to use. Default is 'entry-title fn'.
959
+	 */
960
+	$class = apply_filters('geodir_page_title_class', 'entry-title fn');
961
+	/**
962
+	 * Filter the page title HTML header wrapper class.
963
+	 *
964
+	 * @since 1.0.0
965
+	 * @param string $class The class to use. Default is 'entry-header'.
966
+	 */
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>';
969 969
 }
970 970
 
971 971
 
@@ -982,87 +982,87 @@  discard block
 block discarded – undo
982 982
  */
983 983
 function geodir_action_details_slider()
984 984
 {
985
-    global $preview, $post;
985
+	global $preview, $post;
986 986
 
987
-    $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // preview from backend
987
+	$is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // preview from backend
988 988
 
989
-    if ($is_backend_preview && !empty($post) && !empty($post->ID) && !isset($post->post_images)) {
990
-        $preview_get_images = geodir_get_images($post->ID, 'thumbnail', get_option('geodir_listing_no_img'));
989
+	if ($is_backend_preview && !empty($post) && !empty($post->ID) && !isset($post->post_images)) {
990
+		$preview_get_images = geodir_get_images($post->ID, 'thumbnail', get_option('geodir_listing_no_img'));
991 991
 
992
-        $preview_post_images = array();
993
-        if ($preview_get_images) {
994
-            foreach ($preview_get_images as $row) {
995
-                $preview_post_images[] = $row->src;
996
-            }
997
-        }
998
-        if (!empty($preview_post_images)) {
999
-            $post->post_images = implode(',', $preview_post_images);
1000
-        }
1001
-    }
1002
-
1003
-    if ($preview) {
1004
-        $post_images = array();
1005
-        if (isset($post->post_images) && !empty($post->post_images)) {
1006
-            $post->post_images = trim($post->post_images, ",");
1007
-            $post_images = explode(",", $post->post_images);
1008
-        }
1009
-
1010
-        $main_slides = '';
1011
-        $nav_slides = '';
1012
-        $slides = 0;
1013
-
1014
-        if (!empty($post_images)) {
1015
-            foreach ($post_images as $image) {
1016
-                if (!empty($image)) {
1017
-                    $sizes = getimagesize(trim($image));
1018
-                    $width = !empty($sizes) && isset($sizes[0]) ? $sizes[0] : 0;
1019
-                    $height = !empty($sizes) && isset($sizes[1]) ? $sizes[1] : 0;
1020
-
1021
-                    if ($image && $width && $height) {
1022
-                        $image = (object)array('src' => $image, 'width' => $width, 'height' => $height);
1023
-                    }
1024
-
1025
-                    if (isset($image->src)) {
1026
-                        if ($image->height >= 400) {
1027
-                            $spacer_height = 0;
1028
-                        } else {
1029
-                            $spacer_height = ((400 - $image->height) / 2);
1030
-                        }
1031
-
1032
-                        $image_title = isset($image->title) ? $image->title : '';
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>';
1037
-                        $slides++;
1038
-                    }
1039
-                }
1040
-            }// endfore
1041
-        } //end if
1042
-    } else {
1043
-        $main_slides = '';
1044
-        $nav_slides = '';
1045
-        $post_images = geodir_get_images($post->ID, 'thumbnail', false); // Hide default image on listing preview/detail page.
1046
-        $slides = 0;
1047
-
1048
-        if (!empty($post_images)) {
1049
-            foreach ($post_images as $image) {
1050
-                if ($image->height >= 400) {
1051
-                    $spacer_height = 0;
1052
-                } else {
1053
-                    $spacer_height = ((400 - $image->height) / 2);
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>';
1059
-                $slides++;
1060
-            }
1061
-        }// endfore
1062
-    }
992
+		$preview_post_images = array();
993
+		if ($preview_get_images) {
994
+			foreach ($preview_get_images as $row) {
995
+				$preview_post_images[] = $row->src;
996
+			}
997
+		}
998
+		if (!empty($preview_post_images)) {
999
+			$post->post_images = implode(',', $preview_post_images);
1000
+		}
1001
+	}
1002
+
1003
+	if ($preview) {
1004
+		$post_images = array();
1005
+		if (isset($post->post_images) && !empty($post->post_images)) {
1006
+			$post->post_images = trim($post->post_images, ",");
1007
+			$post_images = explode(",", $post->post_images);
1008
+		}
1009
+
1010
+		$main_slides = '';
1011
+		$nav_slides = '';
1012
+		$slides = 0;
1013
+
1014
+		if (!empty($post_images)) {
1015
+			foreach ($post_images as $image) {
1016
+				if (!empty($image)) {
1017
+					$sizes = getimagesize(trim($image));
1018
+					$width = !empty($sizes) && isset($sizes[0]) ? $sizes[0] : 0;
1019
+					$height = !empty($sizes) && isset($sizes[1]) ? $sizes[1] : 0;
1020
+
1021
+					if ($image && $width && $height) {
1022
+						$image = (object)array('src' => $image, 'width' => $width, 'height' => $height);
1023
+					}
1024
+
1025
+					if (isset($image->src)) {
1026
+						if ($image->height >= 400) {
1027
+							$spacer_height = 0;
1028
+						} else {
1029
+							$spacer_height = ((400 - $image->height) / 2);
1030
+						}
1031
+
1032
+						$image_title = isset($image->title) ? $image->title : '';
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>';
1037
+						$slides++;
1038
+					}
1039
+				}
1040
+			}// endfore
1041
+		} //end if
1042
+	} else {
1043
+		$main_slides = '';
1044
+		$nav_slides = '';
1045
+		$post_images = geodir_get_images($post->ID, 'thumbnail', false); // Hide default image on listing preview/detail page.
1046
+		$slides = 0;
1047
+
1048
+		if (!empty($post_images)) {
1049
+			foreach ($post_images as $image) {
1050
+				if ($image->height >= 400) {
1051
+					$spacer_height = 0;
1052
+				} else {
1053
+					$spacer_height = ((400 - $image->height) / 2);
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>';
1059
+				$slides++;
1060
+			}
1061
+		}// endfore
1062
+	}
1063 1063
 
1064
-    if (!empty($post_images)) {
1065
-        ?>
1064
+	if (!empty($post_images)) {
1065
+		?>
1066 1066
         <div class="geodir_flex-container">
1067 1067
             <div class="geodir_flex-loader"><i class="fa fa-refresh fa-spin"></i></div>
1068 1068
             <div id="geodir_slider" class="geodir_flexslider ">
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
             <?php } ?>
1076 1076
         </div>
1077 1077
     <?php
1078
-    }
1078
+	}
1079 1079
 }
1080 1080
 
1081 1081
 add_action('geodir_details_taxonomies', 'geodir_action_details_taxonomies', 10);
@@ -1090,176 +1090,176 @@  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
-    $taxonomies = array();
1097
-
1098
-    $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
1099
-
1100
-    if ($preview && !$is_backend_preview) {
1101
-        $post_type = $post->listing_type;
1102
-        $post_taxonomy = $post_type . 'category';
1103
-        $post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
1104
-    } else {
1105
-        $post_type = $post->post_type;
1106
-        $post_taxonomy = $post_type . 'category';
1107
-    }
1096
+	$taxonomies = array();
1097
+
1098
+	$is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
1099
+
1100
+	if ($preview && !$is_backend_preview) {
1101
+		$post_type = $post->listing_type;
1102
+		$post_taxonomy = $post_type . 'category';
1103
+		$post->{$post_taxonomy} = $post->post_category[$post_taxonomy];
1104
+	} else {
1105
+		$post_type = $post->post_type;
1106
+		$post_taxonomy = $post_type . 'category';
1107
+	}
1108 1108
 //{	
1109
-    $post_type_info = get_post_type_object($post_type);
1110
-    $listing_label = __($post_type_info->labels->singular_name, 'geodirectory');
1111
-
1112
-    if (!empty($post->post_tags)) {
1113
-
1114
-        if (taxonomy_exists($post_type . '_tags')):
1115
-            $links = array();
1116
-            $terms = array();
1117
-            // to limit post tags
1118
-            $post_tags = trim($post->post_tags, ",");
1119
-            $post_id = isset($post->ID) ? $post->ID : '';
1120
-            /**
1121
-             * Filter the post tags.
1122
-             *
1123
-             * Allows you to filter the post tags output on the details page of a post.
1124
-             *
1125
-             * @since 1.0.0
1126
-             * @param string $post_tags A comma seperated list of tags.
1127
-             * @param int $post_id The current post id.
1128
-             */
1129
-            $post_tags = apply_filters('geodir_action_details_post_tags', $post_tags, $post_id);
1130
-
1131
-            $post->post_tags = $post_tags;
1132
-            $post_tags = explode(",", trim($post->post_tags, ","));
1133
-
1134
-            foreach ($post_tags as $post_term) {
1135
-
1136
-                // fix slug creation order for tags & location
1137
-                $post_term = trim($post_term);
1138
-
1139
-                $priority_location = false;
1140
-                if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1141
-                    $term = get_term_by('name', $post_term, $post_type . '_tags');
1142
-                } else {
1143
-                    $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1144
-                    $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
1145
-                    $post_city = isset($_REQUEST['post_city']) && $_REQUEST['post_city'] != '' ? sanitize_text_field($_REQUEST['post_city']) : NULL;
1146
-                    $match_country = $post_country && sanitize_title($post_term) == sanitize_title($post_country) ? true : false;
1147
-                    $match_region = $post_region && sanitize_title($post_term) == sanitize_title($post_region) ? true : false;
1148
-                    $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1149
-                    if ($match_country || $match_region || $match_city) {
1150
-                        $priority_location = true;
1151
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1152
-                    } else {
1153
-                        $insert_term = wp_insert_term($post_term, $post_type . '_tags');
1154
-                        $term = get_term_by('name', $post_term, $post_type . '_tags');
1155
-                    }
1156
-                }
1157
-
1158
-                if (!is_wp_error($term) && is_object($term)) {
1159
-
1160
-                    // fix tag link on detail page
1161
-                    if ($priority_location) {
1162
-
1163
-                        $tag_link = "<a href=''>$post_term</a>";
1164
-                        /**
1165
-                         * Filter the tag name on the details page.
1166
-                         *
1167
-                         * @since 1.5.6
1168
-                         * @param string $tag_link The tag link html.
1169
-                         * @param object $term The tag term object.
1170
-                         */
1171
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1172
-                        $links[] = $tag_link;
1173
-                    } else {
1174
-                        $tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1175
-                        /** This action is documented in geodirectory-template_actions.php */
1176
-                        $tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1177
-                        $links[] = $tag_link;
1178
-                    }
1179
-                    $terms[] = $term;
1180
-                }
1181
-                //
1182
-            }
1183
-            if (!isset($listing_label)) {
1184
-                $listing_label = '';
1185
-            }
1186
-            $taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1187
-        endif;
1188
-
1189
-    }
1190
-
1191
-    if (!empty($post->{$post_taxonomy})) {
1192
-        $links = array();
1193
-        $terms = array();
1194
-        $termsOrdered = array();
1195
-        if (!is_array($post->{$post_taxonomy})) {
1196
-            $post_term = explode(",", trim($post->{$post_taxonomy}, ","));
1197
-        } else {
1198
-            $post_term = $post->{$post_taxonomy};
1109
+	$post_type_info = get_post_type_object($post_type);
1110
+	$listing_label = __($post_type_info->labels->singular_name, 'geodirectory');
1111
+
1112
+	if (!empty($post->post_tags)) {
1113
+
1114
+		if (taxonomy_exists($post_type . '_tags')):
1115
+			$links = array();
1116
+			$terms = array();
1117
+			// to limit post tags
1118
+			$post_tags = trim($post->post_tags, ",");
1119
+			$post_id = isset($post->ID) ? $post->ID : '';
1120
+			/**
1121
+			 * Filter the post tags.
1122
+			 *
1123
+			 * Allows you to filter the post tags output on the details page of a post.
1124
+			 *
1125
+			 * @since 1.0.0
1126
+			 * @param string $post_tags A comma seperated list of tags.
1127
+			 * @param int $post_id The current post id.
1128
+			 */
1129
+			$post_tags = apply_filters('geodir_action_details_post_tags', $post_tags, $post_id);
1130
+
1131
+			$post->post_tags = $post_tags;
1132
+			$post_tags = explode(",", trim($post->post_tags, ","));
1133
+
1134
+			foreach ($post_tags as $post_term) {
1135
+
1136
+				// fix slug creation order for tags & location
1137
+				$post_term = trim($post_term);
1138
+
1139
+				$priority_location = false;
1140
+				if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
1141
+					$term = get_term_by('name', $post_term, $post_type . '_tags');
1142
+				} else {
1143
+					$post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? sanitize_text_field($_REQUEST['post_country']) : NULL;
1144
+					$post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? sanitize_text_field($_REQUEST['post_region']) : NULL;
1145
+					$post_city = isset($_REQUEST['post_city']) && $_REQUEST['post_city'] != '' ? sanitize_text_field($_REQUEST['post_city']) : NULL;
1146
+					$match_country = $post_country && sanitize_title($post_term) == sanitize_title($post_country) ? true : false;
1147
+					$match_region = $post_region && sanitize_title($post_term) == sanitize_title($post_region) ? true : false;
1148
+					$match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
1149
+					if ($match_country || $match_region || $match_city) {
1150
+						$priority_location = true;
1151
+						$term = get_term_by('name', $post_term, $post_type . '_tags');
1152
+					} else {
1153
+						$insert_term = wp_insert_term($post_term, $post_type . '_tags');
1154
+						$term = get_term_by('name', $post_term, $post_type . '_tags');
1155
+					}
1156
+				}
1157
+
1158
+				if (!is_wp_error($term) && is_object($term)) {
1159
+
1160
+					// fix tag link on detail page
1161
+					if ($priority_location) {
1162
+
1163
+						$tag_link = "<a href=''>$post_term</a>";
1164
+						/**
1165
+						 * Filter the tag name on the details page.
1166
+						 *
1167
+						 * @since 1.5.6
1168
+						 * @param string $tag_link The tag link html.
1169
+						 * @param object $term The tag term object.
1170
+						 */
1171
+						$tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1172
+						$links[] = $tag_link;
1173
+					} else {
1174
+						$tag_link = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
1175
+						/** This action is documented in geodirectory-template_actions.php */
1176
+						$tag_link = apply_filters('geodir_details_taxonomies_tag_link',$tag_link,$term);
1177
+						$links[] = $tag_link;
1178
+					}
1179
+					$terms[] = $term;
1180
+				}
1181
+				//
1182
+			}
1183
+			if (!isset($listing_label)) {
1184
+				$listing_label = '';
1185
+			}
1186
+			$taxonomies[$post_type . '_tags'] = wp_sprintf(__('%s Tags: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1187
+		endif;
1188
+
1189
+	}
1190
+
1191
+	if (!empty($post->{$post_taxonomy})) {
1192
+		$links = array();
1193
+		$terms = array();
1194
+		$termsOrdered = array();
1195
+		if (!is_array($post->{$post_taxonomy})) {
1196
+			$post_term = explode(",", trim($post->{$post_taxonomy}, ","));
1197
+		} else {
1198
+			$post_term = $post->{$post_taxonomy};
1199 1199
 			
1200 1200
 			if ($preview && !$is_backend_preview) {
1201 1201
 				$post_term = geodir_add_parent_terms($post_term, $post_taxonomy);
1202 1202
 			}
1203
-        }
1204
-
1205
-        $post_term = array_unique($post_term);
1206
-        if (!empty($post_term)) {
1207
-            foreach ($post_term as $post_term) {
1208
-                $post_term = trim($post_term);
1209
-
1210
-                if ($post_term != ''):
1211
-                    $term = get_term_by('id', $post_term, $post_taxonomy);
1212
-
1213
-                    if (is_object($term)) {
1214
-                        $term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1215
-                        /**
1216
-                         * Filter the category name on the details page.
1217
-                         *
1218
-                         * @since 1.5.6
1219
-                         * @param string $term_link The link html to the category.
1220
-                         * @param object $term The category term object.
1221
-                         */
1222
-                        $term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1223
-                        $links[] = $term_link;
1224
-                        $terms[] = $term;
1225
-                    }
1226
-                endif;
1227
-            }
1228
-            // order alphabetically
1229
-            asort($links);
1230
-            foreach (array_keys($links) as $key) {
1231
-                $termsOrdered[$key] = $terms[$key];
1232
-            }
1233
-            $terms = $termsOrdered;
1203
+		}
1204
+
1205
+		$post_term = array_unique($post_term);
1206
+		if (!empty($post_term)) {
1207
+			foreach ($post_term as $post_term) {
1208
+				$post_term = trim($post_term);
1209
+
1210
+				if ($post_term != ''):
1211
+					$term = get_term_by('id', $post_term, $post_taxonomy);
1212
+
1213
+					if (is_object($term)) {
1214
+						$term_link = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
1215
+						/**
1216
+						 * Filter the category name on the details page.
1217
+						 *
1218
+						 * @since 1.5.6
1219
+						 * @param string $term_link The link html to the category.
1220
+						 * @param object $term The category term object.
1221
+						 */
1222
+						$term_link = apply_filters('geodir_details_taxonomies_cat_link',$term_link,$term);
1223
+						$links[] = $term_link;
1224
+						$terms[] = $term;
1225
+					}
1226
+				endif;
1227
+			}
1228
+			// order alphabetically
1229
+			asort($links);
1230
+			foreach (array_keys($links) as $key) {
1231
+				$termsOrdered[$key] = $terms[$key];
1232
+			}
1233
+			$terms = $termsOrdered;
1234 1234
 
1235
-        }
1235
+		}
1236 1236
 
1237
-        if (!isset($listing_label)) {
1238
-            $listing_label = '';
1239
-        }
1240
-        $taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1237
+		if (!isset($listing_label)) {
1238
+			$listing_label = '';
1239
+		}
1240
+		$taxonomies[$post_taxonomy] = wp_sprintf(__('%s Category: %l', 'geodirectory'), geodir_ucwords($listing_label), $links, (object)$terms);
1241 1241
 
1242
-    }
1242
+	}
1243 1243
 
1244
-    /**
1245
-     * Filter the taxonomies array before output.
1246
-     *
1247
-     * @since 1.5.9
1248
-     * @param array $taxonomies The array of cats and tags.
1249
-     * @param string $post_type The post type being output.
1250
-     * @param string $listing_label The post type label.
1251
-     * @param string $listing_label The post type label with ucwords function.
1252
-     */
1253
-    $taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1244
+	/**
1245
+	 * Filter the taxonomies array before output.
1246
+	 *
1247
+	 * @since 1.5.9
1248
+	 * @param array $taxonomies The array of cats and tags.
1249
+	 * @param string $post_type The post type being output.
1250
+	 * @param string $listing_label The post type label.
1251
+	 * @param string $listing_label The post type label with ucwords function.
1252
+	 */
1253
+	$taxonomies = apply_filters('geodir_details_taxonomies_output',$taxonomies,$post_type,$listing_label,geodir_ucwords($listing_label));
1254 1254
 
1255
-    if (isset($taxonomies[$post_taxonomy])) {
1256
-        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1257
-    }
1255
+	if (isset($taxonomies[$post_taxonomy])) {
1256
+		echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
1257
+	}
1258 1258
 
1259
-    if (isset($taxonomies[$post_type . '_tags']))
1260
-        echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1259
+	if (isset($taxonomies[$post_type . '_tags']))
1260
+		echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
1261 1261
 
1262
-    ?>
1262
+	?>
1263 1263
     </p><?php
1264 1264
 }
1265 1265
 
@@ -1281,127 +1281,127 @@  discard block
 block discarded – undo
1281 1281
 function geodir_action_details_micordata($post='')
1282 1282
 {
1283 1283
 
1284
-    global $preview;
1285
-    if(empty($post)){global $post;}
1286
-    if ($preview || !geodir_is_page('detail')) {
1287
-        return;
1288
-    }
1289
-
1290
-    // url
1291
-    $c_url = geodir_curPageURL();
1292
-
1293
-    // post reviews
1294
-    $post_reviews = get_comments(array('post_id' => $post->ID, 'status' => 'approve'));
1295
-    if (empty($post_reviews)) {
1296
-        $reviews = '';
1297
-    } else {
1298
-        foreach ($post_reviews as $review) {
1299
-            $reviews[] = array(
1300
-                "@type" => "Review",
1301
-                "author" => $review->comment_author,
1302
-                "datePublished" => $review->comment_date,
1303
-                "description" => $review->comment_content,
1304
-                "reviewRating" => array(
1305
-                    "@type" => "Rating",
1306
-                    "bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1307
-                    "ratingValue" => geodir_get_commentoverall($review->comment_ID),
1308
-                    "worstRating" => "1"
1309
-                )
1310
-            );
1311
-        }
1312
-
1313
-    }
1314
-
1315
-    // post images
1316
-    $post_images = geodir_get_images($post->ID, 'thumbnail', get_option('geodir_listing_no_img'));
1317
-    if (empty($post_images)) {
1318
-        $images = '';
1319
-    } else {
1320
-        $i_arr = array();
1321
-        foreach ($post_images as $img) {
1322
-            $i_arr[] = $img->src;
1323
-        }
1324
-
1325
-        if (count($i_arr) == 1) {
1326
-            $images = $i_arr[0];
1327
-        } else {
1328
-            $images = $i_arr;
1329
-        }
1330
-
1331
-    }
1332
-    //print_r($post);
1333
-    // external links
1334
-    $external_links =  array();
1335
-    $external_links[] = $post->geodir_website;
1336
-    $external_links[] = $post->geodir_twitter;
1337
-    $external_links[] = $post->geodir_facebook;
1338
-    $external_links = array_filter($external_links);
1339
-
1340
-    if(!empty($external_links)){
1341
-        $external_links = array_values($external_links);
1342
-    }
1343
-
1344
-    // reviews
1345
-    $comment_count = geodir_get_review_count_total($post->ID);
1346
-    $post_avgratings = geodir_get_post_rating($post->ID);
1347
-
1348
-    // schema type
1349
-    $schema_type = 'LocalBusiness';
1350
-    if(isset($post->default_category) && $post->default_category){
1351
-        $cat_schema = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1352
-        if($cat_schema){$schema_type = $cat_schema;}
1353
-        if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1354
-    }
1355
-
1356
-    $schema = array();
1357
-    $schema['@context'] = "http://schema.org";
1358
-    $schema['@type'] = $schema_type;
1359
-    $schema['name'] = $post->post_name;
1360
-    $schema['description'] = wp_strip_all_tags( $post->post_content, true );
1361
-    $schema['telephone'] = $post->geodir_contact;
1362
-    $schema['url'] = $c_url;
1363
-    $schema['sameAs'] = $external_links;
1364
-    $schema['image'] = $images;
1365
-    $schema['address'] = array(
1366
-        "@type" => "PostalAddress",
1367
-        "streetAddress" => $post->post_address,
1368
-        "addressLocality" => $post->post_city,
1369
-        "addressRegion" => $post->post_region,
1370
-        "addressCountry" => $post->post_country,
1371
-        "postalCode" => $post->post_zip
1372
-    );
1373
-
1374
-    if($post->post_latitude && $post->post_longitude) {
1375
-        $schema['geo'] = array(
1376
-            "@type" => "GeoCoordinates",
1377
-            "latitude" => $post->post_latitude,
1378
-            "longitude" => $post->post_longitude
1379
-        );
1380
-    }
1381
-
1382
-    if($post_avgratings) {
1383
-        $schema['aggregateRating'] = array(
1384
-            "@type" => "AggregateRating",
1385
-            "ratingValue" => $post_avgratings,
1386
-            "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1387
-            "worstRating" => "1",
1388
-            "ratingCount" => $comment_count
1389
-        );
1390
-    }
1391
-    $schema['review'] = $reviews;
1392
-
1393
-    /**
1394
-     * Allow the schema JSON-LD info to be filtered.
1395
-     *
1396
-     * @since 1.5.4
1397
-     * @since 1.5.7 Added $post variable.
1398
-     * @param array $schema The array of schema data to be filtered.
1399
-     * @param object $post The post object.
1400
-     */
1401
-    $schema = apply_filters('geodir_details_schema', $schema,$post);
1402
-
1403
-
1404
-    echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1284
+	global $preview;
1285
+	if(empty($post)){global $post;}
1286
+	if ($preview || !geodir_is_page('detail')) {
1287
+		return;
1288
+	}
1289
+
1290
+	// url
1291
+	$c_url = geodir_curPageURL();
1292
+
1293
+	// post reviews
1294
+	$post_reviews = get_comments(array('post_id' => $post->ID, 'status' => 'approve'));
1295
+	if (empty($post_reviews)) {
1296
+		$reviews = '';
1297
+	} else {
1298
+		foreach ($post_reviews as $review) {
1299
+			$reviews[] = array(
1300
+				"@type" => "Review",
1301
+				"author" => $review->comment_author,
1302
+				"datePublished" => $review->comment_date,
1303
+				"description" => $review->comment_content,
1304
+				"reviewRating" => array(
1305
+					"@type" => "Rating",
1306
+					"bestRating" => "5",// @todo this will need to be filtered for review manager if user changes the score.
1307
+					"ratingValue" => geodir_get_commentoverall($review->comment_ID),
1308
+					"worstRating" => "1"
1309
+				)
1310
+			);
1311
+		}
1312
+
1313
+	}
1314
+
1315
+	// post images
1316
+	$post_images = geodir_get_images($post->ID, 'thumbnail', get_option('geodir_listing_no_img'));
1317
+	if (empty($post_images)) {
1318
+		$images = '';
1319
+	} else {
1320
+		$i_arr = array();
1321
+		foreach ($post_images as $img) {
1322
+			$i_arr[] = $img->src;
1323
+		}
1324
+
1325
+		if (count($i_arr) == 1) {
1326
+			$images = $i_arr[0];
1327
+		} else {
1328
+			$images = $i_arr;
1329
+		}
1330
+
1331
+	}
1332
+	//print_r($post);
1333
+	// external links
1334
+	$external_links =  array();
1335
+	$external_links[] = $post->geodir_website;
1336
+	$external_links[] = $post->geodir_twitter;
1337
+	$external_links[] = $post->geodir_facebook;
1338
+	$external_links = array_filter($external_links);
1339
+
1340
+	if(!empty($external_links)){
1341
+		$external_links = array_values($external_links);
1342
+	}
1343
+
1344
+	// reviews
1345
+	$comment_count = geodir_get_review_count_total($post->ID);
1346
+	$post_avgratings = geodir_get_post_rating($post->ID);
1347
+
1348
+	// schema type
1349
+	$schema_type = 'LocalBusiness';
1350
+	if(isset($post->default_category) && $post->default_category){
1351
+		$cat_schema = get_tax_meta($post->default_category, 'ct_cat_schema', false, $post->post_type);
1352
+		if($cat_schema){$schema_type = $cat_schema;}
1353
+		if(!$schema_type && $post->post_type=='gd_event'){$schema_type = 'Event';}
1354
+	}
1355
+
1356
+	$schema = array();
1357
+	$schema['@context'] = "http://schema.org";
1358
+	$schema['@type'] = $schema_type;
1359
+	$schema['name'] = $post->post_name;
1360
+	$schema['description'] = wp_strip_all_tags( $post->post_content, true );
1361
+	$schema['telephone'] = $post->geodir_contact;
1362
+	$schema['url'] = $c_url;
1363
+	$schema['sameAs'] = $external_links;
1364
+	$schema['image'] = $images;
1365
+	$schema['address'] = array(
1366
+		"@type" => "PostalAddress",
1367
+		"streetAddress" => $post->post_address,
1368
+		"addressLocality" => $post->post_city,
1369
+		"addressRegion" => $post->post_region,
1370
+		"addressCountry" => $post->post_country,
1371
+		"postalCode" => $post->post_zip
1372
+	);
1373
+
1374
+	if($post->post_latitude && $post->post_longitude) {
1375
+		$schema['geo'] = array(
1376
+			"@type" => "GeoCoordinates",
1377
+			"latitude" => $post->post_latitude,
1378
+			"longitude" => $post->post_longitude
1379
+		);
1380
+	}
1381
+
1382
+	if($post_avgratings) {
1383
+		$schema['aggregateRating'] = array(
1384
+			"@type" => "AggregateRating",
1385
+			"ratingValue" => $post_avgratings,
1386
+			"bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score.
1387
+			"worstRating" => "1",
1388
+			"ratingCount" => $comment_count
1389
+		);
1390
+	}
1391
+	$schema['review'] = $reviews;
1392
+
1393
+	/**
1394
+	 * Allow the schema JSON-LD info to be filtered.
1395
+	 *
1396
+	 * @since 1.5.4
1397
+	 * @since 1.5.7 Added $post variable.
1398
+	 * @param array $schema The array of schema data to be filtered.
1399
+	 * @param object $post The post object.
1400
+	 */
1401
+	$schema = apply_filters('geodir_details_schema', $schema,$post);
1402
+
1403
+
1404
+	echo '<script type="application/ld+json">' . json_encode($schema) . '</script>';
1405 1405
 
1406 1406
 }
1407 1407
 
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
  */
1420 1420
 function geodir_action_details_next_prev()
1421 1421
 {
1422
-    ?>
1422
+	?>
1423 1423
     <div class="geodir-pos_navigation clearfix">
1424 1424
     <div
1425 1425
         class="geodir-post_left"><?php previous_post_link('%link', '' . __('Previous', 'geodirectory'), false) ?></div>
@@ -1437,15 +1437,15 @@  discard block
 block discarded – undo
1437 1437
  */
1438 1438
 function geodir_action_before_single_post()
1439 1439
 {
1440
-    global $post;
1441
-    /**
1442
-     * Called at the very start of the details page output, before the title section.
1443
-     *
1444
-     * @since 1.0.0
1445
-     * @param object $post The current post object.
1446
-     * @global WP_Post|null $post The current post, if available.
1447
-     */
1448
-    do_action('geodir_before_single_post', $post); // extra action	
1440
+	global $post;
1441
+	/**
1442
+	 * Called at the very start of the details page output, before the title section.
1443
+	 *
1444
+	 * @since 1.0.0
1445
+	 * @param object $post The current post object.
1446
+	 * @global WP_Post|null $post The current post, if available.
1447
+	 */
1448
+	do_action('geodir_before_single_post', $post); // extra action	
1449 1449
 }
1450 1450
 
1451 1451
 /**
@@ -1456,13 +1456,13 @@  discard block
 block discarded – undo
1456 1456
  */
1457 1457
 function geodir_action_after_single_post($post)
1458 1458
 {
1459
-    /**
1460
-     * Called on the details page after the details page tabs section and before the next/prev buttons.
1461
-     *
1462
-     * @since 1.0.0
1463
-     * @param object $post The current post object.
1464
-     */
1465
-    do_action('geodir_after_single_post', $post); // extra action	
1459
+	/**
1460
+	 * Called on the details page after the details page tabs section and before the next/prev buttons.
1461
+	 *
1462
+	 * @since 1.0.0
1463
+	 * @param object $post The current post object.
1464
+	 */
1465
+	do_action('geodir_after_single_post', $post); // extra action	
1466 1466
 }
1467 1467
 
1468 1468
 add_action('geodir_details_main_content', 'geodir_action_before_single_post', 10);
@@ -1488,167 +1488,167 @@  discard block
 block discarded – undo
1488 1488
  */
1489 1489
 function geodir_action_listings_title()
1490 1490
 {
1491
-    global $wp, $term;
1491
+	global $wp, $term;
1492 1492
 
1493
-    $gd_post_type = geodir_get_current_posttype();
1494
-    $post_type_info = get_post_type_object($gd_post_type);
1493
+	$gd_post_type = geodir_get_current_posttype();
1494
+	$post_type_info = get_post_type_object($gd_post_type);
1495 1495
 
1496
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
1497
-    if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1498
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1499
-    }
1496
+	$add_string_in_title = __('All', 'geodirectory') . ' ';
1497
+	if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
1498
+		$add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
1499
+	}
1500 1500
 
1501
-    $list_title = $add_string_in_title . __(ucfirst($post_type_info->labels->name), 'geodirectory');
1502
-    $single_name = $post_type_info->labels->singular_name;
1501
+	$list_title = $add_string_in_title . __(ucfirst($post_type_info->labels->name), 'geodirectory');
1502
+	$single_name = $post_type_info->labels->singular_name;
1503 1503
 
1504
-    $taxonomy = geodir_get_taxonomies($gd_post_type, true);
1504
+	$taxonomy = geodir_get_taxonomies($gd_post_type, true);
1505 1505
 
1506
-    $gd_country = get_query_var('gd_country');
1507
-    $gd_region = get_query_var('gd_region');
1508
-    $gd_city = get_query_var('gd_city');
1506
+	$gd_country = get_query_var('gd_country');
1507
+	$gd_region = get_query_var('gd_region');
1508
+	$gd_city = get_query_var('gd_city');
1509 1509
 
1510
-    if (!empty($term)) {
1511
-        $location_name = '';
1512
-        if ($gd_country != '' || $gd_region != '' || $gd_city != '') {
1513
-            if ($gd_country != '') {
1514
-                $location_name = geodir_sanitize_location_name('gd_country', $gd_country);
1515
-            }
1516
-
1517
-            if ($gd_region != '') {
1518
-                $location_name = geodir_sanitize_location_name('gd_region', $gd_region);
1519
-            }
1520
-
1521
-            if ($gd_city != '') {
1522
-                $location_name = geodir_sanitize_location_name('gd_city', $gd_city);
1523
-            }
1524
-        }
1525
-
1526
-        $current_term = get_term_by('slug', $term, $taxonomy[0]);
1527
-        if (!empty($current_term)) {
1528
-            $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1529
-            if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1530
-                $location_last_char = substr($location_name, -1);
1531
-                $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1532
-                $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1533
-            } else {
1534
-                $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1535
-            }
1536
-        } else {
1537
-            if (count($taxonomy) > 1) {
1538
-                $current_term = get_term_by('slug', $term, $taxonomy[1]);
1539
-
1540
-                if (!empty($current_term)) {
1541
-                    $current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1542
-                    if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1543
-                        $location_last_char = substr($location_name, -1);
1544
-                        $location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1545
-                        $list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1546
-                    } else {
1547
-                        $list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1548
-                    }
1549
-                }
1550
-            }
1551
-        }
1552
-
1553
-    } else {
1554
-        $gd_country = (isset($wp->query_vars['gd_country']) && $wp->query_vars['gd_country'] != '') ? $wp->query_vars['gd_country'] : '';
1555
-        $gd_region = (isset($wp->query_vars['gd_region']) && $wp->query_vars['gd_region'] != '') ? $wp->query_vars['gd_region'] : '';
1556
-        $gd_city = (isset($wp->query_vars['gd_city']) && $wp->query_vars['gd_city'] != '') ? $wp->query_vars['gd_city'] : '';
1557
-
1558
-        $gd_country_actual = $gd_region_actual = $gd_city_actual = '';
1559
-
1560
-        if (function_exists('get_actual_location_name')) {
1561
-            $gd_country_actual = $gd_country != '' ? get_actual_location_name('country', $gd_country, true) : $gd_country;
1562
-            $gd_region_actual = $gd_region != '' ? get_actual_location_name('region', $gd_region) : $gd_region;
1563
-            $gd_city_actual = $gd_city != '' ? get_actual_location_name('city', $gd_city) : $gd_city;
1564
-        }
1565
-
1566
-        if ($gd_city != '') {
1567
-            if ($gd_city_actual != '') {
1568
-                $gd_city = $gd_city_actual;
1569
-            } else {
1570
-                $gd_city = preg_replace('/-(\d+)$/', '', $gd_city);
1571
-                $gd_city = preg_replace('/[_-]/', ' ', $gd_city);
1572
-                $gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1573
-            }
1574
-
1575
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1576
-        } else if ($gd_region != '') {
1577
-            if ($gd_region_actual != '') {
1578
-                $gd_region = $gd_region_actual;
1579
-            } else {
1580
-                $gd_region = preg_replace('/-(\d+)$/', '', $gd_region);
1581
-                $gd_region = preg_replace('/[_-]/', ' ', $gd_region);
1582
-                $gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1583
-            }
1584
-
1585
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1586
-        } else if ($gd_country != '') {
1587
-            if ($gd_country_actual != '') {
1588
-                $gd_country = $gd_country_actual;
1589
-            } else {
1590
-                $gd_country = preg_replace('/-(\d+)$/', '', $gd_country);
1591
-                $gd_country = preg_replace('/[_-]/', ' ', $gd_country);
1592
-                $gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1593
-            }
1594
-
1595
-            $list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1596
-        }
1597
-    }
1598
-
1599
-    if (is_search()) {
1600
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1601
-    }
1602
-    /** This action is documented in geodirectory_template_actions.php */
1603
-    $class = apply_filters('geodir_page_title_class', 'entry-title fn');
1604
-    /** This action is documented in geodirectory_template_actions.php */
1605
-    $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
1606
-
1607
-
1608
-    $title = $list_title;
1609
-    if(geodir_is_page('pt')){
1610
-        $gd_page = 'pt';
1611
-        $title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1612
-    }
1613
-    elseif(geodir_is_page('listing')){
1614
-        $gd_page = 'listing';
1615
-        global $wp_query;
1616
-        $current_term = $wp_query->get_queried_object();
1617
-        if (strpos($current_term->taxonomy,'_tags') !== false) {
1618
-            $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1619
-        }else{
1620
-            $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1621
-        }
1510
+	if (!empty($term)) {
1511
+		$location_name = '';
1512
+		if ($gd_country != '' || $gd_region != '' || $gd_city != '') {
1513
+			if ($gd_country != '') {
1514
+				$location_name = geodir_sanitize_location_name('gd_country', $gd_country);
1515
+			}
1622 1516
 
1623
-    }
1624
-    elseif(geodir_is_page('author')){
1625
-        $gd_page = 'author';
1626
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1627
-            $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1628
-        }else{
1629
-            $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1630
-        }
1517
+			if ($gd_region != '') {
1518
+				$location_name = geodir_sanitize_location_name('gd_region', $gd_region);
1519
+			}
1631 1520
 
1632
-    }
1521
+			if ($gd_city != '') {
1522
+				$location_name = geodir_sanitize_location_name('gd_city', $gd_city);
1523
+			}
1524
+		}
1525
+
1526
+		$current_term = get_term_by('slug', $term, $taxonomy[0]);
1527
+		if (!empty($current_term)) {
1528
+			$current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1529
+			if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1530
+				$location_last_char = substr($location_name, -1);
1531
+				$location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1532
+				$list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1533
+			} else {
1534
+				$list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1535
+			}
1536
+		} else {
1537
+			if (count($taxonomy) > 1) {
1538
+				$current_term = get_term_by('slug', $term, $taxonomy[1]);
1539
+
1540
+				if (!empty($current_term)) {
1541
+					$current_term_name = __(ucfirst($current_term->name), 'geodirectory');
1542
+					if ($current_term_name != '' && $location_name != '' && isset($current_term->taxonomy) && $current_term->taxonomy == $gd_post_type . 'category') {
1543
+						$location_last_char = substr($location_name, -1);
1544
+						$location_name_attach = geodir_strtolower($location_last_char) == 's' ? __("'", 'geodirectory') : __("'s", 'geodirectory');
1545
+						$list_title .= __(' in', 'geodirectory') . ' ' . $location_name . $location_name_attach . ' ' . $current_term_name;
1546
+					} else {
1547
+						$list_title .= __(' in', 'geodirectory') . " '" . $current_term_name . "'";
1548
+					}
1549
+				}
1550
+			}
1551
+		}
1552
+
1553
+	} else {
1554
+		$gd_country = (isset($wp->query_vars['gd_country']) && $wp->query_vars['gd_country'] != '') ? $wp->query_vars['gd_country'] : '';
1555
+		$gd_region = (isset($wp->query_vars['gd_region']) && $wp->query_vars['gd_region'] != '') ? $wp->query_vars['gd_region'] : '';
1556
+		$gd_city = (isset($wp->query_vars['gd_city']) && $wp->query_vars['gd_city'] != '') ? $wp->query_vars['gd_city'] : '';
1557
+
1558
+		$gd_country_actual = $gd_region_actual = $gd_city_actual = '';
1559
+
1560
+		if (function_exists('get_actual_location_name')) {
1561
+			$gd_country_actual = $gd_country != '' ? get_actual_location_name('country', $gd_country, true) : $gd_country;
1562
+			$gd_region_actual = $gd_region != '' ? get_actual_location_name('region', $gd_region) : $gd_region;
1563
+			$gd_city_actual = $gd_city != '' ? get_actual_location_name('city', $gd_city) : $gd_city;
1564
+		}
1565
+
1566
+		if ($gd_city != '') {
1567
+			if ($gd_city_actual != '') {
1568
+				$gd_city = $gd_city_actual;
1569
+			} else {
1570
+				$gd_city = preg_replace('/-(\d+)$/', '', $gd_city);
1571
+				$gd_city = preg_replace('/[_-]/', ' ', $gd_city);
1572
+				$gd_city = __(geodir_ucwords($gd_city), 'geodirectory');
1573
+			}
1633 1574
 
1575
+			$list_title .= __(' in', 'geodirectory') . " '" . $gd_city . "'";
1576
+		} else if ($gd_region != '') {
1577
+			if ($gd_region_actual != '') {
1578
+				$gd_region = $gd_region_actual;
1579
+			} else {
1580
+				$gd_region = preg_replace('/-(\d+)$/', '', $gd_region);
1581
+				$gd_region = preg_replace('/[_-]/', ' ', $gd_region);
1582
+				$gd_region = __(geodir_ucwords($gd_region), 'geodirectory');
1583
+			}
1634 1584
 
1635
-    /**
1636
-     * Filter page title to replace variables.
1637
-     *
1638
-     * @since 1.5.4
1639
-     * @param string $title The page title including variables.
1640
-     * @param string $gd_page The GeoDirectory page type if any.
1641
-     */
1642
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1585
+			$list_title .= __(' in', 'geodirectory') . " '" . $gd_region . "'";
1586
+		} else if ($gd_country != '') {
1587
+			if ($gd_country_actual != '') {
1588
+				$gd_country = $gd_country_actual;
1589
+			} else {
1590
+				$gd_country = preg_replace('/-(\d+)$/', '', $gd_country);
1591
+				$gd_country = preg_replace('/[_-]/', ' ', $gd_country);
1592
+				$gd_country = __(geodir_ucwords($gd_country), 'geodirectory');
1593
+			}
1643 1594
 
1644
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1645
-        /**
1646
-         * Filter the listing page title.
1647
-         *
1648
-         * @since 1.0.0
1649
-         * @param string $list_title The title for the category page.
1650
-         */
1651
-        apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1595
+			$list_title .= __(' in', 'geodirectory') . " '" . $gd_country . "'";
1596
+		}
1597
+	}
1598
+
1599
+	if (is_search()) {
1600
+		$list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
1601
+	}
1602
+	/** This action is documented in geodirectory_template_actions.php */
1603
+	$class = apply_filters('geodir_page_title_class', 'entry-title fn');
1604
+	/** This action is documented in geodirectory_template_actions.php */
1605
+	$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
1606
+
1607
+
1608
+	$title = $list_title;
1609
+	if(geodir_is_page('pt')){
1610
+		$gd_page = 'pt';
1611
+		$title  = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
1612
+	}
1613
+	elseif(geodir_is_page('listing')){
1614
+		$gd_page = 'listing';
1615
+		global $wp_query;
1616
+		$current_term = $wp_query->get_queried_object();
1617
+		if (strpos($current_term->taxonomy,'_tags') !== false) {
1618
+			$title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
1619
+		}else{
1620
+			$title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
1621
+		}
1622
+
1623
+	}
1624
+	elseif(geodir_is_page('author')){
1625
+		$gd_page = 'author';
1626
+		if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
1627
+			$title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
1628
+		}else{
1629
+			$title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
1630
+		}
1631
+
1632
+	}
1633
+
1634
+
1635
+	/**
1636
+	 * Filter page title to replace variables.
1637
+	 *
1638
+	 * @since 1.5.4
1639
+	 * @param string $title The page title including variables.
1640
+	 * @param string $gd_page The GeoDirectory page type if any.
1641
+	 */
1642
+	$title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
1643
+
1644
+	echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
1645
+		/**
1646
+		 * Filter the listing page title.
1647
+		 *
1648
+		 * @since 1.0.0
1649
+		 * @param string $list_title The title for the category page.
1650
+		 */
1651
+		apply_filters('geodir_listing_page_title', $title) . '</h1></header>';
1652 1652
 }
1653 1653
 
1654 1654
 add_action('geodir_listings_page_description', 'geodir_action_listings_description', 10);
@@ -1661,33 +1661,33 @@  discard block
 block discarded – undo
1661 1661
  */
1662 1662
 function geodir_action_listings_description()
1663 1663
 {
1664
-    global $wp_query;
1665
-    $current_term = $wp_query->get_queried_object();
1666
-
1667
-    $gd_post_type = geodir_get_current_posttype();
1668
-    if (isset($current_term->term_id) && $current_term->term_id != '') {
1669
-
1670
-        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1671
-        $saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1672
-        if ($term_desc && !$saved_data) {
1673
-            $saved_data = $term_desc;
1674
-        }
1675
-        /**
1676
-         * Apply the core filter `the_content` filter to the variable string.
1677
-         *
1678
-         * This is a WordPress core filter that does many things.
1679
-         *
1680
-         * @since 1.0.0
1681
-         * @param string $var The string to apply the filter to.
1682
-         */
1683
-        $cat_description = apply_filters('the_content', $saved_data);
1684
-        if ($cat_description) {
1685
-            ?>
1664
+	global $wp_query;
1665
+	$current_term = $wp_query->get_queried_object();
1666
+
1667
+	$gd_post_type = geodir_get_current_posttype();
1668
+	if (isset($current_term->term_id) && $current_term->term_id != '') {
1669
+
1670
+		$term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
1671
+		$saved_data = stripslashes(get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
1672
+		if ($term_desc && !$saved_data) {
1673
+			$saved_data = $term_desc;
1674
+		}
1675
+		/**
1676
+		 * Apply the core filter `the_content` filter to the variable string.
1677
+		 *
1678
+		 * This is a WordPress core filter that does many things.
1679
+		 *
1680
+		 * @since 1.0.0
1681
+		 * @param string $var The string to apply the filter to.
1682
+		 */
1683
+		$cat_description = apply_filters('the_content', $saved_data);
1684
+		if ($cat_description) {
1685
+			?>
1686 1686
 
1687 1687
             <div class="term_description"><?php echo $cat_description;?></div> <?php
1688
-        }
1688
+		}
1689 1689
 
1690
-    }
1690
+	}
1691 1691
 }
1692 1692
 
1693 1693
 // action for adding the listings page top widget area
@@ -1706,11 +1706,11 @@  discard block
 block discarded – undo
1706 1706
  */
1707 1707
 function geodir_action_geodir_sidebar_listings_top()
1708 1708
 {
1709
-    if (get_option('geodir_show_listing_top_section')) { ?>
1709
+	if (get_option('geodir_show_listing_top_section')) { ?>
1710 1710
         <div
1711 1711
             class="<?php
1712
-            /** This action is documented in geodirectory_template_actions.php */
1713
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_listing_top'); ?>">
1712
+			/** This action is documented in geodirectory_template_actions.php */
1713
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_listing_top'); ?>">
1714 1714
             <?php dynamic_sidebar('geodir_listing_top'); ?>
1715 1715
         </div><!-- clearfix ends here-->
1716 1716
     <?php }
@@ -1733,35 +1733,35 @@  discard block
 block discarded – undo
1733 1733
  */
1734 1734
 function geodir_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
1735 1735
 {
1736
-    if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1737
-        $width_css = 'style="width:' . $width . '%;"';
1738
-    } elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1739
-        $width_css = 'style="width:' . $width . '%;"';
1740
-    } elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1741
-        $width_css = 'style="width:' . $width . '%;"';
1742
-    } elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1743
-        $width_css = 'style="width:' . $width . '%;"';
1744
-    } else {
1745
-        $width_css = '';
1746
-    }
1747
-
1748
-    $tc = get_option('theme_compatibility_setting');
1749
-    if (!empty($tc['geodir_sidebar_left_open_replace'])) {
1750
-        $text = $tc['geodir_sidebar_left_open_replace'];
1751
-    } else {
1752
-        $text = '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>';
1753
-    }
1754
-
1755
-    if (!empty($tc['geodir_sidebar_left_open_id'])) {
1756
-        $id = $tc['geodir_sidebar_left_open_id'];
1757
-    }
1758
-    if (!empty($tc['geodir_sidebar_left_open_class'])) {
1759
-        $class = $tc['geodir_sidebar_left_open_class'];
1760
-    }
1761
-
1762
-    $text = str_replace(array("[id]", "[class]", "[itemtype]", "[width_css]"), array($id, $class, $itemtype, $width_css), $text);
1763
-
1764
-    echo $text;
1736
+	if ($type == 'home-page' && $width = get_option('geodir_width_home_left_section')) {
1737
+		$width_css = 'style="width:' . $width . '%;"';
1738
+	} elseif ($type == 'listings-page' && $width = get_option('geodir_width_listing_left_section')) {
1739
+		$width_css = 'style="width:' . $width . '%;"';
1740
+	} elseif ($type == 'search-page' && $width = get_option('geodir_width_search_left_section')) {
1741
+		$width_css = 'style="width:' . $width . '%;"';
1742
+	} elseif ($type == 'author-page' && $width = get_option('geodir_width_author_left_section')) {
1743
+		$width_css = 'style="width:' . $width . '%;"';
1744
+	} else {
1745
+		$width_css = '';
1746
+	}
1747
+
1748
+	$tc = get_option('theme_compatibility_setting');
1749
+	if (!empty($tc['geodir_sidebar_left_open_replace'])) {
1750
+		$text = $tc['geodir_sidebar_left_open_replace'];
1751
+	} else {
1752
+		$text = '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>';
1753
+	}
1754
+
1755
+	if (!empty($tc['geodir_sidebar_left_open_id'])) {
1756
+		$id = $tc['geodir_sidebar_left_open_id'];
1757
+	}
1758
+	if (!empty($tc['geodir_sidebar_left_open_class'])) {
1759
+		$class = $tc['geodir_sidebar_left_open_class'];
1760
+	}
1761
+
1762
+	$text = str_replace(array("[id]", "[class]", "[itemtype]", "[width_css]"), array($id, $class, $itemtype, $width_css), $text);
1763
+
1764
+	echo $text;
1765 1765
 }
1766 1766
 
1767 1767
 // action for adding the primary div closing tag
@@ -1777,13 +1777,13 @@  discard block
 block discarded – undo
1777 1777
  */
1778 1778
 function geodir_action_sidebar_left_close($type = '')
1779 1779
 {
1780
-    $tc = get_option('theme_compatibility_setting');
1781
-    if (!empty($tc['geodir_sidebar_left_close_replace'])) {
1782
-        $text = $tc['geodir_sidebar_left_close_replace'];
1783
-    } else {
1784
-        $text = '</aside><!-- sidebar ends here-->';
1785
-    }
1786
-    echo $text;
1780
+	$tc = get_option('theme_compatibility_setting');
1781
+	if (!empty($tc['geodir_sidebar_left_close_replace'])) {
1782
+		$text = $tc['geodir_sidebar_left_close_replace'];
1783
+	} else {
1784
+		$text = '</aside><!-- sidebar ends here-->';
1785
+	}
1786
+	echo $text;
1787 1787
 }
1788 1788
 
1789 1789
 /**
@@ -1796,7 +1796,7 @@  discard block
 block discarded – undo
1796 1796
  */
1797 1797
 function geodir_listing_left_section()
1798 1798
 {
1799
-    if (get_option('geodir_show_listing_left_section')) { ?>
1799
+	if (get_option('geodir_show_listing_left_section')) { ?>
1800 1800
         <div class="geodir-content-left geodir-sidebar-wrap">
1801 1801
             <?php dynamic_sidebar('geodir_listing_left_sidebar'); ?>
1802 1802
         </div><!-- end geodir-content-left -->
@@ -1814,20 +1814,20 @@  discard block
 block discarded – undo
1814 1814
  */
1815 1815
 function geodir_action_listings_sidebar_left()
1816 1816
 {
1817
-    if (get_option('geodir_show_listing_left_section')) {
1818
-        /** This action is documented in geodirectory_template_actions.php */
1819
-        do_action('geodir_sidebar_left_open', 'listings-page', 'geodir-sidebar-left', 'geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
1820
-        /**
1821
-         * Calls the listings page (category) left sidebar content.
1822
-         *
1823
-         * All the content for the listings page left sidebar is added via this hook.
1824
-         *
1825
-         * @since 1.0.0
1826
-         */
1827
-        do_action('geodir_listings_sidebar_left_inside');
1828
-        /** This action is documented in geodirectory_template_actions.php */
1829
-        do_action('geodir_sidebar_left_close', 'listings-page');
1830
-    }
1817
+	if (get_option('geodir_show_listing_left_section')) {
1818
+		/** This action is documented in geodirectory_template_actions.php */
1819
+		do_action('geodir_sidebar_left_open', 'listings-page', 'geodir-sidebar-left', 'geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
1820
+		/**
1821
+		 * Calls the listings page (category) left sidebar content.
1822
+		 *
1823
+		 * All the content for the listings page left sidebar is added via this hook.
1824
+		 *
1825
+		 * @since 1.0.0
1826
+		 */
1827
+		do_action('geodir_listings_sidebar_left_inside');
1828
+		/** This action is documented in geodirectory_template_actions.php */
1829
+		do_action('geodir_sidebar_left_close', 'listings-page');
1830
+	}
1831 1831
 }
1832 1832
 
1833 1833
 /**
@@ -1840,7 +1840,7 @@  discard block
 block discarded – undo
1840 1840
  */
1841 1841
 function geodir_listing_right_section()
1842 1842
 {
1843
-    if (get_option('geodir_show_listing_right_section')) { ?>
1843
+	if (get_option('geodir_show_listing_right_section')) { ?>
1844 1844
         <div class="geodir-content-right geodir-sidebar-wrap">
1845 1845
             <?php dynamic_sidebar('geodir_listing_right_sidebar'); ?>
1846 1846
         </div><!-- end geodir-content-right -->
@@ -1858,20 +1858,20 @@  discard block
 block discarded – undo
1858 1858
  */
1859 1859
 function geodir_action_listings_sidebar_right()
1860 1860
 {
1861
-    if (get_option('geodir_show_listing_right_section')) {
1862
-        /** This action is documented in geodirectory_template_actions.php */
1863
-        do_action('geodir_sidebar_right_open', 'listings-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
1864
-        /**
1865
-         * Calls the listings page (category) right sidebar content.
1866
-         *
1867
-         * All the content for the listings page right sidebar is added via this hook.
1868
-         *
1869
-         * @since 1.0.0
1870
-         */
1871
-        do_action('geodir_listings_sidebar_right_inside');
1872
-        /** This action is documented in geodirectory_template_actions.php */
1873
-        do_action('geodir_sidebar_right_close', 'listings-page');
1874
-    }
1861
+	if (get_option('geodir_show_listing_right_section')) {
1862
+		/** This action is documented in geodirectory_template_actions.php */
1863
+		do_action('geodir_sidebar_right_open', 'listings-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
1864
+		/**
1865
+		 * Calls the listings page (category) right sidebar content.
1866
+		 *
1867
+		 * All the content for the listings page right sidebar is added via this hook.
1868
+		 *
1869
+		 * @since 1.0.0
1870
+		 */
1871
+		do_action('geodir_listings_sidebar_right_inside');
1872
+		/** This action is documented in geodirectory_template_actions.php */
1873
+		do_action('geodir_sidebar_right_close', 'listings-page');
1874
+	}
1875 1875
 }
1876 1876
 
1877 1877
 
@@ -1888,23 +1888,23 @@  discard block
 block discarded – undo
1888 1888
  */
1889 1889
 function geodir_action_main_content_open($type = '', $id = '', $class = '')
1890 1890
 {
1891
-    $tc = get_option('theme_compatibility_setting');
1892
-    if (!empty($tc['geodir_main_content_open_replace'])) {
1893
-        $text = $tc['geodir_main_content_open_replace'];
1894
-    } else {
1895
-        $text = '<main id="[id]" class="[class]" role="main">';
1896
-    }
1891
+	$tc = get_option('theme_compatibility_setting');
1892
+	if (!empty($tc['geodir_main_content_open_replace'])) {
1893
+		$text = $tc['geodir_main_content_open_replace'];
1894
+	} else {
1895
+		$text = '<main id="[id]" class="[class]" role="main">';
1896
+	}
1897 1897
 
1898
-    if (!empty($tc['geodir_main_content_open_id'])) {
1899
-        $id = $tc['geodir_main_content_open_id'];
1900
-    }
1901
-    if (!empty($tc['geodir_main_content_open_class'])) {
1902
-        $class = $tc['geodir_main_content_open_class'];
1903
-    }
1898
+	if (!empty($tc['geodir_main_content_open_id'])) {
1899
+		$id = $tc['geodir_main_content_open_id'];
1900
+	}
1901
+	if (!empty($tc['geodir_main_content_open_class'])) {
1902
+		$class = $tc['geodir_main_content_open_class'];
1903
+	}
1904 1904
 
1905
-    $text = str_replace(array("[id]", "[class]"), array($id, $class), $text);
1905
+	$text = str_replace(array("[id]", "[class]"), array($id, $class), $text);
1906 1906
 
1907
-    echo $text;
1907
+	echo $text;
1908 1908
 }
1909 1909
 
1910 1910
 // action for adding the primary div closing tag
@@ -1917,13 +1917,13 @@  discard block
 block discarded – undo
1917 1917
  */
1918 1918
 function geodir_action_main_content_close()
1919 1919
 {
1920
-    $tc = get_option('theme_compatibility_setting');
1921
-    if (!empty($tc['geodir_main_content_close_replace'])) {
1922
-        $text = $tc['geodir_main_content_close_replace'];
1923
-    } else {
1924
-        $text = '</main><!-- main ends here-->';
1925
-    }
1926
-    echo $text;
1920
+	$tc = get_option('theme_compatibility_setting');
1921
+	if (!empty($tc['geodir_main_content_close_replace'])) {
1922
+		$text = $tc['geodir_main_content_close_replace'];
1923
+	} else {
1924
+		$text = '</main><!-- main ends here-->';
1925
+	}
1926
+	echo $text;
1927 1927
 }
1928 1928
 
1929 1929
 /**
@@ -1935,14 +1935,14 @@  discard block
 block discarded – undo
1935 1935
  */
1936 1936
 function geodir_action_listings_content_inside()
1937 1937
 {
1938
-    global $gridview_columns;
1939
-    $listing_view = get_option('geodir_listing_view');
1940
-    if (strstr($listing_view, 'gridview')) {
1941
-        $gridview_columns = $listing_view;
1942
-        $listing_view_exp = explode('_', $listing_view);
1943
-        $listing_view = $listing_view_exp[0];
1944
-    }
1945
-    geodir_get_template_part('listing', 'listview');
1938
+	global $gridview_columns;
1939
+	$listing_view = get_option('geodir_listing_view');
1940
+	if (strstr($listing_view, 'gridview')) {
1941
+		$gridview_columns = $listing_view;
1942
+		$listing_view_exp = explode('_', $listing_view);
1943
+		$listing_view = $listing_view_exp[0];
1944
+	}
1945
+	geodir_get_template_part('listing', 'listview');
1946 1946
 }
1947 1947
 
1948 1948
 add_action('geodir_listings_content_inside', 'geodir_action_listings_content_inside', 10);
@@ -1958,47 +1958,47 @@  discard block
 block discarded – undo
1958 1958
  */
1959 1959
 function geodir_action_listings_content()
1960 1960
 {
1961
-    /**
1962
-     * This is used to add HTML opening wrappers to the main content of most pages including listings, author, search, home etc.
1963
-     *
1964
-     * @since 1.0.0
1965
-     * @param string $type The page type. Values can be 'listings-page', 'author-page', 'search-page' or 'home-page'.
1966
-     * @param string $id The id for the div. Usually 'geodir-main-content'.
1967
-     * @param string $class The class for the div. Values can be 'listings-page', 'author-page', 'search-page' or 'home-page'.
1968
-     * @see 'geodir_main_content_close' Where the oposing closing tag is added.
1969
-     */
1970
-    do_action('geodir_main_content_open', 'listings-page', 'geodir-main-content', 'listings-page');
1971
-    $extra_class = apply_filters('geodir_before_listing_wrapper_extra_class', '', 'listings-page');
1972
-    echo '<div class="clearfix '.$extra_class.'">';
1973
-    /**
1974
-     * Called before the listings page content, inside the outer wrapper. Used on listings pages and search and author pages.
1975
-     *
1976
-     * @since 1.0.0
1977
-     */
1978
-    do_action('geodir_before_listing');
1979
-    echo '</div>';
1980
-
1981
-    /**
1982
-     * This actions calls the listings list content. Used on listings pages and search and author pages.
1983
-     *
1984
-     * @since 1.0.0
1985
-     */
1986
-    do_action('geodir_listings_content_inside');
1987
-
1988
-    /**
1989
-     * Called after the listings content, inside the outer wrapper HTML. Used on listings pages and search and author pages.
1990
-     *
1991
-     * @since 1.0.0
1992
-     */
1993
-    do_action('geodir_after_listing');
1994
-
1995
-    /**
1996
-     * This is used to add HTML closing wrappers to the main content of most pages including listings, author, search, home etc.
1997
-     *
1998
-     * @since 1.0.0
1999
-     * @see 'geodir_main_content_open' Where the oposing opening tag is added.
2000
-     */
2001
-    do_action('geodir_main_content_close', 'listings-page');
1961
+	/**
1962
+	 * This is used to add HTML opening wrappers to the main content of most pages including listings, author, search, home etc.
1963
+	 *
1964
+	 * @since 1.0.0
1965
+	 * @param string $type The page type. Values can be 'listings-page', 'author-page', 'search-page' or 'home-page'.
1966
+	 * @param string $id The id for the div. Usually 'geodir-main-content'.
1967
+	 * @param string $class The class for the div. Values can be 'listings-page', 'author-page', 'search-page' or 'home-page'.
1968
+	 * @see 'geodir_main_content_close' Where the oposing closing tag is added.
1969
+	 */
1970
+	do_action('geodir_main_content_open', 'listings-page', 'geodir-main-content', 'listings-page');
1971
+	$extra_class = apply_filters('geodir_before_listing_wrapper_extra_class', '', 'listings-page');
1972
+	echo '<div class="clearfix '.$extra_class.'">';
1973
+	/**
1974
+	 * Called before the listings page content, inside the outer wrapper. Used on listings pages and search and author pages.
1975
+	 *
1976
+	 * @since 1.0.0
1977
+	 */
1978
+	do_action('geodir_before_listing');
1979
+	echo '</div>';
1980
+
1981
+	/**
1982
+	 * This actions calls the listings list content. Used on listings pages and search and author pages.
1983
+	 *
1984
+	 * @since 1.0.0
1985
+	 */
1986
+	do_action('geodir_listings_content_inside');
1987
+
1988
+	/**
1989
+	 * Called after the listings content, inside the outer wrapper HTML. Used on listings pages and search and author pages.
1990
+	 *
1991
+	 * @since 1.0.0
1992
+	 */
1993
+	do_action('geodir_after_listing');
1994
+
1995
+	/**
1996
+	 * This is used to add HTML closing wrappers to the main content of most pages including listings, author, search, home etc.
1997
+	 *
1998
+	 * @since 1.0.0
1999
+	 * @see 'geodir_main_content_open' Where the oposing opening tag is added.
2000
+	 */
2001
+	do_action('geodir_main_content_close', 'listings-page');
2002 2002
 }
2003 2003
 
2004 2004
 
@@ -2013,10 +2013,10 @@  discard block
 block discarded – undo
2013 2013
  */
2014 2014
 function geodir_action_sidebar_listings_bottom_section()
2015 2015
 {
2016
-    if (get_option('geodir_show_listing_bottom_section')) { ?>
2016
+	if (get_option('geodir_show_listing_bottom_section')) { ?>
2017 2017
         <div class="<?php
2018
-            /** This action is documented in geodirectory_template_actions.php */
2019
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_listing_bottom'); ?>">
2018
+			/** This action is documented in geodirectory_template_actions.php */
2019
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_listing_bottom'); ?>">
2020 2020
             <?php dynamic_sidebar('geodir_listing_bottom'); ?>
2021 2021
         </div><!-- clearfix ends here-->
2022 2022
     <?php }
@@ -2036,38 +2036,38 @@  discard block
 block discarded – undo
2036 2036
  */
2037 2037
 function geodir_action_add_listing_page_title()
2038 2038
 {
2039
-    if (isset($_REQUEST['listing_type']) && $_REQUEST['listing_type'] != '')
2040
-        $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2041
-    /** This action is documented in geodirectory_template_actions.php */
2042
-    $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2043
-    /** This action is documented in geodirectory_template_actions.php */
2044
-    $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2045
-
2046
-    $title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2047
-
2048
-    if(geodir_is_page('add-listing')){
2049
-        $gd_page = 'add-listing';
2050
-        if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2051
-            $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2052
-        }elseif(isset($listing_type)){
2053
-            $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2054
-        }
2039
+	if (isset($_REQUEST['listing_type']) && $_REQUEST['listing_type'] != '')
2040
+		$listing_type = sanitize_text_field($_REQUEST['listing_type']);
2041
+	/** This action is documented in geodirectory_template_actions.php */
2042
+	$class = apply_filters('geodir_page_title_class', 'entry-title fn');
2043
+	/** This action is documented in geodirectory_template_actions.php */
2044
+	$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2045
+
2046
+	$title = apply_filters('geodir_add_listing_page_title_text', get_the_title());
2047
+
2048
+	if(geodir_is_page('add-listing')){
2049
+		$gd_page = 'add-listing';
2050
+		if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
2051
+			$title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
2052
+		}elseif(isset($listing_type)){
2053
+			$title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
2054
+		}
2055 2055
 
2056
-    }
2056
+	}
2057 2057
 
2058 2058
 
2059
-    /**
2060
-     * Filter page title to replace variables.
2061
-     *
2062
-     * @since 1.5.4
2063
-     * @param string $title The page title including variables.
2064
-     * @param string $gd_page The GeoDirectory page type if any.
2065
-     */
2066
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2059
+	/**
2060
+	 * Filter page title to replace variables.
2061
+	 *
2062
+	 * @since 1.5.4
2063
+	 * @param string $title The page title including variables.
2064
+	 * @param string $gd_page The GeoDirectory page type if any.
2065
+	 */
2066
+	$title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2067 2067
 
2068
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2069
-    echo $title;
2070
-    echo '</h1></header>';
2068
+	echo '<header class="' . $class_header . '"><h1 class="' . $class . '">';
2069
+	echo $title;
2070
+	echo '</h1></header>';
2071 2071
 }
2072 2072
 
2073 2073
 add_action('geodir_add_listing_page_mandatory', 'geodir_action_add_listing_page_mandatory', 10);
@@ -2098,59 +2098,59 @@  discard block
 block discarded – undo
2098 2098
  */
2099 2099
 function geodir_action_add_listing_form()
2100 2100
 {
2101
-    global $cat_display, $post_cat, $current_user, $gd_session;
2102
-    $page_id = get_the_ID();
2103
-    $post = '';
2104
-    $title = '';
2105
-    $desc = '';
2106
-    $kw_tags = '';
2107
-    $required_msg = '';
2108
-    $submit_button = '';
2109
-
2110
-    $ajax_action = isset($_REQUEST['ajax_action']) ? $_REQUEST['ajax_action'] : 'add';
2111
-
2112
-    $thumb_img_arr = array();
2113
-    $curImages = '';
2114
-
2115
-    if (isset($_REQUEST['backandedit'])) {
2116
-        global $post;
2117
-        $post = (object)$gd_session->get('listing');
2118
-        $listing_type = $post->listing_type;
2119
-        $title = $post->post_title;
2120
-        $desc = $post->post_desc;
2121
-        $post_cat = $post->post_category;
2122
-
2123
-        $kw_tags = $post->post_tags;
2124
-        $curImages = isset($post->post_images) ? $post->post_images : '';
2125
-    } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2126
-        global $post, $post_images;
2127
-
2128
-        $post = geodir_get_post_info($_REQUEST['pid']);
2129
-        $thumb_img_arr = geodir_get_images($post->ID);
2130
-        if ($thumb_img_arr) {
2131
-            foreach ($thumb_img_arr as $post_img) {
2132
-                $curImages .= $post_img->src . ',';
2133
-            }
2134
-        }
2101
+	global $cat_display, $post_cat, $current_user, $gd_session;
2102
+	$page_id = get_the_ID();
2103
+	$post = '';
2104
+	$title = '';
2105
+	$desc = '';
2106
+	$kw_tags = '';
2107
+	$required_msg = '';
2108
+	$submit_button = '';
2109
+
2110
+	$ajax_action = isset($_REQUEST['ajax_action']) ? $_REQUEST['ajax_action'] : 'add';
2111
+
2112
+	$thumb_img_arr = array();
2113
+	$curImages = '';
2114
+
2115
+	if (isset($_REQUEST['backandedit'])) {
2116
+		global $post;
2117
+		$post = (object)$gd_session->get('listing');
2118
+		$listing_type = $post->listing_type;
2119
+		$title = $post->post_title;
2120
+		$desc = $post->post_desc;
2121
+		$post_cat = $post->post_category;
2122
+
2123
+		$kw_tags = $post->post_tags;
2124
+		$curImages = isset($post->post_images) ? $post->post_images : '';
2125
+	} elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2126
+		global $post, $post_images;
2127
+
2128
+		$post = geodir_get_post_info($_REQUEST['pid']);
2129
+		$thumb_img_arr = geodir_get_images($post->ID);
2130
+		if ($thumb_img_arr) {
2131
+			foreach ($thumb_img_arr as $post_img) {
2132
+				$curImages .= $post_img->src . ',';
2133
+			}
2134
+		}
2135 2135
 
2136
-        $listing_type = $post->post_type;
2137
-        $title = $post->post_title;
2138
-        $desc = $post->post_content;
2139
-        $kw_tags = $post->post_tags;
2140
-        $kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2141
-    } else {
2142
-        $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2143
-    }
2136
+		$listing_type = $post->post_type;
2137
+		$title = $post->post_title;
2138
+		$desc = $post->post_content;
2139
+		$kw_tags = $post->post_tags;
2140
+		$kw_tags = implode(",", wp_get_object_terms($post->ID, $listing_type . '_tags', array('fields' => 'names')));
2141
+	} else {
2142
+		$listing_type = sanitize_text_field($_REQUEST['listing_type']);
2143
+	}
2144 2144
 
2145
-    if ($current_user->ID != '0') {
2146
-        $user_login = true;
2147
-    }
2145
+	if ($current_user->ID != '0') {
2146
+		$user_login = true;
2147
+	}
2148 2148
 
2149
-    $post_type_info = geodir_get_posttype_info($listing_type);
2149
+	$post_type_info = geodir_get_posttype_info($listing_type);
2150 2150
 
2151
-    $cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing','geodirectory');
2151
+	$cpt_singular_name = (isset($post_type_info['labels']['singular_name']) && $post_type_info['labels']['singular_name']) ? $post_type_info['labels']['singular_name'] : __('Listing','geodirectory');
2152 2152
 
2153
-    ?>
2153
+	?>
2154 2154
     <form name="propertyform" id="propertyform" action="<?php echo get_page_link(geodir_preview_page_id());?>" method="post" enctype="multipart/form-data">
2155 2155
         <input type="hidden" name="preview" value="<?php echo sanitize_text_field($listing_type);?>"/>
2156 2156
         <input type="hidden" name="listing_type" value="<?php echo sanitize_text_field($listing_type);?>"/>
@@ -2161,27 +2161,27 @@  discard block
 block discarded – undo
2161 2161
         <?php } if (isset($_REQUEST['backandedit'])) { ?>
2162 2162
             <input type="hidden" name="backandedit" value="<?php echo sanitize_text_field($_REQUEST['backandedit']);?>"/>
2163 2163
         <?php
2164
-        } 
2165
-        /**
2166
-         * Called at the very top of the add listing page form for frontend.
2167
-         *
2168
-         * This is called just before the "Enter Listing Details" text.
2169
-         *
2170
-         * @since 1.0.0
2171
-         */
2172
-        do_action('geodir_before_detail_fields');
2173
-        ?>
2164
+		} 
2165
+		/**
2166
+		 * Called at the very top of the add listing page form for frontend.
2167
+		 *
2168
+		 * This is called just before the "Enter Listing Details" text.
2169
+		 *
2170
+		 * @since 1.0.0
2171
+		 */
2172
+		do_action('geodir_before_detail_fields');
2173
+		?>
2174 2174
         <h5 id="geodir_fieldset_details" class="geodir-fieldset-row" gd-fieldset="details"><?php echo LISTING_DETAILS_TEXT;?></h5>
2175 2175
         <?php
2176
-        /**
2177
-         * Called at the top of the add listing page form for frontend.
2178
-         *
2179
-         * This is called after the "Enter Listing Details" text.
2180
-         *
2181
-         * @since 1.0.0
2182
-         */
2183
-        do_action('geodir_before_main_form_fields');
2184
-        ?>
2176
+		/**
2177
+		 * Called at the top of the add listing page form for frontend.
2178
+		 *
2179
+		 * This is called after the "Enter Listing Details" text.
2180
+		 *
2181
+		 * @since 1.0.0
2182
+		 */
2183
+		do_action('geodir_before_main_form_fields');
2184
+		?>
2185 2185
         <div id="geodir_post_title_row" class="required_field geodir_form_row clearfix gd-fieldset-details">
2186 2186
             <label><?php echo sprintf( __('%s Title', 'geodirectory'), $cpt_singular_name ); ?><span>*</span> </label>
2187 2187
             <input type="text" field_type="text" name="post_title" id="post_title" class="geodir_textfield"
@@ -2189,57 +2189,57 @@  discard block
 block discarded – undo
2189 2189
             <span class="geodir_message_error"><?php _e($required_msg, 'geodirectory');?></span>
2190 2190
         </div>
2191 2191
         <?php
2192
-        $show_editor = get_option('geodir_tiny_editor_on_add_listing');
2193
-
2194
-        $desc = $show_editor ? stripslashes($desc) : esc_attr(stripslashes($desc));
2195
-        $desc_limit = '';
2196
-        /**
2197
-         * Filter the add listing description field character limit number.
2198
-         *
2199
-         * @since 1.0.0
2200
-         * @param int $desc_limit The amount of characters to limit the description to.
2201
-         */
2202
-        $desc_limit = apply_filters('geodir_description_field_desc_limit', $desc_limit);
2203
-        /**
2204
-         * Filter the add listing description field text.
2205
-         *
2206
-         * @since 1.0.0
2207
-         * @param string $desc The text for the description field.
2208
-         * @param int $desc_limit The character limit number if any.
2209
-         */
2210
-        $desc = apply_filters('geodir_description_field_desc', $desc, $desc_limit);
2211
-        $desc_limit_msg = '';
2212
-        /**
2213
-         * Filter the add listing description limit message.
2214
-         *
2215
-         * This is the message shown if there is a limit applied to the amount of characters the description can use.
2216
-         *
2217
-         * @since 1.0.0
2218
-         * @param string $desc_limit_msg The limit message string if any.
2219
-         * @param int $desc_limit The character limit numer if any.
2220
-         */
2221
-        $desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2192
+		$show_editor = get_option('geodir_tiny_editor_on_add_listing');
2193
+
2194
+		$desc = $show_editor ? stripslashes($desc) : esc_attr(stripslashes($desc));
2195
+		$desc_limit = '';
2196
+		/**
2197
+		 * Filter the add listing description field character limit number.
2198
+		 *
2199
+		 * @since 1.0.0
2200
+		 * @param int $desc_limit The amount of characters to limit the description to.
2201
+		 */
2202
+		$desc_limit = apply_filters('geodir_description_field_desc_limit', $desc_limit);
2203
+		/**
2204
+		 * Filter the add listing description field text.
2205
+		 *
2206
+		 * @since 1.0.0
2207
+		 * @param string $desc The text for the description field.
2208
+		 * @param int $desc_limit The character limit number if any.
2209
+		 */
2210
+		$desc = apply_filters('geodir_description_field_desc', $desc, $desc_limit);
2211
+		$desc_limit_msg = '';
2212
+		/**
2213
+		 * Filter the add listing description limit message.
2214
+		 *
2215
+		 * This is the message shown if there is a limit applied to the amount of characters the description can use.
2216
+		 *
2217
+		 * @since 1.0.0
2218
+		 * @param string $desc_limit_msg The limit message string if any.
2219
+		 * @param int $desc_limit The character limit numer if any.
2220
+		 */
2221
+		$desc_limit_msg = apply_filters('geodir_description_field_desc_limit_msg', $desc_limit_msg, $desc_limit);
2222 2222
         
2223
-        $desc_class = '';
2224
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2225
-            /**
2226
-             * Called on the add listing page form for frontend just before the description field.
2227
-             *
2228
-             * @since 1.0.0
2229
-             */
2230
-            do_action('geodir_before_description_field');
2223
+		$desc_class = '';
2224
+		if ($desc_limit === '' || (int)$desc_limit > 0) {
2225
+			/**
2226
+			 * Called on the add listing page form for frontend just before the description field.
2227
+			 *
2228
+			 * @since 1.0.0
2229
+			 */
2230
+			do_action('geodir_before_description_field');
2231 2231
             
2232
-            $desc_class = ' required_field';
2233
-        } else {
2234
-            $desc_class = ' hidden';
2235
-        }
2236
-        ?>
2232
+			$desc_class = ' required_field';
2233
+		} else {
2234
+			$desc_class = ' hidden';
2235
+		}
2236
+		?>
2237 2237
         <div id="geodir_post_desc_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $desc_class;?>">
2238 2238
             <label><?php echo sprintf( __('%s Description', 'geodirectory'), $cpt_singular_name ); ?><span><?php if ($desc_limit != '0') { echo '*'; } ?></span> </label>
2239 2239
             <?php
2240
-            if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2241
-                $editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
2242
-            ?>
2240
+			if (!empty($show_editor) && in_array($listing_type, $show_editor)) {
2241
+				$editor_settings = array('media_buttons' => false, 'textarea_rows' => 10);
2242
+			?>
2243 2243
                 <div class="editor" field_id="post_desc" field_type="editor">
2244 2244
                     <?php wp_editor($desc, "post_desc", $editor_settings); ?>
2245 2245
                 </div>
@@ -2253,56 +2253,56 @@  discard block
 block discarded – undo
2253 2253
             <span class="geodir_message_error"><?php echo _e($required_msg, 'geodirectory');?></span>
2254 2254
         </div>
2255 2255
         <?php
2256
-        if ($desc_limit === '' || (int)$desc_limit > 0) {
2257
-            /**
2258
-             * Called on the add listing page form for frontend just after the description field.
2259
-             *
2260
-             * @since 1.0.0
2261
-             */
2262
-            do_action('geodir_after_description_field');
2263
-        }
2256
+		if ($desc_limit === '' || (int)$desc_limit > 0) {
2257
+			/**
2258
+			 * Called on the add listing page form for frontend just after the description field.
2259
+			 *
2260
+			 * @since 1.0.0
2261
+			 */
2262
+			do_action('geodir_after_description_field');
2263
+		}
2264 2264
         
2265
-        $kw_tags = esc_attr(stripslashes($kw_tags));
2266
-        $kw_tags_count = TAGKW_TEXT_COUNT;
2267
-        $kw_tags_msg = TAGKW_MSG;
2268
-        /**
2269
-         * Filter the add listing tags character limit.
2270
-         *
2271
-         * @since 1.0.0
2272
-         * @param int $kw_tags_count The character count limit if any.
2273
-         */
2274
-        $kw_tags_count = apply_filters('geodir_listing_tags_field_tags_count', $kw_tags_count);
2275
-        /**
2276
-         * Filter the add listing tags field value.
2277
-         *
2278
-         * You can use the $_REQUEST values to check if this is a go back and edit value etc.
2279
-         *
2280
-         * @since 1.0.0
2281
-         * @param string $kw_tags The tag field value, usually a comma separated list of tags.
2282
-         * @param int $kw_tags_count The character count limit if any.
2283
-         */
2284
-        $kw_tags = apply_filters('geodir_listing_tags_field_tags', $kw_tags, $kw_tags_count);
2285
-        /**
2286
-         * Filter the add listing tags field message text.
2287
-         *
2288
-         * @since 1.0.0
2289
-         * @param string $kw_tags_msg The message shown under the field.
2290
-         * @param int $kw_tags_count The character count limit if any.
2291
-         */
2292
-        $kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2265
+		$kw_tags = esc_attr(stripslashes($kw_tags));
2266
+		$kw_tags_count = TAGKW_TEXT_COUNT;
2267
+		$kw_tags_msg = TAGKW_MSG;
2268
+		/**
2269
+		 * Filter the add listing tags character limit.
2270
+		 *
2271
+		 * @since 1.0.0
2272
+		 * @param int $kw_tags_count The character count limit if any.
2273
+		 */
2274
+		$kw_tags_count = apply_filters('geodir_listing_tags_field_tags_count', $kw_tags_count);
2275
+		/**
2276
+		 * Filter the add listing tags field value.
2277
+		 *
2278
+		 * You can use the $_REQUEST values to check if this is a go back and edit value etc.
2279
+		 *
2280
+		 * @since 1.0.0
2281
+		 * @param string $kw_tags The tag field value, usually a comma separated list of tags.
2282
+		 * @param int $kw_tags_count The character count limit if any.
2283
+		 */
2284
+		$kw_tags = apply_filters('geodir_listing_tags_field_tags', $kw_tags, $kw_tags_count);
2285
+		/**
2286
+		 * Filter the add listing tags field message text.
2287
+		 *
2288
+		 * @since 1.0.0
2289
+		 * @param string $kw_tags_msg The message shown under the field.
2290
+		 * @param int $kw_tags_count The character count limit if any.
2291
+		 */
2292
+		$kw_tags_msg = apply_filters('geodir_listing_tags_field_tags_msg', $kw_tags_msg, $kw_tags_count);
2293 2293
         
2294
-        $tags_class = '';
2295
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2296
-            /**
2297
-             * Called on the add listing page form for frontend just before the tags field.
2298
-             *
2299
-             * @since 1.0.0
2300
-             */
2301
-            do_action('geodir_before_listing_tags_field');
2302
-        } else {
2303
-            $tags_class = ' hidden';
2304
-        }
2305
-        ?>
2294
+		$tags_class = '';
2295
+		if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2296
+			/**
2297
+			 * Called on the add listing page form for frontend just before the tags field.
2298
+			 *
2299
+			 * @since 1.0.0
2300
+			 */
2301
+			do_action('geodir_before_listing_tags_field');
2302
+		} else {
2303
+			$tags_class = ' hidden';
2304
+		}
2305
+		?>
2306 2306
         <div id="geodir_post_tags_row" class="geodir_form_row clearfix gd-fieldset-details<?php echo $tags_class;?>">
2307 2307
             <label><?php echo TAGKW_TEXT; ?></label>
2308 2308
             <input name="post_tags" id="post_tags" value="<?php echo $kw_tags; ?>" type="text" class="geodir_textfield"
@@ -2310,90 +2310,90 @@  discard block
 block discarded – undo
2310 2310
             <span class="geodir_message_note"><?php echo $kw_tags_msg;?></span>
2311 2311
         </div>
2312 2312
         <?php
2313
-        if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2314
-            /**
2315
-             * Called on the add listing page form for frontend just after the tags field.
2316
-             *
2317
-             * @since 1.0.0
2318
-             */
2319
-            do_action('geodir_after_listing_tags_field');
2320
-        }
2313
+		if ($kw_tags_count === '' || (int)$kw_tags_count > 0) {
2314
+			/**
2315
+			 * Called on the add listing page form for frontend just after the tags field.
2316
+			 *
2317
+			 * @since 1.0.0
2318
+			 */
2319
+			do_action('geodir_after_listing_tags_field');
2320
+		}
2321 2321
         
2322
-        $package_info = array();
2323
-        $package_info = geodir_post_package_info($package_info, $post);
2322
+		$package_info = array();
2323
+		$package_info = geodir_post_package_info($package_info, $post);
2324 2324
         
2325
-        geodir_get_custom_fields_html($package_info->pid, 'all', $listing_type);
2325
+		geodir_get_custom_fields_html($package_info->pid, 'all', $listing_type);
2326 2326
         
2327
-        // adjust values here
2328
-        $id = "post_images"; // this will be the name of form field. Image url(s) will be submitted in $_POST using this key. So if $id == �img1� then $_POST[�img1�] will have all the image urls
2329
-
2330
-        $multiple = true; // allow multiple files upload
2327
+		// adjust values here
2328
+		$id = "post_images"; // this will be the name of form field. Image url(s) will be submitted in $_POST using this key. So if $id == �img1� then $_POST[�img1�] will have all the image urls
2331 2329
 
2332
-        $width = geodir_media_image_large_width(); // If you want to automatically resize all uploaded images then provide width here (in pixels)
2330
+		$multiple = true; // allow multiple files upload
2333 2331
 
2334
-        $height = geodir_media_image_large_height(); // If you want to automatically resize all uploaded images then provide height here (in pixels)
2332
+		$width = geodir_media_image_large_width(); // If you want to automatically resize all uploaded images then provide width here (in pixels)
2335 2333
 
2336
-        $thumb_img_arr = array();
2337
-        $totImg = 0;
2338
-        if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2339
-            $post = (object)$gd_session->get('listing');
2340
-            if (isset($post->post_images))
2341
-                $curImages = trim($post->post_images, ",");
2334
+		$height = geodir_media_image_large_height(); // If you want to automatically resize all uploaded images then provide height here (in pixels)
2342 2335
 
2336
+		$thumb_img_arr = array();
2337
+		$totImg = 0;
2338
+		if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
2339
+			$post = (object)$gd_session->get('listing');
2340
+			if (isset($post->post_images))
2341
+				$curImages = trim($post->post_images, ",");
2343 2342
 
2344
-            if ($curImages != '') {
2345
-                $curImages_array = explode(',', $curImages);
2346
-                $totImg = count($curImages_array);
2347
-            }
2348 2343
 
2349
-            $listing_type = $post->listing_type;
2344
+			if ($curImages != '') {
2345
+				$curImages_array = explode(',', $curImages);
2346
+				$totImg = count($curImages_array);
2347
+			}
2350 2348
 
2351
-        } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2352
-            $post = geodir_get_post_info((int)$_REQUEST['pid']);
2353
-            $listing_type = $post->post_type;
2354
-            $thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2349
+			$listing_type = $post->listing_type;
2355 2350
 
2356
-        } else {
2357
-            $listing_type = sanitize_text_field($_REQUEST['listing_type']);
2358
-        }
2351
+		} elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
2352
+			$post = geodir_get_post_info((int)$_REQUEST['pid']);
2353
+			$listing_type = $post->post_type;
2354
+			$thumb_img_arr = geodir_get_images($_REQUEST['pid']);
2359 2355
 
2356
+		} else {
2357
+			$listing_type = sanitize_text_field($_REQUEST['listing_type']);
2358
+		}
2360 2359
 
2361
-        if (!empty($thumb_img_arr)) {
2362
-            foreach ($thumb_img_arr as $img) {
2363
-                //$curImages = $img->src.",";
2364
-            }
2365 2360
 
2366
-            $totImg = count((array)$thumb_img_arr);
2367
-        }
2361
+		if (!empty($thumb_img_arr)) {
2362
+			foreach ($thumb_img_arr as $img) {
2363
+				//$curImages = $img->src.",";
2364
+			}
2368 2365
 
2369
-        if ($curImages != '')
2370
-            $svalue = $curImages; // this will be initial value of the above form field. Image urls.
2371
-        else
2372
-            $svalue = '';
2373
-
2374
-        $image_limit = $package_info->image_limit;
2375
-        $show_image_input_box = ($image_limit != '0');
2376
-        /**
2377
-         * Filter to be able to show/hide the image upload section of the add listing form.
2378
-         *
2379
-         * @since 1.0.0
2380
-         * @param bool $show_image_input_box Set true to show. Set false to not show.
2381
-         * @param string $listing_type The custom post type slug.
2382
-         */
2383
-        $show_image_input_box = apply_filters('geodir_image_uploader_on_add_listing', $show_image_input_box, $listing_type);
2384
-        if ($show_image_input_box) {
2385
-            ?>
2366
+			$totImg = count((array)$thumb_img_arr);
2367
+		}
2368
+
2369
+		if ($curImages != '')
2370
+			$svalue = $curImages; // this will be initial value of the above form field. Image urls.
2371
+		else
2372
+			$svalue = '';
2373
+
2374
+		$image_limit = $package_info->image_limit;
2375
+		$show_image_input_box = ($image_limit != '0');
2376
+		/**
2377
+		 * Filter to be able to show/hide the image upload section of the add listing form.
2378
+		 *
2379
+		 * @since 1.0.0
2380
+		 * @param bool $show_image_input_box Set true to show. Set false to not show.
2381
+		 * @param string $listing_type The custom post type slug.
2382
+		 */
2383
+		$show_image_input_box = apply_filters('geodir_image_uploader_on_add_listing', $show_image_input_box, $listing_type);
2384
+		if ($show_image_input_box) {
2385
+			?>
2386 2386
 
2387 2387
             <h5 id="geodir_form_title_row" class="geodir-form_title"> <?php echo PRO_PHOTO_TEXT;?>
2388 2388
                 <?php if ($image_limit == 1) {
2389
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2390
-                } ?>
2389
+					echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('image with this package', 'geodirectory') . ')</small>';
2390
+				} ?>
2391 2391
                 <?php if ($image_limit > 1) {
2392
-                    echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2393
-                } ?>
2392
+					echo '<br /><small>(' . __('You can upload', 'geodirectory') . ' ' . $image_limit . ' ' . __('images with this package', 'geodirectory') . ')</small>';
2393
+				} ?>
2394 2394
                 <?php if ($image_limit == '') {
2395
-                    echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2396
-                } ?>
2395
+					echo '<br /><small>(' . __('You can upload unlimited images with this package', 'geodirectory') . ')</small>';
2396
+				} ?>
2397 2397
             </h5>
2398 2398
 
2399 2399
             <div class="geodir_form_row clearfix" id="<?php echo $id; ?>dropbox"
@@ -2431,12 +2431,12 @@  discard block
 block discarded – undo
2431 2431
         <?php } ?>
2432 2432
 
2433 2433
         <?php
2434
-        /**
2435
-         * Called on the add listing page form for frontend just after the image upload field.
2436
-         *
2437
-         * @since 1.0.0
2438
-         */
2439
-        do_action('geodir_after_main_form_fields');?>
2434
+		/**
2435
+		 * Called on the add listing page form for frontend just after the image upload field.
2436
+		 *
2437
+		 * @since 1.0.0
2438
+		 */
2439
+		do_action('geodir_after_main_form_fields');?>
2440 2440
 
2441 2441
 
2442 2442
         <!-- add captcha code -->
@@ -2465,7 +2465,7 @@  discard block
 block discarded – undo
2465 2465
 
2466 2466
     </form>
2467 2467
     <?php
2468
-    wp_reset_query();
2468
+	wp_reset_query();
2469 2469
 }
2470 2470
 
2471 2471
 /**
@@ -2476,7 +2476,7 @@  discard block
 block discarded – undo
2476 2476
  */
2477 2477
 function geodir_add_listing_sidebar_widget_area()
2478 2478
 {
2479
-    dynamic_sidebar('geodir_add_listing_sidebar');
2479
+	dynamic_sidebar('geodir_add_listing_sidebar');
2480 2480
 }
2481 2481
 
2482 2482
 add_action('geodir_add_listing_sidebar_inside', 'geodir_add_listing_sidebar_widget_area', 10);
@@ -2491,16 +2491,16 @@  discard block
 block discarded – undo
2491 2491
  */
2492 2492
 function geodir_action_add_listing_sidebar()
2493 2493
 {
2494
-    /** This action is documented in geodirectory_template_actions.php */
2495
-    do_action('geodir_sidebar_right_open', 'add-listing-page', 'geodir-sidebar', 'geodir-sidebar-right', 'http://schema.org/WPSideBar');
2496
-    /**
2497
-     * This is used to add the content to the add listing page sidebar.
2498
-     *
2499
-     * @since 1.0.0
2500
-     */
2501
-    do_action('geodir_add_listing_sidebar_inside');
2502
-    /** This action is documented in geodirectory_template_actions.php */
2503
-    do_action('geodir_sidebar_right_close', 'details-page');
2494
+	/** This action is documented in geodirectory_template_actions.php */
2495
+	do_action('geodir_sidebar_right_open', 'add-listing-page', 'geodir-sidebar', 'geodir-sidebar-right', 'http://schema.org/WPSideBar');
2496
+	/**
2497
+	 * This is used to add the content to the add listing page sidebar.
2498
+	 *
2499
+	 * @since 1.0.0
2500
+	 */
2501
+	do_action('geodir_add_listing_sidebar_inside');
2502
+	/** This action is documented in geodirectory_template_actions.php */
2503
+	do_action('geodir_sidebar_right_close', 'details-page');
2504 2504
 }
2505 2505
 
2506 2506
 ###############################################
@@ -2517,11 +2517,11 @@  discard block
 block discarded – undo
2517 2517
  */
2518 2518
 function geodir_action_geodir_sidebar_signup_top()
2519 2519
 {
2520
-    ?>
2520
+	?>
2521 2521
     <div
2522 2522
         class="<?php
2523
-        /** This action is documented in geodirectory_template_actions.php */
2524
-        echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2523
+		/** This action is documented in geodirectory_template_actions.php */
2524
+		echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'Reg/Login Top Section'); ?>">
2525 2525
         <?php dynamic_sidebar('Reg/Login Top Section');?>
2526 2526
     </div><!-- clearfix ends here-->
2527 2527
 <?php
@@ -2540,9 +2540,9 @@  discard block
 block discarded – undo
2540 2540
 function geodir_action_signup_forms()
2541 2541
 {
2542 2542
 
2543
-    global $user_login;
2543
+	global $user_login;
2544 2544
 
2545
-    ?>
2545
+	?>
2546 2546
     <script type="text/javascript">
2547 2547
         <?php if ( $user_login ) { ?>
2548 2548
         setTimeout(function () {
@@ -2578,65 +2578,65 @@  discard block
 block discarded – undo
2578 2578
         <?php } ?>
2579 2579
     </script><?php
2580 2580
 
2581
-    global $errors;
2582
-    if (isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'claim')
2583
-        $errors->add('claim_login', LOGIN_CLAIM);
2584
-
2585
-    if (!empty($errors)) {
2586
-        foreach ($errors as $errorsObj) {
2587
-            foreach ($errorsObj as $key => $val) {
2588
-                for ($i = 0; $i < count($val); $i++) {
2589
-                    echo "<div class=sucess_msg>" . $val[$i] . '</div>';
2590
-                    $registration_error_msg = 1;
2591
-                }
2592
-            }
2593
-        }
2594
-    }
2581
+	global $errors;
2582
+	if (isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'claim')
2583
+		$errors->add('claim_login', LOGIN_CLAIM);
2584
+
2585
+	if (!empty($errors)) {
2586
+		foreach ($errors as $errorsObj) {
2587
+			foreach ($errorsObj as $key => $val) {
2588
+				for ($i = 0; $i < count($val); $i++) {
2589
+					echo "<div class=sucess_msg>" . $val[$i] . '</div>';
2590
+					$registration_error_msg = 1;
2591
+				}
2592
+			}
2593
+		}
2594
+	}
2595 2595
 
2596
-    if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_in') {
2597
-        ?>
2596
+	if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_in') {
2597
+		?>
2598 2598
 
2599 2599
         <div class="login_form">
2600 2600
             <?php
2601
-            /**
2602
-             * Contains login form template.
2603
-             *
2604
-             * @since 1.0.0
2605
-             */
2606
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2601
+			/**
2602
+			 * Contains login form template.
2603
+			 *
2604
+			 * @since 1.0.0
2605
+			 */
2606
+			include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2607 2607
         </div>
2608 2608
 
2609 2609
     <?php } elseif (isset($_REQUEST['page']) && $_REQUEST['page'] == 'login' && isset($_REQUEST['page1']) && $_REQUEST['page1'] == 'sign_up') { ?>
2610 2610
 
2611 2611
         <div class="registration_form">
2612 2612
             <?php
2613
-            /**
2614
-             * Contains registration form template.
2615
-             *
2616
-             * @since 1.0.0
2617
-             */
2618
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2613
+			/**
2614
+			 * Contains registration form template.
2615
+			 *
2616
+			 * @since 1.0.0
2617
+			 */
2618
+			include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2619 2619
         </div>
2620 2620
 
2621 2621
     <?php } else { ?>
2622 2622
 
2623 2623
         <div class="login_form_l">
2624 2624
             <?php
2625
-            /**
2626
-             * Contains login form template.
2627
-             *
2628
-             * @since 1.0.0
2629
-             */
2630
-            include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2625
+			/**
2626
+			 * Contains login form template.
2627
+			 *
2628
+			 * @since 1.0.0
2629
+			 */
2630
+			include(geodir_plugin_path() . "/geodirectory-templates/login_frm.php"); ?>
2631 2631
         </div>
2632 2632
         <div class="registration_form_r">
2633 2633
             <?php
2634
-            /**
2635
-             * Contains registration form template.
2636
-             *
2637
-             * @since 1.0.0
2638
-             */
2639
-            include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2634
+			/**
2635
+			 * Contains registration form template.
2636
+			 *
2637
+			 * @since 1.0.0
2638
+			 */
2639
+			include(geodir_plugin_path() . "/geodirectory-templates/reg_frm.php"); ?>
2640 2640
         </div>
2641 2641
 
2642 2642
     <?php }?>
@@ -2667,66 +2667,66 @@  discard block
 block discarded – undo
2667 2667
  */
2668 2668
 function geodir_action_author_page_title()
2669 2669
 {
2670
-    global $term;
2670
+	global $term;
2671 2671
 
2672
-    $gd_post_type = geodir_get_current_posttype();
2673
-    $post_type_info = get_post_type_object($gd_post_type);
2672
+	$gd_post_type = geodir_get_current_posttype();
2673
+	$post_type_info = get_post_type_object($gd_post_type);
2674 2674
 
2675
-    $add_string_in_title = __('All', 'geodirectory') . ' ';
2676
-    if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2677
-        $add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2678
-    }
2675
+	$add_string_in_title = __('All', 'geodirectory') . ' ';
2676
+	if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
2677
+		$add_string_in_title = __('My Favorite', 'geodirectory') . ' ';
2678
+	}
2679 2679
 
2680
-    $list_title = $add_string_in_title . $post_type_info->labels->name;
2681
-    $single_name = $post_type_info->labels->singular_name;
2680
+	$list_title = $add_string_in_title . $post_type_info->labels->name;
2681
+	$single_name = $post_type_info->labels->singular_name;
2682 2682
 
2683
-    $taxonomy = geodir_get_taxonomies($gd_post_type);
2683
+	$taxonomy = geodir_get_taxonomies($gd_post_type);
2684 2684
 
2685
-    if (!empty($term)) {
2686
-        $current_term = get_term_by('slug', $term, $taxonomy[0]);
2687
-        if (!empty($current_term))
2688
-            $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2689
-    }
2685
+	if (!empty($term)) {
2686
+		$current_term = get_term_by('slug', $term, $taxonomy[0]);
2687
+		if (!empty($current_term))
2688
+			$list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
2689
+	}
2690 2690
 
2691 2691
 
2692
-    if (is_search()) {
2693
-        $list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2692
+	if (is_search()) {
2693
+		$list_title = __('Search', 'geodirectory') . ' ' . __($post_type_info->labels->name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2694 2694
 
2695
-    }
2696
-    /** This action is documented in geodirectory_template_actions.php */
2697
-    $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2698
-    /** This action is documented in geodirectory_template_actions.php */
2699
-    $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2695
+	}
2696
+	/** This action is documented in geodirectory_template_actions.php */
2697
+	$class = apply_filters('geodir_page_title_class', 'entry-title fn');
2698
+	/** This action is documented in geodirectory_template_actions.php */
2699
+	$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2700 2700
 
2701
-    $title = $list_title;
2702
-    if(geodir_is_page('author')){
2703
-        $gd_page = 'author';
2704
-        if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2705
-            $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2706
-        }else{
2707
-            $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2708
-        }
2701
+	$title = $list_title;
2702
+	if(geodir_is_page('author')){
2703
+		$gd_page = 'author';
2704
+		if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
2705
+			$title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
2706
+		}else{
2707
+			$title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
2708
+		}
2709 2709
 
2710
-    }
2710
+	}
2711 2711
 
2712 2712
 
2713
-    /**
2714
-     * Filter page title to replace variables.
2715
-     *
2716
-     * @since 1.5.4
2717
-     * @param string $title The page title including variables.
2718
-     * @param string $gd_page The GeoDirectory page type if any.
2719
-     */
2720
-    $title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2713
+	/**
2714
+	 * Filter page title to replace variables.
2715
+	 *
2716
+	 * @since 1.5.4
2717
+	 * @param string $title The page title including variables.
2718
+	 * @param string $gd_page The GeoDirectory page type if any.
2719
+	 */
2720
+	$title =  apply_filters('geodir_seo_page_title', __($title, 'geodirectory'), $gd_page);
2721 2721
 
2722
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2723
-        /**
2724
-         * Filter the author page title text.
2725
-         *
2726
-         * @since 1.0.0
2727
-         * @param string $list_title The title for the page.
2728
-         */
2729
-        apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2722
+	echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2723
+		/**
2724
+		 * Filter the author page title text.
2725
+		 *
2726
+		 * @since 1.0.0
2727
+		 * @param string $list_title The title for the page.
2728
+		 */
2729
+		apply_filters('geodir_author_page_title_text', $title) . '</h1></header>';
2730 2730
 }
2731 2731
 
2732 2732
 
@@ -2744,11 +2744,11 @@  discard block
 block discarded – undo
2744 2744
  */
2745 2745
 function geodir_action_geodir_sidebar_author_top()
2746 2746
 {
2747
-    if (get_option('geodir_show_author_top_section')) { ?>
2747
+	if (get_option('geodir_show_author_top_section')) { ?>
2748 2748
         <div
2749 2749
             class="<?php
2750
-            /** This action is documented in geodirectory_template_actions.php */
2751
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_author_top'); ?>">
2750
+			/** This action is documented in geodirectory_template_actions.php */
2751
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_author_top'); ?>">
2752 2752
             <?php dynamic_sidebar('geodir_author_top'); ?>
2753 2753
         </div><!-- clearfix ends here-->
2754 2754
     <?php }
@@ -2764,7 +2764,7 @@  discard block
 block discarded – undo
2764 2764
  */
2765 2765
 function geodir_author_left_section()
2766 2766
 {
2767
-    if (get_option('geodir_show_author_left_section')) { ?>
2767
+	if (get_option('geodir_show_author_left_section')) { ?>
2768 2768
         <div class="geodir-content-left geodir-sidebar-wrap">
2769 2769
             <?php dynamic_sidebar('geodir_author_left_sidebar'); ?>
2770 2770
         </div><!-- end geodir-content-left -->
@@ -2785,19 +2785,19 @@  discard block
 block discarded – undo
2785 2785
  */
2786 2786
 function geodir_action_author_sidebar_left()
2787 2787
 {
2788
-    if (get_option('geodir_show_author_left_section')) {
2788
+	if (get_option('geodir_show_author_left_section')) {
2789 2789
 // this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='',$itemtype='')
2790
-        /** This action is documented in geodirectory_template_actions.php */
2791
-        do_action('geodir_sidebar_left_open', 'author-page', 'geodir-sidebar-left', 'geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
2792
-        /**
2793
-         * This is used to add the content to the author page left sidebar (if active).
2794
-         *
2795
-         * @since 1.0.0
2796
-         */
2797
-        do_action('geodir_author_sidebar_left_inside');
2798
-        /** This action is documented in geodirectory_template_actions.php */
2799
-        do_action('geodir_sidebar_left_close', 'author-page');
2800
-    }
2790
+		/** This action is documented in geodirectory_template_actions.php */
2791
+		do_action('geodir_sidebar_left_open', 'author-page', 'geodir-sidebar-left', 'geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
2792
+		/**
2793
+		 * This is used to add the content to the author page left sidebar (if active).
2794
+		 *
2795
+		 * @since 1.0.0
2796
+		 */
2797
+		do_action('geodir_author_sidebar_left_inside');
2798
+		/** This action is documented in geodirectory_template_actions.php */
2799
+		do_action('geodir_sidebar_left_close', 'author-page');
2800
+	}
2801 2801
 }
2802 2802
 
2803 2803
 /**
@@ -2810,7 +2810,7 @@  discard block
 block discarded – undo
2810 2810
  */
2811 2811
 function geodir_author_right_section()
2812 2812
 {
2813
-    if (get_option('geodir_show_author_right_section')) { ?>
2813
+	if (get_option('geodir_show_author_right_section')) { ?>
2814 2814
         <div class="geodir-content-right geodir-sidebar-wrap">
2815 2815
             <?php dynamic_sidebar('geodir_author_right_sidebar'); ?>
2816 2816
         </div><!-- end geodir-content-right -->
@@ -2830,18 +2830,18 @@  discard block
 block discarded – undo
2830 2830
  */
2831 2831
 function geodir_action_author_sidebar_right()
2832 2832
 {
2833
-    if (get_option('geodir_show_author_right_section')) {
2834
-        /** This action is documented in geodirectory_template_actions.php */
2835
-        do_action('geodir_sidebar_right_open', 'author-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
2836
-        /**
2837
-         * This is used to add the content to the author page right sidebar (if active).
2838
-         *
2839
-         * @since 1.0.0
2840
-         */
2841
-        do_action('geodir_author_sidebar_right_inside');
2842
-        /** This action is documented in geodirectory_template_actions.php */
2843
-        do_action('geodir_sidebar_right_close', 'author-page');
2844
-    }
2833
+	if (get_option('geodir_show_author_right_section')) {
2834
+		/** This action is documented in geodirectory_template_actions.php */
2835
+		do_action('geodir_sidebar_right_open', 'author-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
2836
+		/**
2837
+		 * This is used to add the content to the author page right sidebar (if active).
2838
+		 *
2839
+		 * @since 1.0.0
2840
+		 */
2841
+		do_action('geodir_author_sidebar_right_inside');
2842
+		/** This action is documented in geodirectory_template_actions.php */
2843
+		do_action('geodir_sidebar_right_close', 'author-page');
2844
+	}
2845 2845
 }
2846 2846
 
2847 2847
 /**
@@ -2853,14 +2853,14 @@  discard block
 block discarded – undo
2853 2853
  */
2854 2854
 function geodir_action_author_content_inside()
2855 2855
 {
2856
-    global $gridview_columns;
2857
-    $listing_view = get_option('geodir_author_view');
2858
-    if (strstr($listing_view, 'gridview')) {
2859
-        $gridview_columns = $listing_view;
2860
-        $listing_view_exp = explode('_', $listing_view);
2861
-        $listing_view = $listing_view_exp[0];
2862
-    }
2863
-    geodir_get_template_part('listing', 'listview');
2856
+	global $gridview_columns;
2857
+	$listing_view = get_option('geodir_author_view');
2858
+	if (strstr($listing_view, 'gridview')) {
2859
+		$gridview_columns = $listing_view;
2860
+		$listing_view_exp = explode('_', $listing_view);
2861
+		$listing_view = $listing_view_exp[0];
2862
+	}
2863
+	geodir_get_template_part('listing', 'listview');
2864 2864
 }
2865 2865
 
2866 2866
 add_action('geodir_author_content_inside', 'geodir_action_author_content_inside', 10);
@@ -2875,22 +2875,22 @@  discard block
 block discarded – undo
2875 2875
  */
2876 2876
 function geodir_action_author_content()
2877 2877
 {
2878
-    /** This action is documented in geodirectory_template_actions.php */
2879
-    do_action('geodir_main_content_open', 'author-page', 'geodir-main-content', 'author-page');
2880
-    echo '<div class="clearfix">';
2881
-    /** This action is documented in geodirectory_template_actions.php */
2882
-    do_action('geodir_before_listing');
2883
-    echo '</div>';
2884
-    /**
2885
-     * This is used to add the content to the author page main content.
2886
-     *
2887
-     * @since 1.0.0
2888
-     */
2889
-    do_action('geodir_author_content_inside');
2890
-    /** This action is documented in geodirectory_template_actions.php */
2891
-    do_action('geodir_after_listing');
2892
-    /** This action is documented in geodirectory_template_actions.php */
2893
-    do_action('geodir_main_content_close', 'author-page');
2878
+	/** This action is documented in geodirectory_template_actions.php */
2879
+	do_action('geodir_main_content_open', 'author-page', 'geodir-main-content', 'author-page');
2880
+	echo '<div class="clearfix">';
2881
+	/** This action is documented in geodirectory_template_actions.php */
2882
+	do_action('geodir_before_listing');
2883
+	echo '</div>';
2884
+	/**
2885
+	 * This is used to add the content to the author page main content.
2886
+	 *
2887
+	 * @since 1.0.0
2888
+	 */
2889
+	do_action('geodir_author_content_inside');
2890
+	/** This action is documented in geodirectory_template_actions.php */
2891
+	do_action('geodir_after_listing');
2892
+	/** This action is documented in geodirectory_template_actions.php */
2893
+	do_action('geodir_main_content_close', 'author-page');
2894 2894
 }
2895 2895
 
2896 2896
 add_action('geodir_sidebar_author_bottom_section', 'geodir_action_sidebar_author_bottom_section', 10);
@@ -2904,11 +2904,11 @@  discard block
 block discarded – undo
2904 2904
  */
2905 2905
 function geodir_action_sidebar_author_bottom_section()
2906 2906
 {
2907
-    if (get_option('geodir_show_author_bottom_section')) { ?>
2907
+	if (get_option('geodir_show_author_bottom_section')) { ?>
2908 2908
         <div
2909 2909
             class="<?php
2910
-            /** This action is documented in geodirectory_template_actions.php */
2911
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_author_bottom'); ?>">
2910
+			/** This action is documented in geodirectory_template_actions.php */
2911
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_author_bottom'); ?>">
2912 2912
             <?php dynamic_sidebar('geodir_author_bottom'); ?>
2913 2913
         </div><!-- clearfix ends here-->
2914 2914
     <?php }
@@ -2927,23 +2927,23 @@  discard block
 block discarded – undo
2927 2927
  */
2928 2928
 function geodir_action_search_page_title()
2929 2929
 {
2930
-    $gd_post_type = geodir_get_current_posttype();
2931
-    $post_type_info = get_post_type_object($gd_post_type);
2930
+	$gd_post_type = geodir_get_current_posttype();
2931
+	$post_type_info = get_post_type_object($gd_post_type);
2932 2932
 
2933
-    $pt_name = '';
2934
-    if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2933
+	$pt_name = '';
2934
+	if(isset($post_type_info->labels->name)){$pt_name=$post_type_info->labels->name;}
2935 2935
 
2936
-    if (is_search()) {
2937
-        $list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2936
+	if (is_search()) {
2937
+		$list_title = __('Search', 'geodirectory') . ' ' . __($pt_name, 'geodirectory') . __(' For :', 'geodirectory') . " '" . get_search_query() . "'";
2938 2938
 
2939
-    }
2940
-    /** This action is documented in geodirectory_template_actions.php */
2941
-    $class = apply_filters('geodir_page_title_class', 'entry-title fn');
2942
-    /** This action is documented in geodirectory_template_actions.php */
2943
-    $class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2944
-    echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2945
-        /** This action is documented in geodirectory_template_actions.php */
2946
-        apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
2939
+	}
2940
+	/** This action is documented in geodirectory_template_actions.php */
2941
+	$class = apply_filters('geodir_page_title_class', 'entry-title fn');
2942
+	/** This action is documented in geodirectory_template_actions.php */
2943
+	$class_header = apply_filters('geodir_page_title_header_class', 'entry-header');
2944
+	echo '<header class="' . $class_header . '"><h1 class="' . $class . '">' .
2945
+		/** This action is documented in geodirectory_template_actions.php */
2946
+		apply_filters('geodir_listing_page_title', wptexturize($list_title)) . '</h1></header>';
2947 2947
 }
2948 2948
 
2949 2949
 // action for adding the listings page top widget area
@@ -2959,11 +2959,11 @@  discard block
 block discarded – undo
2959 2959
  */
2960 2960
 function geodir_action_geodir_sidebar_search_top()
2961 2961
 {
2962
-    if (get_option('geodir_show_search_top_section')) { ?>
2962
+	if (get_option('geodir_show_search_top_section')) { ?>
2963 2963
         <div
2964 2964
             class="<?php
2965
-            /** This action is documented in geodirectory_template_actions.php */
2966
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_search_top'); ?>">
2965
+			/** This action is documented in geodirectory_template_actions.php */
2966
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_search_top'); ?>">
2967 2967
             <?php dynamic_sidebar('geodir_search_top'); ?>
2968 2968
         </div><!-- clearfix ends here-->
2969 2969
     <?php }
@@ -2979,7 +2979,7 @@  discard block
 block discarded – undo
2979 2979
  */
2980 2980
 function geodir_search_left_section()
2981 2981
 {
2982
-    if (get_option('geodir_show_search_left_section')) { ?>
2982
+	if (get_option('geodir_show_search_left_section')) { ?>
2983 2983
         <div class="geodir-content-left geodir-sidebar-wrap">
2984 2984
             <?php dynamic_sidebar('geodir_search_left_sidebar'); ?>
2985 2985
         </div><!-- end geodir-content-left -->
@@ -2999,19 +2999,19 @@  discard block
 block discarded – undo
2999 2999
  */
3000 3000
 function geodir_action_search_sidebar_left()
3001 3001
 {
3002
-    if (get_option('geodir_show_search_left_section')) {
3002
+	if (get_option('geodir_show_search_left_section')) {
3003 3003
 // this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='',$itemtype='')
3004
-        /** This action is documented in geodirectory_template_actions.php */
3005
-        do_action('geodir_sidebar_left_open', 'search-page', 'geodir-sidebar-left', 'geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
3006
-        /**
3007
-         * This is used to add the content to the search page left sidebar (if active).
3008
-         *
3009
-         * @since 1.0.0
3010
-         */
3011
-        do_action('geodir_search_sidebar_left_inside');
3012
-        /** This action is documented in geodirectory_template_actions.php */
3013
-        do_action('geodir_sidebar_left_close', 'search-page');
3014
-    }
3004
+		/** This action is documented in geodirectory_template_actions.php */
3005
+		do_action('geodir_sidebar_left_open', 'search-page', 'geodir-sidebar-left', 'geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
3006
+		/**
3007
+		 * This is used to add the content to the search page left sidebar (if active).
3008
+		 *
3009
+		 * @since 1.0.0
3010
+		 */
3011
+		do_action('geodir_search_sidebar_left_inside');
3012
+		/** This action is documented in geodirectory_template_actions.php */
3013
+		do_action('geodir_sidebar_left_close', 'search-page');
3014
+	}
3015 3015
 }
3016 3016
 
3017 3017
 /**
@@ -3024,7 +3024,7 @@  discard block
 block discarded – undo
3024 3024
  */
3025 3025
 function geodir_search_right_section()
3026 3026
 {
3027
-    if (get_option('geodir_show_search_right_section')) { ?>
3027
+	if (get_option('geodir_show_search_right_section')) { ?>
3028 3028
         <div class="geodir-content-right geodir-sidebar-wrap">
3029 3029
             <?php dynamic_sidebar('geodir_search_right_sidebar'); ?>
3030 3030
         </div><!-- end geodir-content-right -->
@@ -3044,18 +3044,18 @@  discard block
 block discarded – undo
3044 3044
  */
3045 3045
 function geodir_action_search_sidebar_right()
3046 3046
 {
3047
-    if (get_option('geodir_show_search_right_section')) {
3048
-        /** This action is documented in geodirectory_template_actions.php */
3049
-        do_action('geodir_sidebar_right_open', 'search-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
3050
-        /**
3051
-         * This is used to add the content to the search page right sidebar (if active).
3052
-         *
3053
-         * @since 1.0.0
3054
-         */
3055
-        do_action('geodir_search_sidebar_right_inside');
3056
-        /** This action is documented in geodirectory_template_actions.php */
3057
-        do_action('geodir_sidebar_right_close', 'search-page');
3058
-    }
3047
+	if (get_option('geodir_show_search_right_section')) {
3048
+		/** This action is documented in geodirectory_template_actions.php */
3049
+		do_action('geodir_sidebar_right_open', 'search-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
3050
+		/**
3051
+		 * This is used to add the content to the search page right sidebar (if active).
3052
+		 *
3053
+		 * @since 1.0.0
3054
+		 */
3055
+		do_action('geodir_search_sidebar_right_inside');
3056
+		/** This action is documented in geodirectory_template_actions.php */
3057
+		do_action('geodir_sidebar_right_close', 'search-page');
3058
+	}
3059 3059
 }
3060 3060
 
3061 3061
 
@@ -3070,11 +3070,11 @@  discard block
 block discarded – undo
3070 3070
  */
3071 3071
 function geodir_action_sidebar_search_bottom_section()
3072 3072
 {
3073
-    if (get_option('geodir_show_search_bottom_section')) { ?>
3073
+	if (get_option('geodir_show_search_bottom_section')) { ?>
3074 3074
         <div
3075 3075
             class="<?php
3076
-            /** This action is documented in geodirectory_template_actions.php */
3077
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_search_bottom'); ?>">
3076
+			/** This action is documented in geodirectory_template_actions.php */
3077
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_search_bottom'); ?>">
3078 3078
             <?php dynamic_sidebar('geodir_search_bottom'); ?>
3079 3079
         </div><!-- clearfix ends here-->
3080 3080
     <?php }
@@ -3089,14 +3089,14 @@  discard block
 block discarded – undo
3089 3089
  */
3090 3090
 function geodir_action_search_content_inside()
3091 3091
 {
3092
-    global $gridview_columns;
3093
-    $listing_view = get_option('geodir_search_view');
3094
-    if (strstr($listing_view, 'gridview')) {
3095
-        $gridview_columns = $listing_view;
3096
-        $listing_view_exp = explode('_', $listing_view);
3097
-        $listing_view = $listing_view_exp[0];
3098
-    }
3099
-    geodir_get_template_part('listing', 'listview');
3092
+	global $gridview_columns;
3093
+	$listing_view = get_option('geodir_search_view');
3094
+	if (strstr($listing_view, 'gridview')) {
3095
+		$gridview_columns = $listing_view;
3096
+		$listing_view_exp = explode('_', $listing_view);
3097
+		$listing_view = $listing_view_exp[0];
3098
+	}
3099
+	geodir_get_template_part('listing', 'listview');
3100 3100
 }
3101 3101
 
3102 3102
 add_action('geodir_search_content_inside', 'geodir_action_search_content_inside', 10);
@@ -3112,22 +3112,22 @@  discard block
 block discarded – undo
3112 3112
  */
3113 3113
 function geodir_action_search_content()
3114 3114
 {
3115
-    /** This action is documented in geodirectory_template_actions.php */
3116
-    do_action('geodir_main_content_open', 'search-page', 'geodir-main-content', 'search-page');
3117
-    echo '<div class="clearfix">';
3118
-    /** This action is documented in geodirectory_template_actions.php */
3119
-    do_action('geodir_before_listing');
3120
-    echo '</div>';
3121
-    /**
3122
-     * This is used to add the content to the search page main content.
3123
-     *
3124
-     * @since 1.0.0
3125
-     */
3126
-    do_action('geodir_search_content_inside');
3127
-    /** This action is documented in geodirectory_template_actions.php */
3128
-    do_action('geodir_after_listing');
3129
-    /** This action is documented in geodirectory_template_actions.php */
3130
-    do_action('geodir_main_content_close', 'search-page');
3115
+	/** This action is documented in geodirectory_template_actions.php */
3116
+	do_action('geodir_main_content_open', 'search-page', 'geodir-main-content', 'search-page');
3117
+	echo '<div class="clearfix">';
3118
+	/** This action is documented in geodirectory_template_actions.php */
3119
+	do_action('geodir_before_listing');
3120
+	echo '</div>';
3121
+	/**
3122
+	 * This is used to add the content to the search page main content.
3123
+	 *
3124
+	 * @since 1.0.0
3125
+	 */
3126
+	do_action('geodir_search_content_inside');
3127
+	/** This action is documented in geodirectory_template_actions.php */
3128
+	do_action('geodir_after_listing');
3129
+	/** This action is documented in geodirectory_template_actions.php */
3130
+	do_action('geodir_main_content_close', 'search-page');
3131 3131
 }
3132 3132
 
3133 3133
 ###############################################
@@ -3150,11 +3150,11 @@  discard block
 block discarded – undo
3150 3150
  */
3151 3151
 function geodir_action_geodir_sidebar_home_top()
3152 3152
 {
3153
-    if (get_option('geodir_show_home_top_section')) { ?>
3153
+	if (get_option('geodir_show_home_top_section')) { ?>
3154 3154
         <div
3155 3155
             class="<?php
3156
-            /** This action is documented in geodirectory_template_actions.php */
3157
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_home_top'); ?>">
3156
+			/** This action is documented in geodirectory_template_actions.php */
3157
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_home_top'); ?>">
3158 3158
             <?php dynamic_sidebar('geodir_home_top'); ?>
3159 3159
         </div><!-- clearfix ends here-->
3160 3160
     <?php }
@@ -3170,7 +3170,7 @@  discard block
 block discarded – undo
3170 3170
  */
3171 3171
 function geodir_home_left_section()
3172 3172
 {
3173
-    if (get_option('geodir_show_home_left_section')) { ?>
3173
+	if (get_option('geodir_show_home_left_section')) { ?>
3174 3174
         <div class="geodir-content-left geodir-sidebar-wrap">
3175 3175
             <?php dynamic_sidebar('geodir_home_left'); ?>
3176 3176
         </div><!-- end geodir-content-left -->
@@ -3192,19 +3192,19 @@  discard block
 block discarded – undo
3192 3192
  */
3193 3193
 function geodir_action_home_sidebar_left()
3194 3194
 {
3195
-    if (get_option('geodir_show_home_left_section')) {
3195
+	if (get_option('geodir_show_home_left_section')) {
3196 3196
 // this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='',$itemtype='')
3197
-        /** This action is documented in geodirectory_template_actions.php */
3198
-        do_action('geodir_sidebar_left_open', 'home-page', 'geodir-sidebar-left', 'geodir-sidebar geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
3199
-        /**
3200
-         * This is used to add the content to the home page left sidebar (if active).
3201
-         *
3202
-         * @since 1.0.0
3203
-         */
3204
-        do_action('geodir_home_sidebar_left_inside');
3205
-        /** This action is documented in geodirectory_template_actions.php */
3206
-        do_action('geodir_sidebar_left_close', 'home-page');
3207
-    }
3197
+		/** This action is documented in geodirectory_template_actions.php */
3198
+		do_action('geodir_sidebar_left_open', 'home-page', 'geodir-sidebar-left', 'geodir-sidebar geodir-sidebar-left geodir-listings-sidebar-left', 'http://schema.org/WPSideBar');
3199
+		/**
3200
+		 * This is used to add the content to the home page left sidebar (if active).
3201
+		 *
3202
+		 * @since 1.0.0
3203
+		 */
3204
+		do_action('geodir_home_sidebar_left_inside');
3205
+		/** This action is documented in geodirectory_template_actions.php */
3206
+		do_action('geodir_sidebar_left_close', 'home-page');
3207
+	}
3208 3208
 }
3209 3209
 
3210 3210
 /**
@@ -3217,7 +3217,7 @@  discard block
 block discarded – undo
3217 3217
  */
3218 3218
 function geodir_home_right_section()
3219 3219
 {
3220
-    if (get_option('geodir_show_home_right_section')) { ?>
3220
+	if (get_option('geodir_show_home_right_section')) { ?>
3221 3221
         <div class="geodir-content-right geodir-sidebar-wrap">
3222 3222
             <?php dynamic_sidebar('geodir_home_right'); ?>
3223 3223
         </div><!-- end geodir-content-right -->
@@ -3238,18 +3238,18 @@  discard block
 block discarded – undo
3238 3238
  */
3239 3239
 function geodir_action_home_sidebar_right()
3240 3240
 {
3241
-    if (get_option('geodir_show_home_right_section')) {
3242
-        /** This action is documented in geodirectory_template_actions.php */
3243
-        do_action('geodir_sidebar_right_open', 'home-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
3244
-        /**
3245
-         * This is used to add the content to the home page right sidebar (if active).
3246
-         *
3247
-         * @since 1.0.0
3248
-         */
3249
-        do_action('geodir_home_sidebar_right_inside');
3250
-        /** This action is documented in geodirectory_template_actions.php */
3251
-        do_action('geodir_sidebar_right_close', 'home-page');
3252
-    }
3241
+	if (get_option('geodir_show_home_right_section')) {
3242
+		/** This action is documented in geodirectory_template_actions.php */
3243
+		do_action('geodir_sidebar_right_open', 'home-page', 'geodir-sidebar-right', 'geodir-sidebar-right geodir-listings-sidebar-right', 'http://schema.org/WPSideBar');
3244
+		/**
3245
+		 * This is used to add the content to the home page right sidebar (if active).
3246
+		 *
3247
+		 * @since 1.0.0
3248
+		 */
3249
+		do_action('geodir_home_sidebar_right_inside');
3250
+		/** This action is documented in geodirectory_template_actions.php */
3251
+		do_action('geodir_sidebar_right_close', 'home-page');
3252
+	}
3253 3253
 }
3254 3254
 
3255 3255
 /**
@@ -3260,7 +3260,7 @@  discard block
 block discarded – undo
3260 3260
  */
3261 3261
 function geodir_action_home_content_inside()
3262 3262
 {
3263
-    dynamic_sidebar('geodir_home_content');
3263
+	dynamic_sidebar('geodir_home_content');
3264 3264
 }
3265 3265
 
3266 3266
 add_action('geodir_home_content_inside', 'geodir_action_home_content_inside', 10);
@@ -3275,28 +3275,28 @@  discard block
 block discarded – undo
3275 3275
  */
3276 3276
 function geodir_action_home_content()
3277 3277
 {
3278
-    /** This action is documented in geodirectory_template_actions.php */
3279
-    do_action('geodir_main_content_open', 'home-page', 'geodir-main-content', 'home-page');
3280
-    /**
3281
-     * This called before the home page main content.
3282
-     *
3283
-     * @since 1.0.0
3284
-     */
3285
-    do_action('geodir_before_home_content');
3286
-    /**
3287
-     * This is used to add the content to the home page main content.
3288
-     *
3289
-     * @since 1.0.0
3290
-     */
3291
-    do_action('geodir_home_content_inside');
3292
-    /**
3293
-     * This is called after the homepage main content.
3294
-     *
3295
-     * @since 1.0.0
3296
-     */
3297
-    do_action('geodir_after_home_content');
3298
-    /** This action is documented in geodirectory_template_actions.php */
3299
-    do_action('geodir_main_content_close', 'home-page');
3278
+	/** This action is documented in geodirectory_template_actions.php */
3279
+	do_action('geodir_main_content_open', 'home-page', 'geodir-main-content', 'home-page');
3280
+	/**
3281
+	 * This called before the home page main content.
3282
+	 *
3283
+	 * @since 1.0.0
3284
+	 */
3285
+	do_action('geodir_before_home_content');
3286
+	/**
3287
+	 * This is used to add the content to the home page main content.
3288
+	 *
3289
+	 * @since 1.0.0
3290
+	 */
3291
+	do_action('geodir_home_content_inside');
3292
+	/**
3293
+	 * This is called after the homepage main content.
3294
+	 *
3295
+	 * @since 1.0.0
3296
+	 */
3297
+	do_action('geodir_after_home_content');
3298
+	/** This action is documented in geodirectory_template_actions.php */
3299
+	do_action('geodir_main_content_close', 'home-page');
3300 3300
 }
3301 3301
 
3302 3302
 add_action('geodir_sidebar_location_bottom_section', 'geodir_action_sidebar_home_bottom_section', 10);
@@ -3311,11 +3311,11 @@  discard block
 block discarded – undo
3311 3311
  */
3312 3312
 function geodir_action_sidebar_home_bottom_section()
3313 3313
 {
3314
-    if (get_option('geodir_show_home_bottom_section')) { ?>
3314
+	if (get_option('geodir_show_home_bottom_section')) { ?>
3315 3315
         <div
3316 3316
             class="<?php
3317
-            /** This action is documented in geodirectory_template_actions.php */
3318
-            echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_home_bottom'); ?>">
3317
+			/** This action is documented in geodirectory_template_actions.php */
3318
+			echo apply_filters('geodir_full_page_class', 'geodir_full_page clearfix', 'geodir_home_bottom'); ?>">
3319 3319
             <?php dynamic_sidebar('geodir_home_bottom'); ?>
3320 3320
         </div><!-- clearfix ends here-->
3321 3321
     <?php }
@@ -3343,13 +3343,13 @@  discard block
 block discarded – undo
3343 3343
  */
3344 3344
 function geodir_filter_listing_page_title($list_title)
3345 3345
 {
3346
-    if (is_search() && trim(get_search_query()) == '') {
3347
-        $gd_post_type = geodir_get_current_posttype();
3348
-        $post_type_info = get_post_type_object($gd_post_type);
3346
+	if (is_search() && trim(get_search_query()) == '') {
3347
+		$gd_post_type = geodir_get_current_posttype();
3348
+		$post_type_info = get_post_type_object($gd_post_type);
3349 3349
 
3350
-        $list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3351
-    }
3352
-    return $list_title;
3350
+		$list_title = __('Search', 'geodirectory') . ' ' . __(ucfirst($post_type_info->labels->name), 'geodirectory') . __(' :', 'geodirectory');
3351
+	}
3352
+	return $list_title;
3353 3353
 }
3354 3354
 
3355 3355
 add_action('geodir_message_not_found_on_listing', 'geodir_display_message_not_found_on_listing');
@@ -3364,61 +3364,61 @@  discard block
 block discarded – undo
3364 3364
  * @param string $gd_page The geodirectory page type. Default null.
3365 3365
  */
3366 3366
 function geodir_add_page_content( $position = 'before', $gd_page = '' ) {
3367
-    global $post;
3367
+	global $post;
3368 3368
         
3369
-    $gd_page_id = NULL;
3370
-    if ($gd_page == 'home-page' && geodir_is_page('home')) {
3371
-        $gd_page_id = geodir_home_page_id();
3372
-    } else if ($gd_page == 'details-page' && geodir_is_page('preview')) {
3373
-        $gd_page_id = geodir_preview_page_id();
3374
-    } else if ($gd_page == 'add-listing-page' && geodir_is_page('add-listing')) {
3375
-        $gd_page_id = geodir_add_listing_page_id();
3376
-    } else if ($gd_page == 'success-page' && geodir_is_page('listing-success')) {
3377
-        $gd_page_id = geodir_success_page_id();
3378
-    } else if ($gd_page == 'location-page' && geodir_is_page('location')) {
3379
-        $gd_page_id = geodir_location_page_id();
3380
-    } else if ($gd_page == 'info-page' && geodir_is_page('info')) {
3381
-        $gd_page_id = geodir_info_page_id();
3382
-    } else if ($gd_page == 'signup-page' && geodir_is_page('login')) {
3383
-        $gd_page_id = geodir_login_page_id();
3384
-    } else if ($gd_page == 'checkout-page' && geodir_is_page('checkout')) {
3385
-        $gd_page_id = geodir_payment_checkout_page_id();
3386
-    } else if ($gd_page == 'invoices-page' && geodir_is_page('invoices')) {
3387
-        $gd_page_id = geodir_payment_invoices_page_id();
3388
-    }
3369
+	$gd_page_id = NULL;
3370
+	if ($gd_page == 'home-page' && geodir_is_page('home')) {
3371
+		$gd_page_id = geodir_home_page_id();
3372
+	} else if ($gd_page == 'details-page' && geodir_is_page('preview')) {
3373
+		$gd_page_id = geodir_preview_page_id();
3374
+	} else if ($gd_page == 'add-listing-page' && geodir_is_page('add-listing')) {
3375
+		$gd_page_id = geodir_add_listing_page_id();
3376
+	} else if ($gd_page == 'success-page' && geodir_is_page('listing-success')) {
3377
+		$gd_page_id = geodir_success_page_id();
3378
+	} else if ($gd_page == 'location-page' && geodir_is_page('location')) {
3379
+		$gd_page_id = geodir_location_page_id();
3380
+	} else if ($gd_page == 'info-page' && geodir_is_page('info')) {
3381
+		$gd_page_id = geodir_info_page_id();
3382
+	} else if ($gd_page == 'signup-page' && geodir_is_page('login')) {
3383
+		$gd_page_id = geodir_login_page_id();
3384
+	} else if ($gd_page == 'checkout-page' && geodir_is_page('checkout')) {
3385
+		$gd_page_id = geodir_payment_checkout_page_id();
3386
+	} else if ($gd_page == 'invoices-page' && geodir_is_page('invoices')) {
3387
+		$gd_page_id = geodir_payment_invoices_page_id();
3388
+	}
3389 3389
     
3390
-    if (!$gd_page_id > 0) {
3391
-        return;
3392
-    }
3390
+	if (!$gd_page_id > 0) {
3391
+		return;
3392
+	}
3393 3393
     
3394
-    $display = 'before';
3395
-    /**
3396
-     * Filter the position to display the page content.
3397
-     *
3398
-     * @since 1.6.3
3399
-     *
3400
-     * @param string $display Position to add the post content.
3401
-     * @param string $gd_page The geodirectory page type.
3402
-     */
3403
-    $display = apply_filters('geodir_add_page_content_position', $display, $gd_page);
3394
+	$display = 'before';
3395
+	/**
3396
+	 * Filter the position to display the page content.
3397
+	 *
3398
+	 * @since 1.6.3
3399
+	 *
3400
+	 * @param string $display Position to add the post content.
3401
+	 * @param string $gd_page The geodirectory page type.
3402
+	 */
3403
+	$display = apply_filters('geodir_add_page_content_position', $display, $gd_page);
3404 3404
     
3405
-    if ($position !== $display) {
3406
-        return;
3407
-    }
3405
+	if ($position !== $display) {
3406
+		return;
3407
+	}
3408 3408
         
3409
-    $gd_post = $post;
3409
+	$gd_post = $post;
3410 3410
     
3411
-    setup_postdata(get_post($gd_page_id));
3411
+	setup_postdata(get_post($gd_page_id));
3412 3412
     
3413
-    if (get_the_content()) {
3414
-        ?>
3413
+	if (get_the_content()) {
3414
+		?>
3415 3415
         <section class="entry-content clearfix" itemprop="articleBody"><?php the_content(); ?></section>
3416 3416
         <?php
3417
-    }
3417
+	}
3418 3418
     
3419
-    $post = $gd_post;
3420
-    if (!empty($gd_post) && is_object($gd_post)) {
3421
-        setup_postdata($gd_post);
3422
-    }
3419
+	$post = $gd_post;
3420
+	if (!empty($gd_post) && is_object($gd_post)) {
3421
+		setup_postdata($gd_post);
3422
+	}
3423 3423
 }
3424 3424
 add_action('geodir_add_page_content', 'geodir_add_page_content', 10, 2);
3425 3425
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-functions/listing_filters.php 3 patches
Braces   +30 added lines, -19 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@  discard block
 block discarded – undo
16 16
  */
17 17
 function geodir_session_start()
18 18
 {
19
-    if (!session_id()) session_start();
19
+    if (!session_id()) {
20
+    	session_start();
21
+    }
20 22
     global $geodir_add_location_url;
21 23
 
22 24
     $geodir_add_location_url = NULL;
@@ -86,7 +88,9 @@  discard block
 block discarded – undo
86 88
 
87 89
     if ((is_search() && isset($_REQUEST['geodir_search']) && $_REQUEST['geodir_search'] != '')):
88 90
 
89
-        if (isset($_REQUEST['scat']) && $_REQUEST['scat'] == 'all') $_REQUEST['scat'] = '';
91
+        if (isset($_REQUEST['scat']) && $_REQUEST['scat'] == 'all') {
92
+        	$_REQUEST['scat'] = '';
93
+        }
90 94
         //if(isset($_REQUEST['s']) && $_REQUEST['s'] == '+') $_REQUEST['s'] = '';
91 95
 
92 96
         if (isset($_REQUEST['sdist'])) {
@@ -198,8 +202,9 @@  discard block
 block discarded – undo
198 202
         add_filter('posts_fields', 'geodir_posts_fields', 1);
199 203
         add_filter('posts_join', 'geodir_posts_join', 1);
200 204
         geodir_post_where();
201
-        if (!is_admin())
202
-            add_filter('posts_orderby', 'geodir_posts_orderby', 1);
205
+        if (!is_admin()) {
206
+                    add_filter('posts_orderby', 'geodir_posts_orderby', 1);
207
+        }
203 208
 
204 209
         // advanced filter for popular post view widget
205 210
         global $wp_query;
@@ -346,8 +351,9 @@  discard block
 block discarded – undo
346 351
     $sort_by = '';
347 352
     $orderby = ' ';
348 353
 
349
-    if (get_query_var('order_by'))
350
-        $sort_by = get_query_var('order_by');
354
+    if (get_query_var('order_by')) {
355
+            $sort_by = get_query_var('order_by');
356
+    }
351 357
 
352 358
     /*if(isset($wp_query->tax_query->queries) && $wp_query->tax_query->queries){
353 359
         $current_term = $wp_query->get_queried_object();
@@ -367,14 +373,16 @@  discard block
 block discarded – undo
367 373
         $orderby .= " distance,";
368 374
     }
369 375
 
370
-    if (isset($_REQUEST['sort_by']) && $_REQUEST['sort_by'] != '' && is_main_query())
371
-        $sort_by = esc_attr($_REQUEST['sort_by']);
376
+    if (isset($_REQUEST['sort_by']) && $_REQUEST['sort_by'] != '' && is_main_query()) {
377
+            $sort_by = esc_attr($_REQUEST['sort_by']);
378
+    }
372 379
 
373 380
 
374 381
     if ($sort_by == '') {
375 382
         $default_sort = geodir_get_posts_default_sort($geodir_post_type);
376
-        if (!empty($default_sort))
377
-            $sort_by = $default_sort;
383
+        if (!empty($default_sort)) {
384
+                    $sort_by = $default_sort;
385
+        }
378 386
     }
379 387
 
380 388
     /*
@@ -562,8 +570,9 @@  discard block
 block discarded – undo
562 570
 
563 571
             add_filter('posts_where', 'searching_filter_where', 1);
564 572
 
565
-            if ($snear != '')
566
-                add_filter('posts_where', 'searching_filter_where', 1);
573
+            if ($snear != '') {
574
+                            add_filter('posts_where', 'searching_filter_where', 1);
575
+            }
567 576
 
568 577
             add_filter('posts_orderby', 'geodir_posts_orderby', 1);
569 578
 
@@ -731,10 +740,11 @@  discard block
 block discarded – undo
731 740
     }
732 741
 
733 742
     $better_search_terms = '';
734
-    if (isset($_REQUEST['stype']))
735
-        $post_types = esc_attr(wp_strip_all_tags($_REQUEST['stype']));
736
-    else
737
-        $post_types = 'gd_place';
743
+    if (isset($_REQUEST['stype'])) {
744
+            $post_types = esc_attr(wp_strip_all_tags($_REQUEST['stype']));
745
+    } else {
746
+            $post_types = 'gd_place';
747
+    }
738 748
 
739 749
     if ($s != '') {
740 750
         $keywords = explode(" ", $s);
@@ -762,7 +772,7 @@  discard block
 block discarded – undo
762 772
     if($taxonomies) {
763 773
         $taxonomies = implode("','", $taxonomies);
764 774
         $taxonomies = "'" . $taxonomies . "'";
765
-    }else{$taxonomies='';}
775
+    } else{$taxonomies='';}
766 776
 
767 777
     $content_where = $terms_where = '';
768 778
 	if ($s != '') {
@@ -878,8 +888,9 @@  discard block
 block discarded – undo
878 888
             $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true);
879 889
             $user_fav_posts = !empty($user_fav_posts) && is_array($user_fav_posts) ? implode("','", $user_fav_posts) : '-1';
880 890
             $where .= " AND $wpdb->posts.ID IN ('$user_fav_posts')";
881
-        } else
882
-            $where .= " AND $wpdb->posts.post_author = $user_id";
891
+        } else {
892
+                    $where .= " AND $wpdb->posts.post_author = $user_id";
893
+        }
883 894
 
884 895
         if ($user_id == (int)get_current_user_id()) {
885 896
             $where .= " AND $wpdb->posts.post_status IN ('publish','draft','pending') ";
Please login to merge, or discard this patch.
Indentation   +498 added lines, -498 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  */
17 17
 function geodir_session_start()
18 18
 {
19
-    if (!session_id()) session_start();
20
-    global $geodir_add_location_url;
19
+	if (!session_id()) session_start();
20
+	global $geodir_add_location_url;
21 21
 
22
-    $geodir_add_location_url = NULL;
22
+	$geodir_add_location_url = NULL;
23 23
 }
24 24
 
25 25
 /**
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
  */
34 34
 function geodir_modified_query($query)
35 35
 {
36
-    if ($query->is_main_query() && (
37
-            (geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
38
-            || geodir_is_page('listing')
39
-            || geodir_is_page('author')
40
-            || geodir_is_page('search')
41
-            || geodir_is_page('detail'))
42
-    ) {
43
-
44
-        $query->set('is_geodir_loop', true);
45
-    }
36
+	if ($query->is_main_query() && (
37
+			(geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
38
+			|| geodir_is_page('listing')
39
+			|| geodir_is_page('author')
40
+			|| geodir_is_page('search')
41
+			|| geodir_is_page('detail'))
42
+	) {
43
+
44
+		$query->set('is_geodir_loop', true);
45
+	}
46 46
 
47
-    return $query;
47
+	return $query;
48 48
 }
49 49
 
50 50
 /**
@@ -67,81 +67,81 @@  discard block
 block discarded – undo
67 67
  */
68 68
 function set_listing_request()
69 69
 {
70
-    global $wp_query, $wpdb, $geodir_post_type, $table, $dist, $mylat, $mylon, $s, $snear, $s, $s_A, $s_SA;
70
+	global $wp_query, $wpdb, $geodir_post_type, $table, $dist, $mylat, $mylon, $s, $snear, $s, $s_A, $s_SA;
71 71
 
72 72
 
73
-    // fix woocommerce shop products filtered by language for GD + WPML + Woocommerce
74
-    if (!geodir_is_geodir_page()) {
75
-        return;
76
-    }
73
+	// fix woocommerce shop products filtered by language for GD + WPML + Woocommerce
74
+	if (!geodir_is_geodir_page()) {
75
+		return;
76
+	}
77 77
 
78
-    /* remove all pre filters */
79
-    remove_all_filters('query');
80
-    remove_all_filters('posts_search');
81
-    remove_all_filters('posts_fields');
82
-    remove_all_filters('posts_join');
83
-    remove_all_filters('posts_orderby');
84
-    remove_all_filters('posts_where');
78
+	/* remove all pre filters */
79
+	remove_all_filters('query');
80
+	remove_all_filters('posts_search');
81
+	remove_all_filters('posts_fields');
82
+	remove_all_filters('posts_join');
83
+	remove_all_filters('posts_orderby');
84
+	remove_all_filters('posts_where');
85 85
 
86 86
 
87
-    if ((is_search() && isset($_REQUEST['geodir_search']) && $_REQUEST['geodir_search'] != '')):
87
+	if ((is_search() && isset($_REQUEST['geodir_search']) && $_REQUEST['geodir_search'] != '')):
88 88
 
89
-        if (isset($_REQUEST['scat']) && $_REQUEST['scat'] == 'all') $_REQUEST['scat'] = '';
90
-        //if(isset($_REQUEST['s']) && $_REQUEST['s'] == '+') $_REQUEST['s'] = '';
89
+		if (isset($_REQUEST['scat']) && $_REQUEST['scat'] == 'all') $_REQUEST['scat'] = '';
90
+		//if(isset($_REQUEST['s']) && $_REQUEST['s'] == '+') $_REQUEST['s'] = '';
91 91
 
92
-        if (isset($_REQUEST['sdist'])) {
93
-            ($_REQUEST['sdist'] != '0' && $_REQUEST['sdist'] != '') ? $dist = esc_attr($_REQUEST['sdist']) : $dist = 25000;
94
-        } elseif (get_option('geodir_search_dist') != '') {
95
-            $dist = get_option('geodir_search_dist');
92
+		if (isset($_REQUEST['sdist'])) {
93
+			($_REQUEST['sdist'] != '0' && $_REQUEST['sdist'] != '') ? $dist = esc_attr($_REQUEST['sdist']) : $dist = 25000;
94
+		} elseif (get_option('geodir_search_dist') != '') {
95
+			$dist = get_option('geodir_search_dist');
96 96
 
97
-        } else {
98
-            $dist = 25000;
99
-        } //  Distance
97
+		} else {
98
+			$dist = 25000;
99
+		} //  Distance
100 100
 
101
-        if (isset($_REQUEST['sgeo_lat'])) {
102
-            $mylat = (float)esc_attr($_REQUEST['sgeo_lat']);
103
-        } else {
104
-            $mylat = (float)geodir_get_current_city_lat();
105
-        } //  Latatude
101
+		if (isset($_REQUEST['sgeo_lat'])) {
102
+			$mylat = (float)esc_attr($_REQUEST['sgeo_lat']);
103
+		} else {
104
+			$mylat = (float)geodir_get_current_city_lat();
105
+		} //  Latatude
106 106
 
107
-        if (isset($_REQUEST['sgeo_lon'])) {
108
-            $mylon = (float)esc_attr($_REQUEST['sgeo_lon']);
109
-        } else {
110
-            $mylon = (float)geodir_get_current_city_lng();
111
-        } //  Distance
107
+		if (isset($_REQUEST['sgeo_lon'])) {
108
+			$mylon = (float)esc_attr($_REQUEST['sgeo_lon']);
109
+		} else {
110
+			$mylon = (float)geodir_get_current_city_lng();
111
+		} //  Distance
112 112
 
113
-        if (isset($_REQUEST['snear'])) {
114
-            $snear = trim(esc_attr($_REQUEST['snear']));
115
-        }
113
+		if (isset($_REQUEST['snear'])) {
114
+			$snear = trim(esc_attr($_REQUEST['snear']));
115
+		}
116 116
 
117
-        if (isset($_REQUEST['s'])) {
118
-            $s = trim(esc_attr(wp_strip_all_tags($_REQUEST['s'])));
119
-        }
117
+		if (isset($_REQUEST['s'])) {
118
+			$s = trim(esc_attr(wp_strip_all_tags($_REQUEST['s'])));
119
+		}
120 120
 
121
-        if ($snear == 'NEAR ME') {
122
-            $ip = $_SERVER['REMOTE_ADDR'];
123
-            $addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip));
124
-            $mylat = stripslashes(ucfirst($addr_details[geoplugin_latitude]));
125
-            $mylon = stripslashes(ucfirst($addr_details[geoplugin_longitude]));
126
-        }
121
+		if ($snear == 'NEAR ME') {
122
+			$ip = $_SERVER['REMOTE_ADDR'];
123
+			$addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip));
124
+			$mylat = stripslashes(ucfirst($addr_details[geoplugin_latitude]));
125
+			$mylon = stripslashes(ucfirst($addr_details[geoplugin_longitude]));
126
+		}
127 127
 
128 128
 
129
-        if (strstr($s, ',')) {
130
-            $s_AA = str_replace(" ", "", $s);
131
-            $s_A = explode(",", $s_AA);
132
-            $s_A = implode('","', $s_A);
133
-            $s_A = '"' . $s_A . '"';
134
-        } else {
135
-            $s_A = '"' . $s . '"';
136
-        }
129
+		if (strstr($s, ',')) {
130
+			$s_AA = str_replace(" ", "", $s);
131
+			$s_A = explode(",", $s_AA);
132
+			$s_A = implode('","', $s_A);
133
+			$s_A = '"' . $s_A . '"';
134
+		} else {
135
+			$s_A = '"' . $s . '"';
136
+		}
137 137
 
138
-        if (strstr($s, ' ')) {
139
-            $s_SA = explode(" ", $s);
140
-        } else {
141
-            $s_SA = '';
142
-        }
138
+		if (strstr($s, ' ')) {
139
+			$s_SA = explode(" ", $s);
140
+		} else {
141
+			$s_SA = '';
142
+		}
143 143
 
144
-    endif;
144
+	endif;
145 145
 
146 146
 
147 147
 
@@ -162,56 +162,56 @@  discard block
 block discarded – undo
162 162
  */
163 163
 function geodir_listing_loop_filter($query)
164 164
 {
165
-    global $wp_query, $geodir_post_type, $table, $plugin_prefix, $table, $term;
165
+	global $wp_query, $geodir_post_type, $table, $plugin_prefix, $table, $term;
166 166
 
167
-    // fix wp_reset_query for popular post view widget
168
-    if (!geodir_is_geodir_page()) {
169
-        return;
170
-    }
167
+	// fix wp_reset_query for popular post view widget
168
+	if (!geodir_is_geodir_page()) {
169
+		return;
170
+	}
171 171
 
172
-    $geodir_post_type = geodir_get_current_posttype();
173
-
174
-    if (isset($wp_query->tax_query->queries) && $wp_query->tax_query->queries) {
175
-        $taxonomies = wp_list_pluck($wp_query->tax_query->queries, 'taxonomy');
176
-
177
-        if (isset($wp_query->query[$taxonomies[0]])) {
178
-            $request_term = explode("/", $wp_query->query[$taxonomies[0]]);
179
-            $request_term = end($request_term);
180
-            if (!term_exists($request_term)) {
181
-                $args = array('number' => '1',);
182
-                $terms_arr = get_terms($taxonomies[0], $args);
183
-                foreach ($terms_arr as $location_term) {
184
-                    $term_arr = $location_term;
185
-                    $term_arr->name = geodir_ucwords(str_replace('-', ' ', $request_term));
186
-                }
187
-                $wp_query->queried_object_id = 1;
188
-                $wp_query->queried_object = $term_arr;
189
-                //print_r($wp_query) ;
190
-            }
191
-        }
172
+	$geodir_post_type = geodir_get_current_posttype();
173
+
174
+	if (isset($wp_query->tax_query->queries) && $wp_query->tax_query->queries) {
175
+		$taxonomies = wp_list_pluck($wp_query->tax_query->queries, 'taxonomy');
176
+
177
+		if (isset($wp_query->query[$taxonomies[0]])) {
178
+			$request_term = explode("/", $wp_query->query[$taxonomies[0]]);
179
+			$request_term = end($request_term);
180
+			if (!term_exists($request_term)) {
181
+				$args = array('number' => '1',);
182
+				$terms_arr = get_terms($taxonomies[0], $args);
183
+				foreach ($terms_arr as $location_term) {
184
+					$term_arr = $location_term;
185
+					$term_arr->name = geodir_ucwords(str_replace('-', ' ', $request_term));
186
+				}
187
+				$wp_query->queried_object_id = 1;
188
+				$wp_query->queried_object = $term_arr;
189
+				//print_r($wp_query) ;
190
+			}
191
+		}
192 192
 
193
-    }
194
-    if (isset($query->query_vars['is_geodir_loop']) && $query->query_vars['is_geodir_loop']) {
195
-
196
-        $table = $plugin_prefix . $geodir_post_type . '_detail';
197
-
198
-        add_filter('posts_fields', 'geodir_posts_fields', 1);
199
-        add_filter('posts_join', 'geodir_posts_join', 1);
200
-        geodir_post_where();
201
-        if (!is_admin())
202
-            add_filter('posts_orderby', 'geodir_posts_orderby', 1);
203
-
204
-        // advanced filter for popular post view widget
205
-        global $wp_query;
206
-        if (!is_admin()) {
207
-            if (!empty($wp_query->query['with_pics_only'])) {
208
-                add_filter('posts_join', 'geodir_filter_widget_join', 1000);
209
-            }
210
-            add_filter('posts_where', 'geodir_filter_widget_where', 1000);
211
-        }
193
+	}
194
+	if (isset($query->query_vars['is_geodir_loop']) && $query->query_vars['is_geodir_loop']) {
212 195
 
213
-    }
214
-    return $query;
196
+		$table = $plugin_prefix . $geodir_post_type . '_detail';
197
+
198
+		add_filter('posts_fields', 'geodir_posts_fields', 1);
199
+		add_filter('posts_join', 'geodir_posts_join', 1);
200
+		geodir_post_where();
201
+		if (!is_admin())
202
+			add_filter('posts_orderby', 'geodir_posts_orderby', 1);
203
+
204
+		// advanced filter for popular post view widget
205
+		global $wp_query;
206
+		if (!is_admin()) {
207
+			if (!empty($wp_query->query['with_pics_only'])) {
208
+				add_filter('posts_join', 'geodir_filter_widget_join', 1000);
209
+			}
210
+			add_filter('posts_where', 'geodir_filter_widget_where', 1000);
211
+		}
212
+
213
+	}
214
+	return $query;
215 215
 }
216 216
 
217 217
 
@@ -230,67 +230,67 @@  discard block
 block discarded – undo
230 230
  * @return string Modified fields query string.
231 231
  */
232 232
 function geodir_posts_fields($fields) {
233
-    global $wp_query, $wpdb, $geodir_post_type, $table, $plugin_prefix, $dist, $mylat, $mylon, $snear, $gd_session;
233
+	global $wp_query, $wpdb, $geodir_post_type, $table, $plugin_prefix, $dist, $mylat, $mylon, $snear, $gd_session;
234 234
 
235
-    // Filter-Location-Manager to add location table.
236
-    $fields .= ", " . $table . ".* ";
235
+	// Filter-Location-Manager to add location table.
236
+	$fields .= ", " . $table . ".* ";
237 237
     
238 238
 	if ($snear != '' || $gd_session->get('all_near_me')) {
239
-        $DistanceRadius = geodir_getDistanceRadius(get_option('geodir_search_dist_1'));
239
+		$DistanceRadius = geodir_getDistanceRadius(get_option('geodir_search_dist_1'));
240 240
         
241 241
 		if ($gd_session->get('all_near_me')) {
242
-            $mylat = $gd_session->get('user_lat');
243
-            $mylon = $gd_session->get('user_lon');
244
-        }
245
-
246
-        $fields .= " , (" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".post_latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".post_longitude) * pi()/180 / 2), 2) )))as distance ";
247
-    }
248
-
249
-    global $s;
250
-    if (is_search() && isset($_REQUEST['geodir_search']) && $s && trim($s) != '') {
251
-        $keywords = explode(" ", $s);
252
-
253
-        if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
254
-            foreach($keywords as $kkey=>$kword){
255
-                if(mb_strlen($kword, 'UTF-8')<=$klimit){
256
-                    unset($keywords[$kkey]);
257
-                }
258
-            }
259
-        }
242
+			$mylat = $gd_session->get('user_lat');
243
+			$mylon = $gd_session->get('user_lon');
244
+		}
260 245
 
246
+		$fields .= " , (" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".post_latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".post_longitude) * pi()/180 / 2), 2) )))as distance ";
247
+	}
261 248
 
262
-        if (count($keywords) > 1) {
263
-            $parts = array(
264
-                'AND' => 'gd_alltitlematch_part',
265
-                'OR' => 'gd_titlematch_part'
266
-            );
267
-            $gd_titlematch_part = "";
268
-            foreach ($parts as $key => $part) {
269
-                $gd_titlematch_part .= " CASE WHEN ";
270
-                $count = 0;
271
-                foreach ($keywords as $keyword) {
272
-                    $keyword = trim($keyword);
273
-                    $keyword  = wp_specialchars_decode($keyword ,ENT_QUOTES);
249
+	global $s;
250
+	if (is_search() && isset($_REQUEST['geodir_search']) && $s && trim($s) != '') {
251
+		$keywords = explode(" ", $s);
252
+
253
+		if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
254
+			foreach($keywords as $kkey=>$kword){
255
+				if(mb_strlen($kword, 'UTF-8')<=$klimit){
256
+					unset($keywords[$kkey]);
257
+				}
258
+			}
259
+		}
260
+
261
+
262
+		if (count($keywords) > 1) {
263
+			$parts = array(
264
+				'AND' => 'gd_alltitlematch_part',
265
+				'OR' => 'gd_titlematch_part'
266
+			);
267
+			$gd_titlematch_part = "";
268
+			foreach ($parts as $key => $part) {
269
+				$gd_titlematch_part .= " CASE WHEN ";
270
+				$count = 0;
271
+				foreach ($keywords as $keyword) {
272
+					$keyword = trim($keyword);
273
+					$keyword  = wp_specialchars_decode($keyword ,ENT_QUOTES);
274 274
 					$count++;
275
-                    if ($count < count($keywords)) {
276
-                       // $gd_titlematch_part .= $wpdb->posts . ".post_title LIKE '%%" . $keyword . "%%' " . $key . " ";
275
+					if ($count < count($keywords)) {
276
+					   // $gd_titlematch_part .= $wpdb->posts . ".post_title LIKE '%%" . $keyword . "%%' " . $key . " ";
277 277
 						$gd_titlematch_part .= "( " . $wpdb->posts . ".post_title LIKE '" . $keyword . "' OR " . $wpdb->posts . ".post_title LIKE '" . $keyword . "%%' OR " . $wpdb->posts . ".post_title LIKE '%% " . $keyword . "%%' ) " . $key . " ";
278
-                    } else {
279
-                        //$gd_titlematch_part .= $wpdb->posts . ".post_title LIKE '%%" . $keyword . "%%' ";
278
+					} else {
279
+						//$gd_titlematch_part .= $wpdb->posts . ".post_title LIKE '%%" . $keyword . "%%' ";
280 280
 						$gd_titlematch_part .= "( " . $wpdb->posts . ".post_title LIKE '" . $keyword . "' OR " . $wpdb->posts . ".post_title LIKE '" . $keyword . "%%' OR " . $wpdb->posts . ".post_title LIKE '%% " . $keyword . "%%' ) ";
281
-                    }
282
-                }
283
-                $gd_titlematch_part .= "THEN 1 ELSE 0 END AS " . $part . ",";
284
-            }
285
-        } else {
286
-            $gd_titlematch_part = "";
287
-        }
288
-        $s = stripslashes_deep( $s );
289
-        $s = wp_specialchars_decode($s,ENT_QUOTES);
281
+					}
282
+				}
283
+				$gd_titlematch_part .= "THEN 1 ELSE 0 END AS " . $part . ",";
284
+			}
285
+		} else {
286
+			$gd_titlematch_part = "";
287
+		}
288
+		$s = stripslashes_deep( $s );
289
+		$s = wp_specialchars_decode($s,ENT_QUOTES);
290 290
 		$fields .= $wpdb->prepare(", CASE WHEN " . $table . ".is_featured='1' THEN 1 ELSE 0 END AS gd_featured, CASE WHEN " . $wpdb->posts . ".post_title LIKE %s THEN 1 ELSE 0 END AS gd_exacttitle," . $gd_titlematch_part . " CASE WHEN ( " . $wpdb->posts . ".post_title LIKE %s OR " . $wpdb->posts . ".post_title LIKE %s OR " . $wpdb->posts . ".post_title LIKE %s ) THEN 1 ELSE 0 END AS gd_titlematch, CASE WHEN ( " . $wpdb->posts . ".post_content LIKE %s OR " . $wpdb->posts . ".post_content LIKE %s OR " . $wpdb->posts . ".post_content LIKE %s OR " . $wpdb->posts . ".post_content LIKE %s ) THEN 1 ELSE 0 END AS gd_content", array($s, $s, $s . '%', '% ' . $s . '%', $s, $s . ' %', '% ' . $s . ' %', '% ' . $s));
291
-    }
291
+	}
292 292
 
293
-    return $fields;
293
+	return $fields;
294 294
 }
295 295
 
296 296
 
@@ -307,26 +307,26 @@  discard block
 block discarded – undo
307 307
  */
308 308
 function geodir_posts_join($join)
309 309
 {
310
-    global $wpdb, $geodir_post_type, $table, $table_prefix, $plugin_prefix;
310
+	global $wpdb, $geodir_post_type, $table, $table_prefix, $plugin_prefix;
311 311
 
312
-    ########### WPML ###########
312
+	########### WPML ###########
313 313
 
314
-    if (function_exists('icl_object_id')) {
315
-        global $sitepress;
316
-        $lang_code = ICL_LANGUAGE_CODE;
317
-        $default_lang_code = $sitepress->get_default_language();
318
-        if ($lang_code) {
319
-            $join .= "JOIN " . $table_prefix . "icl_translations icl_t ON icl_t.element_id = " . $table_prefix . "posts.ID";
320
-        }
314
+	if (function_exists('icl_object_id')) {
315
+		global $sitepress;
316
+		$lang_code = ICL_LANGUAGE_CODE;
317
+		$default_lang_code = $sitepress->get_default_language();
318
+		if ($lang_code) {
319
+			$join .= "JOIN " . $table_prefix . "icl_translations icl_t ON icl_t.element_id = " . $table_prefix . "posts.ID";
320
+		}
321 321
 
322
-    }
323
-    ########### WPML ###########
322
+	}
323
+	########### WPML ###########
324 324
 
325
-    $join .= " INNER JOIN " . $table . " ON (" . $table . ".post_id = $wpdb->posts.ID)  ";
326
-    //===old code start
327
-    //$join .= " INNER JOIN ".POST_LOCATION_TABLE." ON (".$table.".post_location_id = ".POST_LOCATION_TABLE.".location_id)  " ;//===old code end
325
+	$join .= " INNER JOIN " . $table . " ON (" . $table . ".post_id = $wpdb->posts.ID)  ";
326
+	//===old code start
327
+	//$join .= " INNER JOIN ".POST_LOCATION_TABLE." ON (".$table.".post_location_id = ".POST_LOCATION_TABLE.".location_id)  " ;//===old code end
328 328
 
329
-    return $join;
329
+	return $join;
330 330
 }
331 331
 
332 332
 
@@ -344,15 +344,15 @@  discard block
 block discarded – undo
344 344
  */
345 345
 function geodir_posts_orderby($orderby)
346 346
 {
347
-    global $wpdb, $wp_query, $geodir_post_type, $table, $plugin_prefix, $snear, $default_sort;
347
+	global $wpdb, $wp_query, $geodir_post_type, $table, $plugin_prefix, $snear, $default_sort;
348 348
 
349
-    $sort_by = '';
350
-    $orderby = ' ';
349
+	$sort_by = '';
350
+	$orderby = ' ';
351 351
 
352
-    if (get_query_var('order_by'))
353
-        $sort_by = get_query_var('order_by');
352
+	if (get_query_var('order_by'))
353
+		$sort_by = get_query_var('order_by');
354 354
 
355
-    /*if(isset($wp_query->tax_query->queries) && $wp_query->tax_query->queries){
355
+	/*if(isset($wp_query->tax_query->queries) && $wp_query->tax_query->queries){
356 356
         $current_term = $wp_query->get_queried_object();
357 357
     }
358 358
 
@@ -366,116 +366,116 @@  discard block
 block discarded – undo
366 366
     }*/
367 367
 
368 368
 
369
-    if ($snear != '') {
370
-        $orderby .= " distance,";
371
-    }
369
+	if ($snear != '') {
370
+		$orderby .= " distance,";
371
+	}
372 372
 
373
-    if (isset($_REQUEST['sort_by']) && $_REQUEST['sort_by'] != '' && is_main_query())
374
-        $sort_by = esc_attr($_REQUEST['sort_by']);
373
+	if (isset($_REQUEST['sort_by']) && $_REQUEST['sort_by'] != '' && is_main_query())
374
+		$sort_by = esc_attr($_REQUEST['sort_by']);
375 375
 
376 376
 
377
-    if ($sort_by == '') {
378
-        $default_sort = geodir_get_posts_default_sort($geodir_post_type);
379
-        if (!empty($default_sort))
380
-            $sort_by = $default_sort;
381
-    }
377
+	if ($sort_by == '') {
378
+		$default_sort = geodir_get_posts_default_sort($geodir_post_type);
379
+		if (!empty($default_sort))
380
+			$sort_by = $default_sort;
381
+	}
382 382
 
383
-    /*
383
+	/*
384 384
     if search by term & no location then order always "relevance"
385 385
     if search by location then order always "nearest"
386 386
     */
387
-    if (is_main_query() && geodir_is_page('search')) {
388
-        $search_term = get_query_var('s');
387
+	if (is_main_query() && geodir_is_page('search')) {
388
+		$search_term = get_query_var('s');
389 389
 
390
-        if (trim($search_term) != '' && !isset($_REQUEST['sort_by'])) {
391
-            $sort_by = 'az';
392
-        }
390
+		if (trim($search_term) != '' && !isset($_REQUEST['sort_by'])) {
391
+			$sort_by = 'az';
392
+		}
393 393
 
394
-        if ($snear != '') {
395
-            $sort_by = 'nearest';
396
-        }
397
-    }
394
+		if ($snear != '') {
395
+			$sort_by = 'nearest';
396
+		}
397
+	}
398 398
 
399
-    switch ($sort_by):
400
-        case 'newest':
401
-            $orderby = "$wpdb->posts.post_date desc, ";
402
-            break;
403
-        case 'oldest':
404
-            $orderby = "$wpdb->posts.post_date asc, ";
405
-            break;
406
-        case 'low_review':
407
-        case 'rating_count_asc':
408
-            $orderby = $table . ".rating_count ASC, " . $table . ".overall_rating ASC, ";
409
-            break;
410
-        case 'high_review':
411
-        case 'rating_count_desc':
399
+	switch ($sort_by):
400
+		case 'newest':
401
+			$orderby = "$wpdb->posts.post_date desc, ";
402
+			break;
403
+		case 'oldest':
404
+			$orderby = "$wpdb->posts.post_date asc, ";
405
+			break;
406
+		case 'low_review':
407
+		case 'rating_count_asc':
408
+			$orderby = $table . ".rating_count ASC, " . $table . ".overall_rating ASC, ";
409
+			break;
410
+		case 'high_review':
411
+		case 'rating_count_desc':
412 412
 			$orderby = $table . ".rating_count DESC, " . $table . ".overall_rating DESC, ";
413
-            break;
414
-        case 'low_rating':
415
-            $orderby = "( " . $table . ".overall_rating  ) ASC, " . $table . ".rating_count ASC,  ";
416
-            break;
417
-        case 'high_rating':
418
-            $orderby = " " . $table . ".overall_rating DESC, " . $table . ".rating_count DESC, ";
419
-            break;
420
-        case 'featured':
421
-            $orderby = $table . ".is_featured asc, ";
422
-            break;
423
-        case 'nearest':
424
-            $orderby = " distance asc, ";
425
-            break;
426
-        case 'farthest':
427
-            $orderby = " distance desc, ";
428
-            break;
429
-        case 'random':
430
-            $orderby = " rand(), ";
431
-            break;
432
-        case 'az':
433
-            $orderby = "$wpdb->posts.post_title asc, ";
434
-            break;
435
-        default:
436
-
437
-            break;
438
-    endswitch;
439
-
440
-    global $s;
441
-
442
-    if (is_search() && isset($_REQUEST['geodir_search']) && $s && trim($s) != '') {
443
-        $keywords = explode(" ", $s);
444
-        if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
445
-            foreach($keywords as $kkey=>$kword){
446
-                if(mb_strlen($kword, 'UTF-8')<=$klimit){
447
-                    unset($keywords[$kkey]);
448
-                }
449
-            }
450
-        }
451
-        if ($sort_by == 'nearest' || $sort_by == 'farthest') {
452
-            if (count($keywords) > 1) {
453
-                $orderby = $orderby . " ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, ";
454
-            } else {
455
-                $orderby = $orderby . " ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, ";
456
-            }
457
-        } else {
458
-            if (count($keywords) > 1) {
459
-                $orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, " . $orderby;
460
-            } else {
461
-                $orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, " . $orderby;
462
-            }
463
-        }
464
-    }
413
+			break;
414
+		case 'low_rating':
415
+			$orderby = "( " . $table . ".overall_rating  ) ASC, " . $table . ".rating_count ASC,  ";
416
+			break;
417
+		case 'high_rating':
418
+			$orderby = " " . $table . ".overall_rating DESC, " . $table . ".rating_count DESC, ";
419
+			break;
420
+		case 'featured':
421
+			$orderby = $table . ".is_featured asc, ";
422
+			break;
423
+		case 'nearest':
424
+			$orderby = " distance asc, ";
425
+			break;
426
+		case 'farthest':
427
+			$orderby = " distance desc, ";
428
+			break;
429
+		case 'random':
430
+			$orderby = " rand(), ";
431
+			break;
432
+		case 'az':
433
+			$orderby = "$wpdb->posts.post_title asc, ";
434
+			break;
435
+		default:
436
+
437
+			break;
438
+	endswitch;
439
+
440
+	global $s;
441
+
442
+	if (is_search() && isset($_REQUEST['geodir_search']) && $s && trim($s) != '') {
443
+		$keywords = explode(" ", $s);
444
+		if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
445
+			foreach($keywords as $kkey=>$kword){
446
+				if(mb_strlen($kword, 'UTF-8')<=$klimit){
447
+					unset($keywords[$kkey]);
448
+				}
449
+			}
450
+		}
451
+		if ($sort_by == 'nearest' || $sort_by == 'farthest') {
452
+			if (count($keywords) > 1) {
453
+				$orderby = $orderby . " ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, ";
454
+			} else {
455
+				$orderby = $orderby . " ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, ";
456
+			}
457
+		} else {
458
+			if (count($keywords) > 1) {
459
+				$orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, " . $orderby;
460
+			} else {
461
+				$orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, " . $orderby;
462
+			}
463
+		}
464
+	}
465 465
 
466
-    /**
467
-     * Filter order by SQL.
468
-     *
469
-     * @since 1.0.0
470
-     * @param string $orderby The orderby query string.
471
-     * @param string $sort_by Sortby query string.
472
-     * @param string $table Listing table name.
473
-     */
474
-    $orderby = apply_filters('geodir_posts_order_by_sort', $orderby, $sort_by, $table);
466
+	/**
467
+	 * Filter order by SQL.
468
+	 *
469
+	 * @since 1.0.0
470
+	 * @param string $orderby The orderby query string.
471
+	 * @param string $sort_by Sortby query string.
472
+	 * @param string $table Listing table name.
473
+	 */
474
+	$orderby = apply_filters('geodir_posts_order_by_sort', $orderby, $sort_by, $table);
475 475
 
476
-    $orderby .= $table . ".is_featured asc, $wpdb->posts.post_date desc, $wpdb->posts.post_title ";
476
+	$orderby .= $table . ".is_featured asc, $wpdb->posts.post_date desc, $wpdb->posts.post_title ";
477 477
 
478
-    return $orderby;
478
+	return $orderby;
479 479
 }
480 480
 
481 481
 
@@ -493,53 +493,53 @@  discard block
 block discarded – undo
493 493
 function geodir_posts_order_by_custom_sort($orderby, $sort_by, $table)
494 494
 {
495 495
 
496
-    global $wpdb;
496
+	global $wpdb;
497 497
 
498
-    if ($sort_by != '' && !is_search()) {
498
+	if ($sort_by != '' && !is_search()) {
499 499
 
500
-        $sort_array = explode('_', $sort_by);
500
+		$sort_array = explode('_', $sort_by);
501 501
 
502
-        $sort_by_count = count($sort_array);
502
+		$sort_by_count = count($sort_array);
503 503
 
504
-        $order = $sort_array[$sort_by_count - 1];
504
+		$order = $sort_array[$sort_by_count - 1];
505 505
 
506
-        if ($sort_by_count > 1 && ($order == 'asc' || $order == 'desc')) {
506
+		if ($sort_by_count > 1 && ($order == 'asc' || $order == 'desc')) {
507 507
 
508
-            $sort_by = str_replace('_' . $order, '', $sort_by);
508
+			$sort_by = str_replace('_' . $order, '', $sort_by);
509 509
 
510
-            switch ($sort_by):
510
+			switch ($sort_by):
511 511
 
512
-                case 'post_date':
513
-                case 'comment_count':
512
+				case 'post_date':
513
+				case 'comment_count':
514 514
 
515
-                    $orderby = "$wpdb->posts." . $sort_by . " " . $order . ", ".$table . ".overall_rating " . $order . ", ";
516
-                    break;
515
+					$orderby = "$wpdb->posts." . $sort_by . " " . $order . ", ".$table . ".overall_rating " . $order . ", ";
516
+					break;
517 517
 
518
-                case 'distance':
519
-                    $orderby = $sort_by . " " . $order . ", ";
520
-                    break;
518
+				case 'distance':
519
+					$orderby = $sort_by . " " . $order . ", ";
520
+					break;
521 521
 
522 522
 
523
-                // sort by rating
524
-                case 'overall_rating':
525
-                    $orderby = " " . $table . "." . $sort_by . "  " . $order . ", " . $table . ".rating_count " . $order . ", ";
523
+				// sort by rating
524
+				case 'overall_rating':
525
+					$orderby = " " . $table . "." . $sort_by . "  " . $order . ", " . $table . ".rating_count " . $order . ", ";
526 526
 
527
-                    break;
527
+					break;
528 528
 
529 529
 
530
-                default:
531
-                    if (geodir_column_exist($table, $sort_by)) {
530
+				default:
531
+					if (geodir_column_exist($table, $sort_by)) {
532 532
 						$orderby = $table . "." . $sort_by . " " . $order . ", ";
533 533
 					}
534
-                    break;
534
+					break;
535 535
 
536
-            endswitch;
536
+			endswitch;
537 537
 
538
-        }
538
+		}
539 539
 
540
-    }
540
+	}
541 541
 
542
-    return $orderby;
542
+	return $orderby;
543 543
 }
544 544
 
545 545
 /**
@@ -554,34 +554,34 @@  discard block
 block discarded – undo
554 554
 {
555 555
 
556 556
 
557
-    global $wpdb, $geodir_post_type, $table, $s, $snear;
557
+	global $wpdb, $geodir_post_type, $table, $s, $snear;
558 558
 
559
-    if (!is_admin()) {
559
+	if (!is_admin()) {
560 560
 
561
-        if (geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
562
-            add_filter('posts_where', 'geodir_edit_listing_where', 1);
561
+		if (geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
562
+			add_filter('posts_where', 'geodir_edit_listing_where', 1);
563 563
 
564
-        } elseif ((is_search() && $_REQUEST['geodir_search'])) {
564
+		} elseif ((is_search() && $_REQUEST['geodir_search'])) {
565 565
 
566
-            add_filter('posts_where', 'searching_filter_where', 1);
566
+			add_filter('posts_where', 'searching_filter_where', 1);
567 567
 
568
-            if ($snear != '')
569
-                add_filter('posts_where', 'searching_filter_where', 1);
568
+			if ($snear != '')
569
+				add_filter('posts_where', 'searching_filter_where', 1);
570 570
 
571
-            add_filter('posts_orderby', 'geodir_posts_orderby', 1);
571
+			add_filter('posts_orderby', 'geodir_posts_orderby', 1);
572 572
 
573
-        } elseif (geodir_is_page('author')) {
573
+		} elseif (geodir_is_page('author')) {
574 574
 
575
-            add_filter('posts_where', 'author_filter_where', 1);
575
+			add_filter('posts_where', 'author_filter_where', 1);
576 576
 
577
-        }
577
+		}
578 578
 
579
-        //if (!geodir_is_page('detail'))
580
-            add_filter('posts_where', 'geodir_default_where', 1);/**/
579
+		//if (!geodir_is_page('detail'))
580
+			add_filter('posts_where', 'geodir_default_where', 1);/**/
581 581
 
582
-        //add_filter( 'user_has_cap', 'geodir_preview_post_cap', 10, 3 );// let subscribers edit their own posts
582
+		//add_filter( 'user_has_cap', 'geodir_preview_post_cap', 10, 3 );// let subscribers edit their own posts
583 583
 
584
-    }
584
+	}
585 585
 }
586 586
 
587 587
 /**
@@ -596,13 +596,13 @@  discard block
 block discarded – undo
596 596
  */
597 597
 function geodir_preview_post_cap($allcaps, $caps, $args)
598 598
 {
599
-    $user_id = get_current_user_id();
600
-    if ($user_id && isset($_REQUEST['post_type']) && $_REQUEST['post_type'] != '' && isset($_REQUEST['p']) && $_REQUEST['p'] != '' && $args[0] == 'edit_post' && $_REQUEST['p'] == $args[2]) {
599
+	$user_id = get_current_user_id();
600
+	if ($user_id && isset($_REQUEST['post_type']) && $_REQUEST['post_type'] != '' && isset($_REQUEST['p']) && $_REQUEST['p'] != '' && $args[0] == 'edit_post' && $_REQUEST['p'] == $args[2]) {
601 601
 
602
-        $allcaps['edit_posts'] = true;
603
-    }
604
-    //print_r($allcaps);
605
-    return $allcaps;
602
+		$allcaps['edit_posts'] = true;
603
+	}
604
+	//print_r($allcaps);
605
+	return $allcaps;
606 606
 }
607 607
 
608 608
 
@@ -617,9 +617,9 @@  discard block
 block discarded – undo
617 617
  */
618 618
 function geodir_edit_listing_where($where)
619 619
 {
620
-    global $wpdb;
621
-    $where = $wpdb->prepare(" AND $wpdb->posts.ID = %d ", $_REQUEST['pid']);
622
-    return $where;
620
+	global $wpdb;
621
+	$where = $wpdb->prepare(" AND $wpdb->posts.ID = %d ", $_REQUEST['pid']);
622
+	return $where;
623 623
 }
624 624
 
625 625
 
@@ -636,29 +636,29 @@  discard block
 block discarded – undo
636 636
  */
637 637
 function geodir_default_where($where)
638 638
 {
639
-    global $wp_query, $wpdb;
640
-
641
-    //print_r($wp_query);
642
-    ########### WPML ###########
643
-
644
-    if (function_exists('icl_object_id')) {
645
-        global $sitepress, $table_prefix;
646
-        $lang_code = ICL_LANGUAGE_CODE;
647
-        $default_lang_code = $sitepress->get_default_language();
648
-        $q_post_type = isset($wp_query->query['post_type']) ? $wp_query->query['post_type'] : '';
649
-        //echo '##########'.$q_post_type;
650
-        if ($lang_code && $q_post_type) {
651
-            $where .= " AND icl_t.language_code = '$lang_code' AND icl_t.element_type IN('post_" . $q_post_type . "') ";
652
-            //$where .= " AND icl_t.language_code = '$lang_code' ";
653
-        }
639
+	global $wp_query, $wpdb;
654 640
 
655
-    }
656
-    ########### WPML ###########
641
+	//print_r($wp_query);
642
+	########### WPML ###########
643
+
644
+	if (function_exists('icl_object_id')) {
645
+		global $sitepress, $table_prefix;
646
+		$lang_code = ICL_LANGUAGE_CODE;
647
+		$default_lang_code = $sitepress->get_default_language();
648
+		$q_post_type = isset($wp_query->query['post_type']) ? $wp_query->query['post_type'] : '';
649
+		//echo '##########'.$q_post_type;
650
+		if ($lang_code && $q_post_type) {
651
+			$where .= " AND icl_t.language_code = '$lang_code' AND icl_t.element_type IN('post_" . $q_post_type . "') ";
652
+			//$where .= " AND icl_t.language_code = '$lang_code' ";
653
+		}
654
+
655
+	}
656
+	########### WPML ###########
657 657
 
658 658
 
659
-    return $where = str_replace("0 = 1", "1=1", $where);
659
+	return $where = str_replace("0 = 1", "1=1", $where);
660 660
 
661
-    /* ====== old code start ===
661
+	/* ====== old code start ===
662 662
     $where = str_replace("0 = 1", "1=1", $where);
663 663
     $country = get_query_var('gd_country');
664 664
     $region = get_query_var('gd_region');
@@ -699,108 +699,108 @@  discard block
 block discarded – undo
699 699
  * @return string Modified where query string.
700 700
  */
701 701
 function searching_filter_where($where) {
702
-    global $wpdb, $geodir_post_type, $table, $plugin_prefix, $dist, $mylat, $mylon, $s, $snear, $s_A, $s_SA, $search_term, $gd_session;
702
+	global $wpdb, $geodir_post_type, $table, $plugin_prefix, $dist, $mylat, $mylon, $s, $snear, $s_A, $s_SA, $search_term, $gd_session;
703 703
 	
704
-    $search_term = 'OR';
705
-    $search_term = 'AND';
706
-    $geodir_custom_search = '';
707
-    $category_search_range = '';
704
+	$search_term = 'OR';
705
+	$search_term = 'AND';
706
+	$geodir_custom_search = '';
707
+	$category_search_range = '';
708 708
 
709
-    if (is_single() && get_query_var('post_type')) {
709
+	if (is_single() && get_query_var('post_type')) {
710 710
 		return $where;
711 711
 	}
712 712
 
713
-    if (is_tax()) {
713
+	if (is_tax()) {
714 714
 		return $where;
715 715
 	}
716 716
 	
717 717
 	$s = trim($s);
718
-    $s  = wp_specialchars_decode($s ,ENT_QUOTES);
719
-    $s_A = wp_specialchars_decode($s_A ,ENT_QUOTES);
720
-
721
-    $where = '';
722
-    $better_search_terms = '';
723
-    if (isset($_REQUEST['stype']))
724
-        $post_types = esc_attr(wp_strip_all_tags($_REQUEST['stype']));
725
-    else
726
-        $post_types = 'gd_place';
727
-
728
-    if ($s != '') {
729
-        $keywords = explode(" ", $s);
730
-        if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
731
-            foreach($keywords as $kkey=>$kword){
732
-                if(mb_strlen($kword, 'UTF-8')<=$klimit){
733
-                    unset($keywords[$kkey]);
734
-                }
735
-            }
736
-        }
718
+	$s  = wp_specialchars_decode($s ,ENT_QUOTES);
719
+	$s_A = wp_specialchars_decode($s_A ,ENT_QUOTES);
737 720
 
738
-        if (!empty($keywords)) {
739
-            foreach ($keywords as $keyword) {
740
-                $keyword = trim($keyword);
741
-                $keyword  = wp_specialchars_decode($keyword ,ENT_QUOTES);
742
-                if ($keyword != '') {
743
-                    /**
744
-                     * Filter the search query keywords SQL.
745
-                     *
746
-                     * @since 1.5.9
747
-                     * @package GeoDirectory
748
-                     * @param string $better_search_terms The query values, default: `' OR ( ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '" OR ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '%" OR ' . $wpdb->posts . '.post_title LIKE "% ' . $keyword . '%" )'`.
749
-                     * @param array $keywords The array of keywords for the query.
750
-                     * @param string $keyword The single keyword being searched.
751
-                     */
721
+	$where = '';
722
+	$better_search_terms = '';
723
+	if (isset($_REQUEST['stype']))
724
+		$post_types = esc_attr(wp_strip_all_tags($_REQUEST['stype']));
725
+	else
726
+		$post_types = 'gd_place';
727
+
728
+	if ($s != '') {
729
+		$keywords = explode(" ", $s);
730
+		if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
731
+			foreach($keywords as $kkey=>$kword){
732
+				if(mb_strlen($kword, 'UTF-8')<=$klimit){
733
+					unset($keywords[$kkey]);
734
+				}
735
+			}
736
+		}
737
+
738
+		if (!empty($keywords)) {
739
+			foreach ($keywords as $keyword) {
740
+				$keyword = trim($keyword);
741
+				$keyword  = wp_specialchars_decode($keyword ,ENT_QUOTES);
742
+				if ($keyword != '') {
743
+					/**
744
+					 * Filter the search query keywords SQL.
745
+					 *
746
+					 * @since 1.5.9
747
+					 * @package GeoDirectory
748
+					 * @param string $better_search_terms The query values, default: `' OR ( ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '" OR ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '%" OR ' . $wpdb->posts . '.post_title LIKE "% ' . $keyword . '%" )'`.
749
+					 * @param array $keywords The array of keywords for the query.
750
+					 * @param string $keyword The single keyword being searched.
751
+					 */
752 752
 					$better_search_terms .= apply_filters("geodir_search_better_search_terms",' OR ( ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '" OR ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '%" OR ' . $wpdb->posts . '.post_title LIKE "% ' . $keyword . '%" )',$keywords,$keyword);
753
-                }
754
-            }
755
-        }
756
-    }
753
+				}
754
+			}
755
+		}
756
+	}
757 757
 
758
-    /* get taxonomy */
759
-    $taxonomies = geodir_get_taxonomies($post_types, true);
760
-    if($taxonomies) {
761
-        $taxonomies = implode("','", $taxonomies);
762
-        $taxonomies = "'" . $taxonomies . "'";
763
-    }else{$taxonomies='';}
758
+	/* get taxonomy */
759
+	$taxonomies = geodir_get_taxonomies($post_types, true);
760
+	if($taxonomies) {
761
+		$taxonomies = implode("','", $taxonomies);
762
+		$taxonomies = "'" . $taxonomies . "'";
763
+	}else{$taxonomies='';}
764 764
 
765
-    $content_where = $terms_where = '';
765
+	$content_where = $terms_where = '';
766 766
 	if ($s != '') {
767
-        /**
768
-         * Filter the search query content where values.
769
-         *
770
-         * @since 1.5.0
771
-         * @package GeoDirectory
772
-         * @param string $content_where The query values, default: `" OR ($wpdb->posts.post_content LIKE \"$s\" OR $wpdb->posts.post_content LIKE \"$s%\" OR $wpdb->posts.post_content LIKE \"% $s%\" OR $wpdb->posts.post_content LIKE \"%>$s%\" OR $wpdb->posts.post_content LIKE \"%\n$s%\") ") "`.
773
-         */
767
+		/**
768
+		 * Filter the search query content where values.
769
+		 *
770
+		 * @since 1.5.0
771
+		 * @package GeoDirectory
772
+		 * @param string $content_where The query values, default: `" OR ($wpdb->posts.post_content LIKE \"$s\" OR $wpdb->posts.post_content LIKE \"$s%\" OR $wpdb->posts.post_content LIKE \"% $s%\" OR $wpdb->posts.post_content LIKE \"%>$s%\" OR $wpdb->posts.post_content LIKE \"%\n$s%\") ") "`.
773
+		 */
774 774
 		$content_where = apply_filters("geodir_search_content_where"," OR ($wpdb->posts.post_content LIKE \"$s\" OR $wpdb->posts.post_content LIKE \"$s%\" OR $wpdb->posts.post_content LIKE \"% $s%\" OR $wpdb->posts.post_content LIKE \"%>$s%\" OR $wpdb->posts.post_content LIKE \"%\n$s%\") ");
775
-        /**
776
-         * Filter the search query term values.
777
-         *
778
-         * @since 1.5.0
779
-         * @package GeoDirectory
780
-         * @param string $terms_where The separator, default: `" AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) "`.
781
-         */
782
-        $terms_where = apply_filters("geodir_search_terms_where"," AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) ");
775
+		/**
776
+		 * Filter the search query term values.
777
+		 *
778
+		 * @since 1.5.0
779
+		 * @package GeoDirectory
780
+		 * @param string $terms_where The separator, default: `" AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) "`.
781
+		 */
782
+		$terms_where = apply_filters("geodir_search_terms_where"," AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) ");
783 783
 	}
784 784
 		
785
-    if ($snear != '') {
785
+	if ($snear != '') {
786 786
 
787 787
 
788
-        if (is_numeric($gd_session->get('near_me_range')) && !isset($_REQUEST['sdist'])) {
789
-            $dist = $gd_session->get('near_me_range');
790
-        }
791
-        $lon1 = $mylon - $dist / abs(cos(deg2rad($mylat)) * 69);
792
-        $lon2 = $mylon + $dist / abs(cos(deg2rad($mylat)) * 69);
793
-        $lat1 = $mylat - ($dist / 69);
794
-        $lat2 = $mylat + ($dist / 69);
788
+		if (is_numeric($gd_session->get('near_me_range')) && !isset($_REQUEST['sdist'])) {
789
+			$dist = $gd_session->get('near_me_range');
790
+		}
791
+		$lon1 = $mylon - $dist / abs(cos(deg2rad($mylat)) * 69);
792
+		$lon2 = $mylon + $dist / abs(cos(deg2rad($mylat)) * 69);
793
+		$lat1 = $mylat - ($dist / 69);
794
+		$lat2 = $mylat + ($dist / 69);
795 795
 
796
-        $rlon1 = is_numeric(min($lon1, $lon2)) ? min($lon1, $lon2) : '';
797
-        $rlon2 = is_numeric(max($lon1, $lon2)) ? max($lon1, $lon2) : '';
798
-        $rlat1 = is_numeric(min($lat1, $lat2)) ? min($lat1, $lat2) : '';
799
-        $rlat2 = is_numeric(max($lat1, $lat2)) ? max($lat1, $lat2) : '';
796
+		$rlon1 = is_numeric(min($lon1, $lon2)) ? min($lon1, $lon2) : '';
797
+		$rlon2 = is_numeric(max($lon1, $lon2)) ? max($lon1, $lon2) : '';
798
+		$rlat1 = is_numeric(min($lat1, $lat2)) ? min($lat1, $lat2) : '';
799
+		$rlat2 = is_numeric(max($lat1, $lat2)) ? max($lat1, $lat2) : '';
800 800
 
801 801
 
802 802
 
803
-	    $where .= " AND ( ( $wpdb->posts.post_title LIKE \"$s\" $better_search_terms)
803
+		$where .= " AND ( ( $wpdb->posts.post_title LIKE \"$s\" $better_search_terms)
804 804
 			                    $content_where 
805 805
 								OR ($wpdb->posts.ID IN( 
806 806
 										SELECT $wpdb->term_relationships.object_id as post_id 
@@ -817,13 +817,13 @@  discard block
 block discarded – undo
817 817
 						AND ( " . $table . ".post_latitude between $rlat1 and $rlat2 )
818 818
 						AND ( " . $table . ".post_longitude between $rlon1 and $rlon2 ) ";
819 819
 
820
-        if (isset($_REQUEST['sdist']) && $_REQUEST['sdist'] != 'all') {
821
-            $DistanceRadius = geodir_getDistanceRadius(get_option('geodir_search_dist_1'));
822
-            $where .= " AND CONVERT((" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".post_latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".post_longitude) * pi()/180 / 2), 2) ))),DECIMAL(64,4)) <= " . $dist;
823
-        }
820
+		if (isset($_REQUEST['sdist']) && $_REQUEST['sdist'] != 'all') {
821
+			$DistanceRadius = geodir_getDistanceRadius(get_option('geodir_search_dist_1'));
822
+			$where .= " AND CONVERT((" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".post_latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".post_longitude) * pi()/180 / 2), 2) ))),DECIMAL(64,4)) <= " . $dist;
823
+		}
824 824
 
825
-    } else {
826
-        $where .= " AND (	( $wpdb->posts.post_title LIKE \"$s\" $better_search_terms)
825
+	} else {
826
+		$where .= " AND (	( $wpdb->posts.post_title LIKE \"$s\" $better_search_terms)
827 827
                             $content_where  
828 828
 							OR ( $wpdb->posts.ID IN(	
829 829
 									SELECT $wpdb->term_relationships.object_id as post_id                     
@@ -837,19 +837,19 @@  discard block
 block discarded – undo
837 837
 					) 
838 838
 				AND $wpdb->posts.post_type in ('$post_types')
839 839
 				AND ($wpdb->posts.post_status = 'publish') ";
840
-    }
840
+	}
841 841
 	
842 842
 	########### WPML ###########
843
-    if ( function_exists( 'icl_object_id' ) ) {       
843
+	if ( function_exists( 'icl_object_id' ) ) {       
844 844
 		$lang_code = ICL_LANGUAGE_CODE;
845 845
 		
846 846
 		if ($lang_code && $post_types) {
847
-            $where .= " AND icl_t.language_code = '".$lang_code."' AND icl_t.element_type IN('post_" . $post_types . "') ";
848
-        }
849
-    }
850
-    ########### WPML ###########
847
+			$where .= " AND icl_t.language_code = '".$lang_code."' AND icl_t.element_type IN('post_" . $post_types . "') ";
848
+		}
849
+	}
850
+	########### WPML ###########
851 851
 	
852
-    return $where;
852
+	return $where;
853 853
 }
854 854
 
855 855
 
@@ -864,45 +864,45 @@  discard block
 block discarded – undo
864 864
  * @return string Modified where query string.
865 865
  */
866 866
 function author_filter_where($where) {
867
-    global $wpdb, $geodir_post_type, $table, $curr;
867
+	global $wpdb, $geodir_post_type, $table, $curr;
868 868
 
869
-    $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
870
-    $user_id = !empty($curauth->ID) ? (int)$curauth->ID : 0;
869
+	$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
870
+	$user_id = !empty($curauth->ID) ? (int)$curauth->ID : 0;
871 871
     
872
-    if (isset($_REQUEST['stype'])) {
873
-        $where = $wpdb->prepare(" AND $wpdb->posts.post_type IN (%s) ",$_REQUEST['stype']);
874
-    } else {
875
-        $where = " AND $wpdb->posts.post_type IN ('gd_place') ";
876
-    }
872
+	if (isset($_REQUEST['stype'])) {
873
+		$where = $wpdb->prepare(" AND $wpdb->posts.post_type IN (%s) ",$_REQUEST['stype']);
874
+	} else {
875
+		$where = " AND $wpdb->posts.post_type IN ('gd_place') ";
876
+	}
877 877
 
878
-    if ($user_id > 0) {
879
-        if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
880
-            $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true);
881
-            $user_fav_posts = !empty($user_fav_posts) && is_array($user_fav_posts) ? implode("','", $user_fav_posts) : '-1';
882
-            $where .= " AND $wpdb->posts.ID IN ('$user_fav_posts')";
883
-        } else
884
-            $where .= " AND $wpdb->posts.post_author = $user_id";
885
-
886
-        if ($user_id == (int)get_current_user_id()) {
887
-            $where .= " AND $wpdb->posts.post_status IN ('publish','draft','pending') ";
888
-        } else {
889
-            $where .= " AND $wpdb->posts.post_status = 'publish' ";
890
-        }
891
-    } else {
892
-        $where .= " AND $wpdb->posts.post_author = '-1' AND $wpdb->posts.post_status = 'publish' ";
893
-    }
878
+	if ($user_id > 0) {
879
+		if (isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite') {
880
+			$user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true);
881
+			$user_fav_posts = !empty($user_fav_posts) && is_array($user_fav_posts) ? implode("','", $user_fav_posts) : '-1';
882
+			$where .= " AND $wpdb->posts.ID IN ('$user_fav_posts')";
883
+		} else
884
+			$where .= " AND $wpdb->posts.post_author = $user_id";
885
+
886
+		if ($user_id == (int)get_current_user_id()) {
887
+			$where .= " AND $wpdb->posts.post_status IN ('publish','draft','pending') ";
888
+		} else {
889
+			$where .= " AND $wpdb->posts.post_status = 'publish' ";
890
+		}
891
+	} else {
892
+		$where .= " AND $wpdb->posts.post_author = '-1' AND $wpdb->posts.post_status = 'publish' ";
893
+	}
894 894
 
895
-    ########### WPML ###########
896
-    if (function_exists('icl_object_id')) {
897
-        $lang_code = ICL_LANGUAGE_CODE;
898
-        if ($lang_code) {
899
-            $where .= " AND icl_t.language_code='" . $lang_code . "' ";
900
-        }
895
+	########### WPML ###########
896
+	if (function_exists('icl_object_id')) {
897
+		$lang_code = ICL_LANGUAGE_CODE;
898
+		if ($lang_code) {
899
+			$where .= " AND icl_t.language_code='" . $lang_code . "' ";
900
+		}
901 901
 
902
-    }
903
-    ########### WPML ###########
902
+	}
903
+	########### WPML ###########
904 904
     
905
-    return $where;
905
+	return $where;
906 906
 }
907 907
 
908 908
 /**
@@ -917,11 +917,11 @@  discard block
 block discarded – undo
917 917
  */
918 918
 function geodir_filter_widget_join($join)
919 919
 {
920
-    global $wp_query, $table;
921
-    if (!empty($wp_query->query['with_pics_only'])) {
922
-        $join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
923
-    }
924
-    return $join;
920
+	global $wp_query, $table;
921
+	if (!empty($wp_query->query['with_pics_only'])) {
922
+		$join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
923
+	}
924
+	return $join;
925 925
 }
926 926
 
927 927
 /**
@@ -936,18 +936,18 @@  discard block
 block discarded – undo
936 936
  */
937 937
 function geodir_filter_widget_where($where)
938 938
 {
939
-    global $wp_query, $table;
940
-    if (!empty($wp_query->query['show_featured_only'])) {
941
-        $where .= " AND " . $table . ".is_featured = '1'";
942
-    }
943
-    if (!empty($wp_query->query['show_special_only'])) {
944
-        $where .= " AND ( " . $table . ".geodir_special_offers != '' AND " . $table . ".geodir_special_offers IS NOT NULL )";
945
-    }
946
-    if (!empty($wp_query->query['with_pics_only'])) {
947
-        $where .= " AND " . GEODIR_ATTACHMENT_TABLE . ".ID IS NOT NULL GROUP BY " . $table . ".post_id";
948
-    }
949
-    if (!empty($wp_query->query['with_videos_only'])) {
950
-        $where .= " AND ( " . $table . ".geodir_video != '' AND " . $table . ".geodir_video IS NOT NULL )";
951
-    }
952
-    return $where;
939
+	global $wp_query, $table;
940
+	if (!empty($wp_query->query['show_featured_only'])) {
941
+		$where .= " AND " . $table . ".is_featured = '1'";
942
+	}
943
+	if (!empty($wp_query->query['show_special_only'])) {
944
+		$where .= " AND ( " . $table . ".geodir_special_offers != '' AND " . $table . ".geodir_special_offers IS NOT NULL )";
945
+	}
946
+	if (!empty($wp_query->query['with_pics_only'])) {
947
+		$where .= " AND " . GEODIR_ATTACHMENT_TABLE . ".ID IS NOT NULL GROUP BY " . $table . ".post_id";
948
+	}
949
+	if (!empty($wp_query->query['with_videos_only'])) {
950
+		$where .= " AND ( " . $table . ".geodir_video != '' AND " . $table . ".geodir_video IS NOT NULL )";
951
+	}
952
+	return $where;
953 953
 }
954 954
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
         } //  Distance
100 100
 
101 101
         if (isset($_REQUEST['sgeo_lat'])) {
102
-            $mylat = (float)esc_attr($_REQUEST['sgeo_lat']);
102
+            $mylat = (float) esc_attr($_REQUEST['sgeo_lat']);
103 103
         } else {
104
-            $mylat = (float)geodir_get_current_city_lat();
104
+            $mylat = (float) geodir_get_current_city_lat();
105 105
         } //  Latatude
106 106
 
107 107
         if (isset($_REQUEST['sgeo_lon'])) {
108
-            $mylon = (float)esc_attr($_REQUEST['sgeo_lon']);
108
+            $mylon = (float) esc_attr($_REQUEST['sgeo_lon']);
109 109
         } else {
110
-            $mylon = (float)geodir_get_current_city_lng();
110
+            $mylon = (float) geodir_get_current_city_lng();
111 111
         } //  Distance
112 112
 
113 113
         if (isset($_REQUEST['snear'])) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         if ($snear == 'NEAR ME') {
122 122
             $ip = $_SERVER['REMOTE_ADDR'];
123
-            $addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip));
123
+            $addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip));
124 124
             $mylat = stripslashes(ucfirst($addr_details[geoplugin_latitude]));
125 125
             $mylon = stripslashes(ucfirst($addr_details[geoplugin_longitude]));
126 126
         }
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
             $s_AA = str_replace(" ", "", $s);
131 131
             $s_A = explode(",", $s_AA);
132 132
             $s_A = implode('","', $s_A);
133
-            $s_A = '"' . $s_A . '"';
133
+            $s_A = '"'.$s_A.'"';
134 134
         } else {
135
-            $s_A = '"' . $s . '"';
135
+            $s_A = '"'.$s.'"';
136 136
         }
137 137
 
138 138
         if (strstr($s, ' ')) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     }
194 194
     if (isset($query->query_vars['is_geodir_loop']) && $query->query_vars['is_geodir_loop']) {
195 195
 
196
-        $table = $plugin_prefix . $geodir_post_type . '_detail';
196
+        $table = $plugin_prefix.$geodir_post_type.'_detail';
197 197
 
198 198
         add_filter('posts_fields', 'geodir_posts_fields', 1);
199 199
         add_filter('posts_join', 'geodir_posts_join', 1);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     global $wp_query, $wpdb, $geodir_post_type, $table, $plugin_prefix, $dist, $mylat, $mylon, $snear, $gd_session;
234 234
 
235 235
     // Filter-Location-Manager to add location table.
236
-    $fields .= ", " . $table . ".* ";
236
+    $fields .= ", ".$table.".* ";
237 237
     
238 238
 	if ($snear != '' || $gd_session->get('all_near_me')) {
239 239
         $DistanceRadius = geodir_getDistanceRadius(get_option('geodir_search_dist_1'));
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
             $mylon = $gd_session->get('user_lon');
244 244
         }
245 245
 
246
-        $fields .= " , (" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".post_latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".post_longitude) * pi()/180 / 2), 2) )))as distance ";
246
+        $fields .= " , (".$DistanceRadius." * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(".$table.".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(".$table.".post_latitude) * pi()/180) *POWER(SIN(($mylon - ".$table.".post_longitude) * pi()/180 / 2), 2) )))as distance ";
247 247
     }
248 248
 
249 249
     global $s;
250 250
     if (is_search() && isset($_REQUEST['geodir_search']) && $s && trim($s) != '') {
251 251
         $keywords = explode(" ", $s);
252 252
 
253
-        if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
254
-            foreach($keywords as $kkey=>$kword){
255
-                if(mb_strlen($kword, 'UTF-8')<=$klimit){
253
+        if (is_array($keywords) && $klimit = get_option('geodir_search_word_limit')) {
254
+            foreach ($keywords as $kkey=>$kword) {
255
+                if (mb_strlen($kword, 'UTF-8') <= $klimit) {
256 256
                     unset($keywords[$kkey]);
257 257
                 }
258 258
             }
@@ -270,24 +270,24 @@  discard block
 block discarded – undo
270 270
                 $count = 0;
271 271
                 foreach ($keywords as $keyword) {
272 272
                     $keyword = trim($keyword);
273
-                    $keyword  = wp_specialchars_decode($keyword ,ENT_QUOTES);
273
+                    $keyword = wp_specialchars_decode($keyword, ENT_QUOTES);
274 274
 					$count++;
275 275
                     if ($count < count($keywords)) {
276 276
                        // $gd_titlematch_part .= $wpdb->posts . ".post_title LIKE '%%" . $keyword . "%%' " . $key . " ";
277
-						$gd_titlematch_part .= "( " . $wpdb->posts . ".post_title LIKE '" . $keyword . "' OR " . $wpdb->posts . ".post_title LIKE '" . $keyword . "%%' OR " . $wpdb->posts . ".post_title LIKE '%% " . $keyword . "%%' ) " . $key . " ";
277
+						$gd_titlematch_part .= "( ".$wpdb->posts.".post_title LIKE '".$keyword."' OR ".$wpdb->posts.".post_title LIKE '".$keyword."%%' OR ".$wpdb->posts.".post_title LIKE '%% ".$keyword."%%' ) ".$key." ";
278 278
                     } else {
279 279
                         //$gd_titlematch_part .= $wpdb->posts . ".post_title LIKE '%%" . $keyword . "%%' ";
280
-						$gd_titlematch_part .= "( " . $wpdb->posts . ".post_title LIKE '" . $keyword . "' OR " . $wpdb->posts . ".post_title LIKE '" . $keyword . "%%' OR " . $wpdb->posts . ".post_title LIKE '%% " . $keyword . "%%' ) ";
280
+						$gd_titlematch_part .= "( ".$wpdb->posts.".post_title LIKE '".$keyword."' OR ".$wpdb->posts.".post_title LIKE '".$keyword."%%' OR ".$wpdb->posts.".post_title LIKE '%% ".$keyword."%%' ) ";
281 281
                     }
282 282
                 }
283
-                $gd_titlematch_part .= "THEN 1 ELSE 0 END AS " . $part . ",";
283
+                $gd_titlematch_part .= "THEN 1 ELSE 0 END AS ".$part.",";
284 284
             }
285 285
         } else {
286 286
             $gd_titlematch_part = "";
287 287
         }
288
-        $s = stripslashes_deep( $s );
289
-        $s = wp_specialchars_decode($s,ENT_QUOTES);
290
-		$fields .= $wpdb->prepare(", CASE WHEN " . $table . ".is_featured='1' THEN 1 ELSE 0 END AS gd_featured, CASE WHEN " . $wpdb->posts . ".post_title LIKE %s THEN 1 ELSE 0 END AS gd_exacttitle," . $gd_titlematch_part . " CASE WHEN ( " . $wpdb->posts . ".post_title LIKE %s OR " . $wpdb->posts . ".post_title LIKE %s OR " . $wpdb->posts . ".post_title LIKE %s ) THEN 1 ELSE 0 END AS gd_titlematch, CASE WHEN ( " . $wpdb->posts . ".post_content LIKE %s OR " . $wpdb->posts . ".post_content LIKE %s OR " . $wpdb->posts . ".post_content LIKE %s OR " . $wpdb->posts . ".post_content LIKE %s ) THEN 1 ELSE 0 END AS gd_content", array($s, $s, $s . '%', '% ' . $s . '%', $s, $s . ' %', '% ' . $s . ' %', '% ' . $s));
288
+        $s = stripslashes_deep($s);
289
+        $s = wp_specialchars_decode($s, ENT_QUOTES);
290
+		$fields .= $wpdb->prepare(", CASE WHEN ".$table.".is_featured='1' THEN 1 ELSE 0 END AS gd_featured, CASE WHEN ".$wpdb->posts.".post_title LIKE %s THEN 1 ELSE 0 END AS gd_exacttitle,".$gd_titlematch_part." CASE WHEN ( ".$wpdb->posts.".post_title LIKE %s OR ".$wpdb->posts.".post_title LIKE %s OR ".$wpdb->posts.".post_title LIKE %s ) THEN 1 ELSE 0 END AS gd_titlematch, CASE WHEN ( ".$wpdb->posts.".post_content LIKE %s OR ".$wpdb->posts.".post_content LIKE %s OR ".$wpdb->posts.".post_content LIKE %s OR ".$wpdb->posts.".post_content LIKE %s ) THEN 1 ELSE 0 END AS gd_content", array($s, $s, $s.'%', '% '.$s.'%', $s, $s.' %', '% '.$s.' %', '% '.$s));
291 291
     }
292 292
 
293 293
     return $fields;
@@ -316,13 +316,13 @@  discard block
 block discarded – undo
316 316
         $lang_code = ICL_LANGUAGE_CODE;
317 317
         $default_lang_code = $sitepress->get_default_language();
318 318
         if ($lang_code) {
319
-            $join .= "JOIN " . $table_prefix . "icl_translations icl_t ON icl_t.element_id = " . $table_prefix . "posts.ID";
319
+            $join .= "JOIN ".$table_prefix."icl_translations icl_t ON icl_t.element_id = ".$table_prefix."posts.ID";
320 320
         }
321 321
 
322 322
     }
323 323
     ########### WPML ###########
324 324
 
325
-    $join .= " INNER JOIN " . $table . " ON (" . $table . ".post_id = $wpdb->posts.ID)  ";
325
+    $join .= " INNER JOIN ".$table." ON (".$table.".post_id = $wpdb->posts.ID)  ";
326 326
     //===old code start
327 327
     //$join .= " INNER JOIN ".POST_LOCATION_TABLE." ON (".$table.".post_location_id = ".POST_LOCATION_TABLE.".location_id)  " ;//===old code end
328 328
 
@@ -405,20 +405,20 @@  discard block
 block discarded – undo
405 405
             break;
406 406
         case 'low_review':
407 407
         case 'rating_count_asc':
408
-            $orderby = $table . ".rating_count ASC, " . $table . ".overall_rating ASC, ";
408
+            $orderby = $table.".rating_count ASC, ".$table.".overall_rating ASC, ";
409 409
             break;
410 410
         case 'high_review':
411 411
         case 'rating_count_desc':
412
-			$orderby = $table . ".rating_count DESC, " . $table . ".overall_rating DESC, ";
412
+			$orderby = $table.".rating_count DESC, ".$table.".overall_rating DESC, ";
413 413
             break;
414 414
         case 'low_rating':
415
-            $orderby = "( " . $table . ".overall_rating  ) ASC, " . $table . ".rating_count ASC,  ";
415
+            $orderby = "( ".$table.".overall_rating  ) ASC, ".$table.".rating_count ASC,  ";
416 416
             break;
417 417
         case 'high_rating':
418
-            $orderby = " " . $table . ".overall_rating DESC, " . $table . ".rating_count DESC, ";
418
+            $orderby = " ".$table.".overall_rating DESC, ".$table.".rating_count DESC, ";
419 419
             break;
420 420
         case 'featured':
421
-            $orderby = $table . ".is_featured asc, ";
421
+            $orderby = $table.".is_featured asc, ";
422 422
             break;
423 423
         case 'nearest':
424 424
             $orderby = " distance asc, ";
@@ -441,24 +441,24 @@  discard block
 block discarded – undo
441 441
 
442 442
     if (is_search() && isset($_REQUEST['geodir_search']) && $s && trim($s) != '') {
443 443
         $keywords = explode(" ", $s);
444
-        if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
445
-            foreach($keywords as $kkey=>$kword){
446
-                if(mb_strlen($kword, 'UTF-8')<=$klimit){
444
+        if (is_array($keywords) && $klimit = get_option('geodir_search_word_limit')) {
445
+            foreach ($keywords as $kkey=>$kword) {
446
+                if (mb_strlen($kword, 'UTF-8') <= $klimit) {
447 447
                     unset($keywords[$kkey]);
448 448
                 }
449 449
             }
450 450
         }
451 451
         if ($sort_by == 'nearest' || $sort_by == 'farthest') {
452 452
             if (count($keywords) > 1) {
453
-                $orderby = $orderby . " ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, ";
453
+                $orderby = $orderby." ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, ";
454 454
             } else {
455
-                $orderby = $orderby . " ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, ";
455
+                $orderby = $orderby." ( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, ";
456 456
             }
457 457
         } else {
458 458
             if (count($keywords) > 1) {
459
-                $orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, " . $orderby;
459
+                $orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC, ".$orderby;
460 460
             } else {
461
-                $orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, " . $orderby;
461
+                $orderby = "( gd_titlematch * 2 + gd_featured * 5 + gd_exacttitle * 10 + gd_content * 1.5) DESC, ".$orderby;
462 462
             }
463 463
         }
464 464
     }
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
      */
474 474
     $orderby = apply_filters('geodir_posts_order_by_sort', $orderby, $sort_by, $table);
475 475
 
476
-    $orderby .= $table . ".is_featured asc, $wpdb->posts.post_date desc, $wpdb->posts.post_title ";
476
+    $orderby .= $table.".is_featured asc, $wpdb->posts.post_date desc, $wpdb->posts.post_title ";
477 477
 
478 478
     return $orderby;
479 479
 }
@@ -505,31 +505,31 @@  discard block
 block discarded – undo
505 505
 
506 506
         if ($sort_by_count > 1 && ($order == 'asc' || $order == 'desc')) {
507 507
 
508
-            $sort_by = str_replace('_' . $order, '', $sort_by);
508
+            $sort_by = str_replace('_'.$order, '', $sort_by);
509 509
 
510 510
             switch ($sort_by):
511 511
 
512 512
                 case 'post_date':
513 513
                 case 'comment_count':
514 514
 
515
-                    $orderby = "$wpdb->posts." . $sort_by . " " . $order . ", ".$table . ".overall_rating " . $order . ", ";
515
+                    $orderby = "$wpdb->posts.".$sort_by." ".$order.", ".$table.".overall_rating ".$order.", ";
516 516
                     break;
517 517
 
518 518
                 case 'distance':
519
-                    $orderby = $sort_by . " " . $order . ", ";
519
+                    $orderby = $sort_by." ".$order.", ";
520 520
                     break;
521 521
 
522 522
 
523 523
                 // sort by rating
524 524
                 case 'overall_rating':
525
-                    $orderby = " " . $table . "." . $sort_by . "  " . $order . ", " . $table . ".rating_count " . $order . ", ";
525
+                    $orderby = " ".$table.".".$sort_by."  ".$order.", ".$table.".rating_count ".$order.", ";
526 526
 
527 527
                     break;
528 528
 
529 529
 
530 530
                 default:
531 531
                     if (geodir_column_exist($table, $sort_by)) {
532
-						$orderby = $table . "." . $sort_by . " " . $order . ", ";
532
+						$orderby = $table.".".$sort_by." ".$order.", ";
533 533
 					}
534 534
                     break;
535 535
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
         }
578 578
 
579 579
         //if (!geodir_is_page('detail'))
580
-            add_filter('posts_where', 'geodir_default_where', 1);/**/
580
+            add_filter('posts_where', 'geodir_default_where', 1); /**/
581 581
 
582 582
         //add_filter( 'user_has_cap', 'geodir_preview_post_cap', 10, 3 );// let subscribers edit their own posts
583 583
 
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
         $q_post_type = isset($wp_query->query['post_type']) ? $wp_query->query['post_type'] : '';
649 649
         //echo '##########'.$q_post_type;
650 650
         if ($lang_code && $q_post_type) {
651
-            $where .= " AND icl_t.language_code = '$lang_code' AND icl_t.element_type IN('post_" . $q_post_type . "') ";
651
+            $where .= " AND icl_t.language_code = '$lang_code' AND icl_t.element_type IN('post_".$q_post_type."') ";
652 652
             //$where .= " AND icl_t.language_code = '$lang_code' ";
653 653
         }
654 654
 
@@ -715,8 +715,8 @@  discard block
 block discarded – undo
715 715
 	}
716 716
 	
717 717
 	$s = trim($s);
718
-    $s  = wp_specialchars_decode($s ,ENT_QUOTES);
719
-    $s_A = wp_specialchars_decode($s_A ,ENT_QUOTES);
718
+    $s = wp_specialchars_decode($s, ENT_QUOTES);
719
+    $s_A = wp_specialchars_decode($s_A, ENT_QUOTES);
720 720
 
721 721
     $where = '';
722 722
     $better_search_terms = '';
@@ -727,9 +727,9 @@  discard block
 block discarded – undo
727 727
 
728 728
     if ($s != '') {
729 729
         $keywords = explode(" ", $s);
730
-        if(is_array($keywords) && $klimit = get_option('geodir_search_word_limit')){
731
-            foreach($keywords as $kkey=>$kword){
732
-                if(mb_strlen($kword, 'UTF-8')<=$klimit){
730
+        if (is_array($keywords) && $klimit = get_option('geodir_search_word_limit')) {
731
+            foreach ($keywords as $kkey=>$kword) {
732
+                if (mb_strlen($kword, 'UTF-8') <= $klimit) {
733 733
                     unset($keywords[$kkey]);
734 734
                 }
735 735
             }
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
         if (!empty($keywords)) {
739 739
             foreach ($keywords as $keyword) {
740 740
                 $keyword = trim($keyword);
741
-                $keyword  = wp_specialchars_decode($keyword ,ENT_QUOTES);
741
+                $keyword = wp_specialchars_decode($keyword, ENT_QUOTES);
742 742
                 if ($keyword != '') {
743 743
                     /**
744 744
                      * Filter the search query keywords SQL.
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
                      * @param array $keywords The array of keywords for the query.
750 750
                      * @param string $keyword The single keyword being searched.
751 751
                      */
752
-					$better_search_terms .= apply_filters("geodir_search_better_search_terms",' OR ( ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '" OR ' . $wpdb->posts . '.post_title LIKE "' . $keyword . '%" OR ' . $wpdb->posts . '.post_title LIKE "% ' . $keyword . '%" )',$keywords,$keyword);
752
+					$better_search_terms .= apply_filters("geodir_search_better_search_terms", ' OR ( '.$wpdb->posts.'.post_title LIKE "'.$keyword.'" OR '.$wpdb->posts.'.post_title LIKE "'.$keyword.'%" OR '.$wpdb->posts.'.post_title LIKE "% '.$keyword.'%" )', $keywords, $keyword);
753 753
                 }
754 754
             }
755 755
         }
@@ -757,10 +757,10 @@  discard block
 block discarded – undo
757 757
 
758 758
     /* get taxonomy */
759 759
     $taxonomies = geodir_get_taxonomies($post_types, true);
760
-    if($taxonomies) {
760
+    if ($taxonomies) {
761 761
         $taxonomies = implode("','", $taxonomies);
762
-        $taxonomies = "'" . $taxonomies . "'";
763
-    }else{$taxonomies='';}
762
+        $taxonomies = "'".$taxonomies."'";
763
+    } else {$taxonomies = ''; }
764 764
 
765 765
     $content_where = $terms_where = '';
766 766
 	if ($s != '') {
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
          * @package GeoDirectory
772 772
          * @param string $content_where The query values, default: `" OR ($wpdb->posts.post_content LIKE \"$s\" OR $wpdb->posts.post_content LIKE \"$s%\" OR $wpdb->posts.post_content LIKE \"% $s%\" OR $wpdb->posts.post_content LIKE \"%>$s%\" OR $wpdb->posts.post_content LIKE \"%\n$s%\") ") "`.
773 773
          */
774
-		$content_where = apply_filters("geodir_search_content_where"," OR ($wpdb->posts.post_content LIKE \"$s\" OR $wpdb->posts.post_content LIKE \"$s%\" OR $wpdb->posts.post_content LIKE \"% $s%\" OR $wpdb->posts.post_content LIKE \"%>$s%\" OR $wpdb->posts.post_content LIKE \"%\n$s%\") ");
774
+		$content_where = apply_filters("geodir_search_content_where", " OR ($wpdb->posts.post_content LIKE \"$s\" OR $wpdb->posts.post_content LIKE \"$s%\" OR $wpdb->posts.post_content LIKE \"% $s%\" OR $wpdb->posts.post_content LIKE \"%>$s%\" OR $wpdb->posts.post_content LIKE \"%\n$s%\") ");
775 775
         /**
776 776
          * Filter the search query term values.
777 777
          *
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
          * @package GeoDirectory
780 780
          * @param string $terms_where The separator, default: `" AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) "`.
781 781
          */
782
-        $terms_where = apply_filters("geodir_search_terms_where"," AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) ");
782
+        $terms_where = apply_filters("geodir_search_terms_where", " AND ($wpdb->terms.name LIKE \"$s\" OR $wpdb->terms.name LIKE \"$s%\" OR $wpdb->terms.name LIKE \"% $s%\" OR $wpdb->terms.name IN ($s_A)) ");
783 783
 	}
784 784
 		
785 785
     if ($snear != '') {
@@ -814,12 +814,12 @@  discard block
 block discarded – undo
814 814
 							)
815 815
 						AND $wpdb->posts.post_type in ('{$post_types}')
816 816
 						AND ($wpdb->posts.post_status = 'publish')
817
-						AND ( " . $table . ".post_latitude between $rlat1 and $rlat2 )
818
-						AND ( " . $table . ".post_longitude between $rlon1 and $rlon2 ) ";
817
+						AND ( ".$table.".post_latitude between $rlat1 and $rlat2 )
818
+						AND ( ".$table.".post_longitude between $rlon1 and $rlon2 ) ";
819 819
 
820 820
         if (isset($_REQUEST['sdist']) && $_REQUEST['sdist'] != 'all') {
821 821
             $DistanceRadius = geodir_getDistanceRadius(get_option('geodir_search_dist_1'));
822
-            $where .= " AND CONVERT((" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".post_latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".post_longitude) * pi()/180 / 2), 2) ))),DECIMAL(64,4)) <= " . $dist;
822
+            $where .= " AND CONVERT((".$DistanceRadius." * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(".$table.".post_latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(".$table.".post_latitude) * pi()/180) *POWER(SIN(($mylon - ".$table.".post_longitude) * pi()/180 / 2), 2) ))),DECIMAL(64,4)) <= ".$dist;
823 823
         }
824 824
 
825 825
     } else {
@@ -840,11 +840,11 @@  discard block
 block discarded – undo
840 840
     }
841 841
 	
842 842
 	########### WPML ###########
843
-    if ( function_exists( 'icl_object_id' ) ) {       
843
+    if (function_exists('icl_object_id')) {       
844 844
 		$lang_code = ICL_LANGUAGE_CODE;
845 845
 		
846 846
 		if ($lang_code && $post_types) {
847
-            $where .= " AND icl_t.language_code = '".$lang_code."' AND icl_t.element_type IN('post_" . $post_types . "') ";
847
+            $where .= " AND icl_t.language_code = '".$lang_code."' AND icl_t.element_type IN('post_".$post_types."') ";
848 848
         }
849 849
     }
850 850
     ########### WPML ###########
@@ -867,10 +867,10 @@  discard block
 block discarded – undo
867 867
     global $wpdb, $geodir_post_type, $table, $curr;
868 868
 
869 869
     $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
870
-    $user_id = !empty($curauth->ID) ? (int)$curauth->ID : 0;
870
+    $user_id = !empty($curauth->ID) ? (int) $curauth->ID : 0;
871 871
     
872 872
     if (isset($_REQUEST['stype'])) {
873
-        $where = $wpdb->prepare(" AND $wpdb->posts.post_type IN (%s) ",$_REQUEST['stype']);
873
+        $where = $wpdb->prepare(" AND $wpdb->posts.post_type IN (%s) ", $_REQUEST['stype']);
874 874
     } else {
875 875
         $where = " AND $wpdb->posts.post_type IN ('gd_place') ";
876 876
     }
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
         } else
884 884
             $where .= " AND $wpdb->posts.post_author = $user_id";
885 885
 
886
-        if ($user_id == (int)get_current_user_id()) {
886
+        if ($user_id == (int) get_current_user_id()) {
887 887
             $where .= " AND $wpdb->posts.post_status IN ('publish','draft','pending') ";
888 888
         } else {
889 889
             $where .= " AND $wpdb->posts.post_status = 'publish' ";
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
     if (function_exists('icl_object_id')) {
897 897
         $lang_code = ICL_LANGUAGE_CODE;
898 898
         if ($lang_code) {
899
-            $where .= " AND icl_t.language_code='" . $lang_code . "' ";
899
+            $where .= " AND icl_t.language_code='".$lang_code."' ";
900 900
         }
901 901
 
902 902
     }
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
 {
920 920
     global $wp_query, $table;
921 921
     if (!empty($wp_query->query['with_pics_only'])) {
922
-        $join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
922
+        $join .= " LEFT JOIN ".GEODIR_ATTACHMENT_TABLE." ON ( ".GEODIR_ATTACHMENT_TABLE.".post_id=".$table.".post_id AND ".GEODIR_ATTACHMENT_TABLE.".mime_type LIKE '%image%' )";
923 923
     }
924 924
     return $join;
925 925
 }
@@ -938,16 +938,16 @@  discard block
 block discarded – undo
938 938
 {
939 939
     global $wp_query, $table;
940 940
     if (!empty($wp_query->query['show_featured_only'])) {
941
-        $where .= " AND " . $table . ".is_featured = '1'";
941
+        $where .= " AND ".$table.".is_featured = '1'";
942 942
     }
943 943
     if (!empty($wp_query->query['show_special_only'])) {
944
-        $where .= " AND ( " . $table . ".geodir_special_offers != '' AND " . $table . ".geodir_special_offers IS NOT NULL )";
944
+        $where .= " AND ( ".$table.".geodir_special_offers != '' AND ".$table.".geodir_special_offers IS NOT NULL )";
945 945
     }
946 946
     if (!empty($wp_query->query['with_pics_only'])) {
947
-        $where .= " AND " . GEODIR_ATTACHMENT_TABLE . ".ID IS NOT NULL GROUP BY " . $table . ".post_id";
947
+        $where .= " AND ".GEODIR_ATTACHMENT_TABLE.".ID IS NOT NULL GROUP BY ".$table.".post_id";
948 948
     }
949 949
     if (!empty($wp_query->query['with_videos_only'])) {
950
-        $where .= " AND ( " . $table . ".geodir_video != '' AND " . $table . ".geodir_video IS NOT NULL )";
950
+        $where .= " AND ( ".$table.".geodir_video != '' AND ".$table.".geodir_video IS NOT NULL )";
951 951
     }
952 952
     return $where;
953 953
 }
954 954
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-admin/admin_install.php 2 patches
Indentation   +160 added lines, -160 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 function geodir_activation()
25 25
 {
26 26
 
27
-    geodir_install();
28
-    add_action('wp_loaded', 'geodir_flush_activation');
27
+	geodir_install();
28
+	add_action('wp_loaded', 'geodir_flush_activation');
29 29
 }
30 30
 
31 31
 /**
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
  */
37 37
 function geodir_flush_activation()
38 38
 {
39
-    // Remove rewrite rules and then recreate rewrite rules.
40
-    // flush late so everything is loaded
41
-    flush_rewrite_rules();
39
+	// Remove rewrite rules and then recreate rewrite rules.
40
+	// flush late so everything is loaded
41
+	flush_rewrite_rules();
42 42
 }
43 43
 
44 44
 /**
@@ -50,44 +50,44 @@  discard block
 block discarded – undo
50 50
  */
51 51
 function geodir_install()
52 52
 {
53
-    global $geodir_settings;
54
-
55
-    /**
56
-     * Called before the GD installation scripts have run.
57
-     *
58
-     * @since 1.0.0
59
-     * @see 'geodir_installation_end'
60
-     */
61
-    do_action('geodir_installation_start');
62
-
63
-    // Do install
64
-    if (!get_option('geodir_default_data_installed')) {
65
-        geodir_create_tables(); // in admin db install.php
66
-        geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php
67
-        geodir_create_default_fields();
68
-        //geodir_default_taxonomies();
69
-        geodir_set_default_options();
70
-        geodir_create_pages();
71
-        geodir_set_default_widgets();
72
-        gd_install_theme_compat();
73
-
74
-        update_option('geodir_default_data_installed', 1);
75
-
76
-    }
77
-
78
-    if (!get_option('geodir_default_data_installed_1.2.8')) {
79
-        //geodir_create_tables(); // in admin db install.php
80
-        update_option('geodir_default_data_installed_1.2.8', 1);
81
-    }
82
-
83
-    geodir_installation_end();
84
-    /**
85
-     * Called after the GD installation scripts have run.
86
-     *
87
-     * @since 1.0.0
88
-     * @see 'geodir_installation_start'
89
-     */
90
-    do_action('geodir_installation_end');
53
+	global $geodir_settings;
54
+
55
+	/**
56
+	 * Called before the GD installation scripts have run.
57
+	 *
58
+	 * @since 1.0.0
59
+	 * @see 'geodir_installation_end'
60
+	 */
61
+	do_action('geodir_installation_start');
62
+
63
+	// Do install
64
+	if (!get_option('geodir_default_data_installed')) {
65
+		geodir_create_tables(); // in admin db install.php
66
+		geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php
67
+		geodir_create_default_fields();
68
+		//geodir_default_taxonomies();
69
+		geodir_set_default_options();
70
+		geodir_create_pages();
71
+		geodir_set_default_widgets();
72
+		gd_install_theme_compat();
73
+
74
+		update_option('geodir_default_data_installed', 1);
75
+
76
+	}
77
+
78
+	if (!get_option('geodir_default_data_installed_1.2.8')) {
79
+		//geodir_create_tables(); // in admin db install.php
80
+		update_option('geodir_default_data_installed_1.2.8', 1);
81
+	}
82
+
83
+	geodir_installation_end();
84
+	/**
85
+	 * Called after the GD installation scripts have run.
86
+	 *
87
+	 * @since 1.0.0
88
+	 * @see 'geodir_installation_start'
89
+	 */
90
+	do_action('geodir_installation_end');
91 91
 
92 92
 
93 93
 }
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
 function geodir_create_pages()
105 105
 {
106 106
 
107
-    //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' );
108
-    geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
109
-    geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), '');
110
-    geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), '');
111
-    geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), '');
112
-    geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), '');
107
+	//geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' );
108
+	geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
109
+	geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), '');
110
+	geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), '');
111
+	geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), '');
112
+	geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), '');
113 113
 
114
-    //New since 1.5.3
115
-    geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
116
-    geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
114
+	//New since 1.5.3
115
+	geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
116
+	geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
117 117
 
118 118
 
119 119
 }
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
  */
130 130
 function geodir_installation_end()
131 131
 {
132
-    //update_option( "geodir_db_version", GEODIRECTORY_VERSION );
132
+	//update_option( "geodir_db_version", GEODIRECTORY_VERSION );
133 133
 
134
-    update_option("geodir_installed", 1);
135
-    update_option("geodir_installation_redirect", 1);
136
-    update_option('skip_install_geodir_pages', 0);
134
+	update_option("geodir_installed", 1);
135
+	update_option("geodir_installation_redirect", 1);
136
+	update_option('skip_install_geodir_pages', 0);
137 137
 }
138 138
 
139 139
 /**
@@ -147,45 +147,45 @@  discard block
 block discarded – undo
147 147
  */
148 148
 function geodir_set_default_options()
149 149
 {
150
-    global $geodir_settings;
151
-    /**
152
-     * Contains settings array for general tab.
153
-     *
154
-     * @since 1.0.0
155
-     * @package GeoDirectory
156
-     */
157
-    include_once("option-pages/general_settings_array.php");
158
-    /**
159
-     * Contains settings array for design tab.
160
-     *
161
-     * @since 1.0.0
162
-     * @package GeoDirectory
163
-     */
164
-    include_once("option-pages/design_settings_array.php");
165
-    /**
166
-     * Contains settings array for notifications tab.
167
-     *
168
-     * @since 1.0.0
169
-     * @package GeoDirectory
170
-     */
171
-    include_once("option-pages/notifications_settings_array.php");
172
-    /**
173
-     * Contains settings array for permalink tab.
174
-     *
175
-     * @since 1.0.0
176
-     * @package GeoDirectory
177
-     */
178
-    include_once("option-pages/permalink_settings_array.php");
179
-    /**
180
-     * Contains settings array for title / meta tab.
181
-     *
182
-     * @since 1.5.4
183
-     * @package GeoDirectory
184
-     */
185
-    include_once("option-pages/title_meta_settings_array.php");
186
-    foreach ($geodir_settings as $value) {
187
-        geodir_update_options($value, true);
188
-    }
150
+	global $geodir_settings;
151
+	/**
152
+	 * Contains settings array for general tab.
153
+	 *
154
+	 * @since 1.0.0
155
+	 * @package GeoDirectory
156
+	 */
157
+	include_once("option-pages/general_settings_array.php");
158
+	/**
159
+	 * Contains settings array for design tab.
160
+	 *
161
+	 * @since 1.0.0
162
+	 * @package GeoDirectory
163
+	 */
164
+	include_once("option-pages/design_settings_array.php");
165
+	/**
166
+	 * Contains settings array for notifications tab.
167
+	 *
168
+	 * @since 1.0.0
169
+	 * @package GeoDirectory
170
+	 */
171
+	include_once("option-pages/notifications_settings_array.php");
172
+	/**
173
+	 * Contains settings array for permalink tab.
174
+	 *
175
+	 * @since 1.0.0
176
+	 * @package GeoDirectory
177
+	 */
178
+	include_once("option-pages/permalink_settings_array.php");
179
+	/**
180
+	 * Contains settings array for title / meta tab.
181
+	 *
182
+	 * @since 1.5.4
183
+	 * @package GeoDirectory
184
+	 */
185
+	include_once("option-pages/title_meta_settings_array.php");
186
+	foreach ($geodir_settings as $value) {
187
+		geodir_update_options($value, true);
188
+	}
189 189
 
190 190
 }
191 191
 
@@ -199,103 +199,103 @@  discard block
 block discarded – undo
199 199
 function geodir_set_default_widgets()
200 200
 {
201 201
 
202
-    $widget_option_list = array();
203
-    $widgetinfo = array();
204
-    $sidebarvalue_array = array();
205
-    $sidebars_widgets = array();
202
+	$widget_option_list = array();
203
+	$widgetinfo = array();
204
+	$sidebarvalue_array = array();
205
+	$sidebars_widgets = array();
206 206
 
207
-    /*===========================*/
208
-    /*  Widgets ON HOME PAGE     */
209
-    /*===========================*/
207
+	/*===========================*/
208
+	/*  Widgets ON HOME PAGE     */
209
+	/*===========================*/
210 210
 
211
-    $widget_option_list['geodir_home_top'] =
212
-        array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
213
-            'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'),
214
-            'geodir_advance_search' => array());
211
+	$widget_option_list['geodir_home_top'] =
212
+		array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
213
+			'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'),
214
+			'geodir_advance_search' => array());
215 215
 
216
-    $widget_option_list['geodir_home_content'] =
217
-        array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1'));
216
+	$widget_option_list['geodir_home_content'] =
217
+		array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1'));
218 218
 
219
-    $widget_option_list['geodir_home_right'] =
220
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
221
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
219
+	$widget_option_list['geodir_home_right'] =
220
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
221
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
222 222
 
223
-    /*===========================*/
224
-    /*  Widgets ON LISTING PAGE     */
225
-    /*===========================*/
223
+	/*===========================*/
224
+	/*  Widgets ON LISTING PAGE     */
225
+	/*===========================*/
226 226
 
227
-    $widget_option_list['geodir_listing_top'] =
228
-        array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
229
-            'geodir_advance_search' => array());
227
+	$widget_option_list['geodir_listing_top'] =
228
+		array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
229
+			'geodir_advance_search' => array());
230 230
 
231
-    $widget_option_list['geodir_listing_right_sidebar'] =
232
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
233
-            'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
234
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
231
+	$widget_option_list['geodir_listing_right_sidebar'] =
232
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
233
+			'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
234
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
235 235
 
236 236
 
237
-    /*===========================*/
238
-    /*  Widgets ON SEARCH PAGE     */
239
-    /*===========================*/
237
+	/*===========================*/
238
+	/*  Widgets ON SEARCH PAGE     */
239
+	/*===========================*/
240 240
 
241
-    $widget_option_list['geodir_search_top'] =
242
-        array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
243
-            'geodir_advance_search' => array());
241
+	$widget_option_list['geodir_search_top'] =
242
+		array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
243
+			'geodir_advance_search' => array());
244 244
 
245
-    $widget_option_list['geodir_search_right_sidebar'] =
246
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
247
-            'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
248
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
245
+	$widget_option_list['geodir_search_right_sidebar'] =
246
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
247
+			'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
248
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
249 249
 
250
-    /*===========================*/
251
-    /*  Widgets ON DETAIL/SINGLE PAGE     */
252
-    /*===========================*/
250
+	/*===========================*/
251
+	/*  Widgets ON DETAIL/SINGLE PAGE     */
252
+	/*===========================*/
253 253
 
254
-    $widget_option_list['geodir_detail_sidebar'] =
255
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
256
-            'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
257
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
254
+	$widget_option_list['geodir_detail_sidebar'] =
255
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
256
+			'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
257
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
258 258
 
259 259
 
260
-    /*===========================*/
261
-    /*  Widgets ON AUTHOR PAGE     */
262
-    /*===========================*/
260
+	/*===========================*/
261
+	/*  Widgets ON AUTHOR PAGE     */
262
+	/*===========================*/
263 263
 
264 264
 
265
-    $widget_option_list['geodir_author_right_sidebar'] =
266
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')));
265
+	$widget_option_list['geodir_author_right_sidebar'] =
266
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')));
267 267
 
268 268
 
269
-    $sidebars_widgets = get_option('sidebars_widgets');
269
+	$sidebars_widgets = get_option('sidebars_widgets');
270 270
 
271
-    foreach ($widget_option_list as $key => $widget_options) {
271
+	foreach ($widget_option_list as $key => $widget_options) {
272 272
 
273
-        foreach ($widget_options as $key2 => $widget_options_obj) {
274
-            $widgetid = 'widget_' . $key2;
273
+		foreach ($widget_options as $key2 => $widget_options_obj) {
274
+			$widgetid = 'widget_' . $key2;
275 275
 
276
-            $widgetinfo[$widgetid][] = $widget_options_obj;
276
+			$widgetinfo[$widgetid][] = $widget_options_obj;
277 277
 
278
-            $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid]));
278
+			$sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid]));
279 279
 
280
-            $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj;
280
+			$widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj;
281 281
 
282
-        }
282
+		}
283 283
 
284
-        if (!empty($sidebarvalue_array[$key])) {
284
+		if (!empty($sidebarvalue_array[$key])) {
285 285
 
286
-            $sidebars_widgets = get_option('sidebars_widgets');
287
-            $sidebars_widgets[$key] = $sidebarvalue_array[$key];
288
-            update_option('sidebars_widgets', $sidebars_widgets);
286
+			$sidebars_widgets = get_option('sidebars_widgets');
287
+			$sidebars_widgets[$key] = $sidebarvalue_array[$key];
288
+			update_option('sidebars_widgets', $sidebars_widgets);
289 289
 
290
-            foreach ($widget_update as $key => $value) {
290
+			foreach ($widget_update as $key => $value) {
291 291
 
292
-                update_option($key, $value);
292
+				update_option($key, $value);
293 293
 
294
-            }
294
+			}
295 295
 
296
-        }
296
+		}
297 297
 
298
-    }
298
+	}
299 299
 
300 300
 
301 301
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,11 +271,11 @@
 block discarded – undo
271 271
     foreach ($widget_option_list as $key => $widget_options) {
272 272
 
273 273
         foreach ($widget_options as $key2 => $widget_options_obj) {
274
-            $widgetid = 'widget_' . $key2;
274
+            $widgetid = 'widget_'.$key2;
275 275
 
276 276
             $widgetinfo[$widgetid][] = $widget_options_obj;
277 277
 
278
-            $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid]));
278
+            $sidebarvalue_array[$key][] = $key2."-".(count($widgetinfo[$widgetid]));
279 279
 
280 280
             $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj;
281 281
 
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Jupiter.php 2 patches
Indentation   +141 added lines, -141 removed lines patch added patch discarded remove patch
@@ -16,28 +16,28 @@  discard block
 block discarded – undo
16 16
  */
17 17
 function jupiter_action_calls()
18 18
 {
19
-    // REMOVE BREADCRUMB
20
-    remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);
21
-    remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);
22
-    remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);
23
-    remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);
24
-    remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);
25
-    remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);
26
-
27
-    // REMOVE PAGE TITLES
28
-    remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);
29
-    remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10);
30
-    remove_action('geodir_details_main_content', 'geodir_action_page_title', 20);
31
-    remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
32
-    remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);
33
-
34
-
35
-    // CAHNGE PAGE TITLES
36
-    remove_action('page_title', 'mk_page_title');
37
-    add_action('page_title', 'gd_mk_page_title');
38
-    // CHANGE BREADCRUMS FOR GD PAGES
39
-    remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs');
40
-    add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs');
19
+	// REMOVE BREADCRUMB
20
+	remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);
21
+	remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);
22
+	remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);
23
+	remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);
24
+	remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);
25
+	remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);
26
+
27
+	// REMOVE PAGE TITLES
28
+	remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);
29
+	remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10);
30
+	remove_action('geodir_details_main_content', 'geodir_action_page_title', 20);
31
+	remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
32
+	remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);
33
+
34
+
35
+	// CAHNGE PAGE TITLES
36
+	remove_action('page_title', 'mk_page_title');
37
+	add_action('page_title', 'gd_mk_page_title');
38
+	// CHANGE BREADCRUMS FOR GD PAGES
39
+	remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs');
40
+	add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs');
41 41
 
42 42
 
43 43
 }
@@ -52,19 +52,19 @@  discard block
 block discarded – undo
52 52
 function gd_mk_theme_breadcrumbs()
53 53
 {
54 54
 
55
-    if (is_page_geodir_home() || geodir_is_page('location')) {
56
-        jupiter_geodir_breadcrumb();
57
-    } elseif (geodir_is_page('listing')) {
58
-        jupiter_geodir_breadcrumb();
59
-    } elseif (geodir_is_page('detail')) {
60
-        jupiter_geodir_breadcrumb();
61
-    } elseif (geodir_is_page('search')) {
62
-        jupiter_geodir_breadcrumb();
63
-    } elseif (geodir_is_page('author')) {
64
-        jupiter_geodir_breadcrumb();
65
-    } else {
66
-        mk_theme_breadcrumbs();
67
-    }
55
+	if (is_page_geodir_home() || geodir_is_page('location')) {
56
+		jupiter_geodir_breadcrumb();
57
+	} elseif (geodir_is_page('listing')) {
58
+		jupiter_geodir_breadcrumb();
59
+	} elseif (geodir_is_page('detail')) {
60
+		jupiter_geodir_breadcrumb();
61
+	} elseif (geodir_is_page('search')) {
62
+		jupiter_geodir_breadcrumb();
63
+	} elseif (geodir_is_page('author')) {
64
+		jupiter_geodir_breadcrumb();
65
+	} else {
66
+		mk_theme_breadcrumbs();
67
+	}
68 68
 }
69 69
 
70 70
 /**
@@ -76,35 +76,35 @@  discard block
 block discarded – undo
76 76
  */
77 77
 function gd_mk_page_title()
78 78
 {
79
-    global $wp;
80
-
81
-
82
-    if (is_page_geodir_home() || geodir_is_page('location')) {
83
-        jupiter_geodir_page_title();
84
-    } elseif (geodir_is_page('listing')) {
85
-        ob_start(); // Start buffering;
86
-        geodir_action_listings_title();
87
-        $gd_title = ob_get_clean();
88
-        $title_p = explode('">', $gd_title);
89
-        $title = str_replace('</h1></header>', "", $title_p[2]);
90
-        jupiter_geodir_page_title($title);
91
-    } elseif (geodir_is_page('search')) {
92
-        ob_start(); // Start buffering;
93
-        geodir_action_listings_title();
94
-        $gd_title = ob_get_clean();
95
-        $title_p = explode('">', $gd_title);
96
-        $title = str_replace('</h1></header>', "", $title_p[2]);
97
-        jupiter_geodir_page_title($title);
98
-    } elseif (geodir_is_page('author')) {
99
-        ob_start(); // Start buffering;
100
-        geodir_action_author_page_title();
101
-        $gd_title = ob_get_clean();
102
-        $gd_title = str_replace('<h1>', "", $gd_title);
103
-        $gd_title = str_replace('</h1>', "", $gd_title);
104
-        jupiter_geodir_page_title($gd_title);
105
-    } else {
106
-        mk_page_title();
107
-    }
79
+	global $wp;
80
+
81
+
82
+	if (is_page_geodir_home() || geodir_is_page('location')) {
83
+		jupiter_geodir_page_title();
84
+	} elseif (geodir_is_page('listing')) {
85
+		ob_start(); // Start buffering;
86
+		geodir_action_listings_title();
87
+		$gd_title = ob_get_clean();
88
+		$title_p = explode('">', $gd_title);
89
+		$title = str_replace('</h1></header>', "", $title_p[2]);
90
+		jupiter_geodir_page_title($title);
91
+	} elseif (geodir_is_page('search')) {
92
+		ob_start(); // Start buffering;
93
+		geodir_action_listings_title();
94
+		$gd_title = ob_get_clean();
95
+		$title_p = explode('">', $gd_title);
96
+		$title = str_replace('</h1></header>', "", $title_p[2]);
97
+		jupiter_geodir_page_title($title);
98
+	} elseif (geodir_is_page('author')) {
99
+		ob_start(); // Start buffering;
100
+		geodir_action_author_page_title();
101
+		$gd_title = ob_get_clean();
102
+		$gd_title = str_replace('<h1>', "", $gd_title);
103
+		$gd_title = str_replace('</h1>', "", $gd_title);
104
+		jupiter_geodir_page_title($gd_title);
105
+	} else {
106
+		mk_page_title();
107
+	}
108 108
 
109 109
 
110 110
 }
@@ -119,48 +119,48 @@  discard block
 block discarded – undo
119 119
  */
120 120
 function jupiter_geodir_breadcrumb()
121 121
 {
122
-    $item = '';
123
-    ob_start(); // Start buffering;
124
-    geodir_breadcrumb();
125
-    $gd_crums = ob_get_clean();
126
-    if ($gd_crums) {
127
-        $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums);
128
-        $gd_crums = str_replace('</li></ul></div>', "", $gd_crums);
129
-        $gd_crums = str_replace('&nbsp;>&nbsp;', " > ", $gd_crums);
130
-        $gd_crums = str_replace('</li><li>', "", $gd_crums);
131
-        $gd_crums = explode(" > ", $gd_crums);
132
-        $trail_end = array_pop($gd_crums);
133
-        $gd_crums['trail_end'] = $trail_end;
134
-        //print_r($gd_crums);exit;
135
-        //print_r($trail);
136
-        $item = $gd_crums;
137
-
138
-    }
139
-    if (!$item) {
140
-        return;
141
-    }
142
-    global $mk_options, $post;
143
-    $post_id = global_get_post_id();
144
-
145
-    if ($post_id) {
146
-        $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true);
147
-        $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true);
148
-        if ($local_skining == 'true' && !empty($breadcrumb_skin)) {
149
-            $breadcrumb_skin_class = $breadcrumb_skin;
150
-        } else {
151
-            $breadcrumb_skin_class = $mk_options['breadcrumb_skin'];
152
-        }
153
-    } else {
154
-        $breadcrumb_skin_class = $mk_options['breadcrumb_skin'];
155
-    }
156
-
157
-
158
-    $delimiter = ' &#47; ';
159
-
160
-    echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">';
161
-
162
-    echo implode($delimiter, $item);
163
-    echo "</div></div>";
122
+	$item = '';
123
+	ob_start(); // Start buffering;
124
+	geodir_breadcrumb();
125
+	$gd_crums = ob_get_clean();
126
+	if ($gd_crums) {
127
+		$gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums);
128
+		$gd_crums = str_replace('</li></ul></div>', "", $gd_crums);
129
+		$gd_crums = str_replace('&nbsp;>&nbsp;', " > ", $gd_crums);
130
+		$gd_crums = str_replace('</li><li>', "", $gd_crums);
131
+		$gd_crums = explode(" > ", $gd_crums);
132
+		$trail_end = array_pop($gd_crums);
133
+		$gd_crums['trail_end'] = $trail_end;
134
+		//print_r($gd_crums);exit;
135
+		//print_r($trail);
136
+		$item = $gd_crums;
137
+
138
+	}
139
+	if (!$item) {
140
+		return;
141
+	}
142
+	global $mk_options, $post;
143
+	$post_id = global_get_post_id();
144
+
145
+	if ($post_id) {
146
+		$local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true);
147
+		$breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true);
148
+		if ($local_skining == 'true' && !empty($breadcrumb_skin)) {
149
+			$breadcrumb_skin_class = $breadcrumb_skin;
150
+		} else {
151
+			$breadcrumb_skin_class = $mk_options['breadcrumb_skin'];
152
+		}
153
+	} else {
154
+		$breadcrumb_skin_class = $mk_options['breadcrumb_skin'];
155
+	}
156
+
157
+
158
+	$delimiter = ' &#47; ';
159
+
160
+	echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">';
161
+
162
+	echo implode($delimiter, $item);
163
+	echo "</div></div>";
164 164
 
165 165
 }
166 166
 
@@ -174,41 +174,41 @@  discard block
 block discarded – undo
174 174
  */
175 175
 function jupiter_geodir_page_title($title = '', $subtitle = '')
176 176
 {
177
-    global $mk_options;
178
-
179
-    $post_id = global_get_post_id();
180
-    $shadow_css = '';
181
-    if ($mk_options['page_title_shadow'] == 'true') {
182
-        $shadow_css = 'mk-drop-shadow';
183
-    }
184
-
185
-    $align = !empty($align) ? $align : 'left';
186
-
187
-    //$title = 'xxxx';
188
-    echo '<section id="mk-page-introduce" class="intro-' . $align . '">';
189
-    echo '<div class="mk-grid">';
190
-    if (!empty($title)) {
191
-        echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>';
192
-
193
-    }
194
-
195
-    if (!empty($subtitle)) {
196
-        echo '<div class="page-introduce-subtitle">';
197
-        echo $subtitle;
198
-        echo '</div>';
199
-    }
200
-    if ($mk_options['disable_breadcrumb'] == 'true') {
201
-        if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') {
202
-            /**
203
-             * Calls the theme breadcrumbs for Jupiter theme.
204
-             *
205
-             * @since 1.4.0
206
-             */
207
-            do_action('theme_breadcrumbs', $post_id);
208
-        }
209
-    }
210
-
211
-    echo '<div class="clearboth"></div></div></section>';
177
+	global $mk_options;
178
+
179
+	$post_id = global_get_post_id();
180
+	$shadow_css = '';
181
+	if ($mk_options['page_title_shadow'] == 'true') {
182
+		$shadow_css = 'mk-drop-shadow';
183
+	}
184
+
185
+	$align = !empty($align) ? $align : 'left';
186
+
187
+	//$title = 'xxxx';
188
+	echo '<section id="mk-page-introduce" class="intro-' . $align . '">';
189
+	echo '<div class="mk-grid">';
190
+	if (!empty($title)) {
191
+		echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>';
192
+
193
+	}
194
+
195
+	if (!empty($subtitle)) {
196
+		echo '<div class="page-introduce-subtitle">';
197
+		echo $subtitle;
198
+		echo '</div>';
199
+	}
200
+	if ($mk_options['disable_breadcrumb'] == 'true') {
201
+		if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') {
202
+			/**
203
+			 * Calls the theme breadcrumbs for Jupiter theme.
204
+			 *
205
+			 * @since 1.4.0
206
+			 */
207
+			do_action('theme_breadcrumbs', $post_id);
208
+		}
209
+	}
210
+
211
+	echo '<div class="clearboth"></div></div></section>';
212 212
 
213 213
 
214 214
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     $delimiter = ' &#47; ';
159 159
 
160
-    echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">';
160
+    echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner '.$breadcrumb_skin_class.'-skin">';
161 161
 
162 162
     echo implode($delimiter, $item);
163 163
     echo "</div></div>";
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
     $align = !empty($align) ? $align : 'left';
186 186
 
187 187
     //$title = 'xxxx';
188
-    echo '<section id="mk-page-introduce" class="intro-' . $align . '">';
188
+    echo '<section id="mk-page-introduce" class="intro-'.$align.'">';
189 189
     echo '<div class="mk-grid">';
190 190
     if (!empty($title)) {
191
-        echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>';
191
+        echo '<h1 class="page-introduce-title '.$shadow_css.'">'.$title.'</h1>';
192 192
 
193 193
     }
194 194
 
Please login to merge, or discard this patch.
upgrade.php 2 patches
Indentation   +505 added lines, -505 removed lines patch added patch discarded remove patch
@@ -10,46 +10,46 @@  discard block
 block discarded – undo
10 10
 global $wpdb;
11 11
 
12 12
 if (get_option('geodirectory' . '_db_version') != GEODIRECTORY_VERSION) {
13
-    /**
14
-     * Include custom database table related functions.
15
-     *
16
-     * @since 1.0.0
17
-     * @package GeoDirectory
18
-     */
19
-    include_once('geodirectory-admin/admin_db_install.php');
20
-    add_action('plugins_loaded', 'geodirectory_upgrade_all', 10);
21
-    if (GEODIRECTORY_VERSION <= '1.3.6') {
22
-        add_action('plugins_loaded', 'geodir_upgrade_136', 11);
23
-    }
13
+	/**
14
+	 * Include custom database table related functions.
15
+	 *
16
+	 * @since 1.0.0
17
+	 * @package GeoDirectory
18
+	 */
19
+	include_once('geodirectory-admin/admin_db_install.php');
20
+	add_action('plugins_loaded', 'geodirectory_upgrade_all', 10);
21
+	if (GEODIRECTORY_VERSION <= '1.3.6') {
22
+		add_action('plugins_loaded', 'geodir_upgrade_136', 11);
23
+	}
24 24
 
25
-    if (GEODIRECTORY_VERSION <= '1.4.6') {
26
-        add_action('init', 'geodir_upgrade_146', 11);
27
-    }
25
+	if (GEODIRECTORY_VERSION <= '1.4.6') {
26
+		add_action('init', 'geodir_upgrade_146', 11);
27
+	}
28 28
 
29
-    if (GEODIRECTORY_VERSION <= '1.4.8') {
30
-        add_action('init', 'geodir_upgrade_148', 11);
31
-    }
29
+	if (GEODIRECTORY_VERSION <= '1.4.8') {
30
+		add_action('init', 'geodir_upgrade_148', 11);
31
+	}
32 32
 
33
-    if (GEODIRECTORY_VERSION <= '1.5.0') {
34
-        add_action('init', 'geodir_upgrade_150', 11);
35
-    }
33
+	if (GEODIRECTORY_VERSION <= '1.5.0') {
34
+		add_action('init', 'geodir_upgrade_150', 11);
35
+	}
36 36
 
37
-    if (GEODIRECTORY_VERSION <= '1.5.2') {
38
-        add_action('init', 'geodir_upgrade_152', 11);
39
-    }
37
+	if (GEODIRECTORY_VERSION <= '1.5.2') {
38
+		add_action('init', 'geodir_upgrade_152', 11);
39
+	}
40 40
 
41
-    if (GEODIRECTORY_VERSION <= '1.5.3') {
42
-        add_action('init', 'geodir_upgrade_153', 11);
43
-    }
41
+	if (GEODIRECTORY_VERSION <= '1.5.3') {
42
+		add_action('init', 'geodir_upgrade_153', 11);
43
+	}
44 44
 
45
-    if (GEODIRECTORY_VERSION <= '1.5.4') {
46
-        add_action('init', 'geodir_upgrade_154', 11);
47
-    }
45
+	if (GEODIRECTORY_VERSION <= '1.5.4') {
46
+		add_action('init', 'geodir_upgrade_154', 11);
47
+	}
48 48
 
49 49
 
50
-    add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions
50
+	add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions
51 51
 
52
-    update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION);
52
+	update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION);
53 53
 
54 54
 }
55 55
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
  */
63 63
 function geodirectory_upgrade_all()
64 64
 {
65
-    geodir_create_tables();
66
-    geodir_update_review_db();
67
-    gd_install_theme_compat();
65
+	geodir_create_tables();
66
+	geodir_update_review_db();
67
+	gd_install_theme_compat();
68 68
 }
69 69
 
70 70
 /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
  */
76 76
 function geodir_upgrade_136()
77 77
 {
78
-    geodir_fix_review_overall_rating();
78
+	geodir_fix_review_overall_rating();
79 79
 }
80 80
 
81 81
 /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
  * @package GeoDirectory
86 86
  */
87 87
 function geodir_upgrade_146(){
88
-    gd_convert_virtual_pages();
88
+	gd_convert_virtual_pages();
89 89
 }
90 90
 
91 91
 /**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
  * @package GeoDirectory
96 96
  */
97 97
 function geodir_upgrade_150(){
98
-    gd_fix_cpt_rewrite_slug();
98
+	gd_fix_cpt_rewrite_slug();
99 99
 }
100 100
 
101 101
 
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
  * @package GeoDirectory
108 108
  */
109 109
 function geodir_upgrade_148(){
110
-    /*
110
+	/*
111 111
      * Blank the users google password if present as we now use oAuth 2.0
112 112
      */
113
-    update_option('geodir_ga_pass','');
114
-    update_option('geodir_ga_user','');
113
+	update_option('geodir_ga_pass','');
114
+	update_option('geodir_ga_user','');
115 115
 
116 116
 }
117 117
 
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
  * @package GeoDirectory
124 124
  */
125 125
 function geodir_upgrade_153(){
126
-    geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
127
-    geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
126
+	geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
127
+	geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
128 128
 }
129 129
 
130 130
 /**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
  * @package GeoDirectory
135 135
  */
136 136
 function geodir_upgrade_154(){
137
-    geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
137
+	geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
138 138
 }
139 139
 
140 140
 /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
  * @package GeoDirectory
145 145
  */
146 146
 function geodir_upgrade_152(){
147
-    gd_fix_address_detail_table_limit();
147
+	gd_fix_address_detail_table_limit();
148 148
 }
149 149
 
150 150
 
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
  */
159 159
 function geodir_update_review_db()
160 160
 {
161
-    global $wpdb, $plugin_prefix;
161
+	global $wpdb, $plugin_prefix;
162 162
 
163
-    geodir_fix_review_date();
164
-    geodir_fix_review_post_status();
165
-    geodir_fix_review_content();
166
-    geodir_fix_review_location();
163
+	geodir_fix_review_date();
164
+	geodir_fix_review_post_status();
165
+	geodir_fix_review_content();
166
+	geodir_fix_review_location();
167 167
 
168 168
 }
169 169
 
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
  */
177 177
 function geodir_fix_review_date()
178 178
 {
179
-    global $wpdb;
180
-    $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'");
179
+	global $wpdb;
180
+	$wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'");
181 181
 }
182 182
 
183 183
 /**
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
  */
190 190
 function geodir_fix_review_post_status()
191 191
 {
192
-    global $wpdb;
193
-    $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'");
192
+	global $wpdb;
193
+	$wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'");
194 194
 }
195 195
 
196 196
 /**
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
  */
204 204
 function geodir_fix_review_content()
205 205
 {
206
-    global $wpdb;
207
-    if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) {
208
-        return true;
209
-    } else {
210
-        return false;
211
-    }
206
+	global $wpdb;
207
+	if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) {
208
+		return true;
209
+	} else {
210
+		return false;
211
+	}
212 212
 }
213 213
 
214 214
 /**
@@ -221,20 +221,20 @@  discard block
 block discarded – undo
221 221
  */
222 222
 function geodir_fix_review_location()
223 223
 {
224
-    global $wpdb;
224
+	global $wpdb;
225 225
 
226
-    $all_postypes = geodir_get_posttypes();
226
+	$all_postypes = geodir_get_posttypes();
227 227
 
228
-    if (!empty($all_postypes)) {
229
-        foreach ($all_postypes as $key) {
230
-            // update each GD CTP
228
+	if (!empty($all_postypes)) {
229
+		foreach ($all_postypes as $key) {
230
+			// update each GD CTP
231 231
 
232
-            $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city,  gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL");
232
+			$wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city,  gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL");
233 233
 
234
-        }
235
-        return true;
236
-    }
237
-    return false;
234
+		}
235
+		return true;
236
+	}
237
+	return false;
238 238
 }
239 239
 
240 240
 /**
@@ -246,25 +246,25 @@  discard block
 block discarded – undo
246 246
  */
247 247
 function geodir_fix_review_overall_rating()
248 248
 {
249
-    global $wpdb;
249
+	global $wpdb;
250 250
 
251
-    $all_postypes = geodir_get_posttypes();
251
+	$all_postypes = geodir_get_posttypes();
252 252
 
253
-    if (!empty($all_postypes)) {
254
-        foreach ($all_postypes as $key) {
255
-            // update each GD CTP
256
-            $reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d");
253
+	if (!empty($all_postypes)) {
254
+		foreach ($all_postypes as $key) {
255
+			// update each GD CTP
256
+			$reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d");
257 257
 
258
-            if (!empty($reviews)) {
259
-                foreach ($reviews as $post_id) {
260
-                    geodir_update_postrating($post_id->post_id, $key);
261
-                }
258
+			if (!empty($reviews)) {
259
+				foreach ($reviews as $post_id) {
260
+					geodir_update_postrating($post_id->post_id, $key);
261
+				}
262 262
 
263
-            }
263
+			}
264 264
 
265
-        }
265
+		}
266 266
 
267
-    }
267
+	}
268 268
 }
269 269
 
270 270
 
@@ -281,367 +281,367 @@  discard block
 block discarded – undo
281 281
  */
282 282
 function gd_install_theme_compat()
283 283
 {
284
-    global $wpdb;
284
+	global $wpdb;
285 285
 
286
-    $theme_compat = array();
287
-    $theme_compat = get_option('gd_theme_compats');
286
+	$theme_compat = array();
287
+	$theme_compat = get_option('gd_theme_compats');
288 288
 //GDF
289
-    $theme_compat['GeoDirectory_Framework'] = array(
290
-        'geodir_wrapper_open_id' => 'geodir_wrapper',
291
-        'geodir_wrapper_open_class' => '',
292
-        'geodir_wrapper_open_replace' => '',
293
-        'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->',
294
-        'geodir_wrapper_content_open_id' => 'geodir_content',
295
-        'geodir_wrapper_content_open_class' => '',
296
-        'geodir_wrapper_content_open_replace' => '',
297
-        'geodir_wrapper_content_close_replace' => '',
298
-        'geodir_article_open_id' => '',
299
-        'geodir_article_open_class' => '',
300
-        'geodir_article_open_replace' => '',
301
-        'geodir_article_close_replace' => '',
302
-        'geodir_sidebar_right_open_id' => '',
303
-        'geodir_sidebar_right_open_class' => '',
304
-        'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
305
-        'geodir_sidebar_right_close_replace' => '',
306
-        'geodir_sidebar_left_open_id' => '',
307
-        'geodir_sidebar_left_open_class' => '',
308
-        'geodir_sidebar_left_open_replace' => '<aside  id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
309
-        'geodir_sidebar_left_close_replace' => '',
310
-        'geodir_main_content_open_id' => '',
311
-        'geodir_main_content_open_class' => '',
312
-        'geodir_main_content_open_replace' => '<!-- removed -->',
313
-        'geodir_main_content_close_replace' => '<!-- removed -->',
314
-        'geodir_top_content_add' => '',
315
-        'geodir_before_main_content_add' => '<div class="clearfix geodir-common">',
316
-        'geodir_before_widget_filter' => '',
317
-        'geodir_after_widget_filter' => '',
318
-        'geodir_theme_compat_css' => '',
319
-        'geodir_theme_compat_js' => '',
320
-        'geodir_theme_compat_default_options' => '',
321
-        'geodir_theme_compat_code' => ''
322
-    );
289
+	$theme_compat['GeoDirectory_Framework'] = array(
290
+		'geodir_wrapper_open_id' => 'geodir_wrapper',
291
+		'geodir_wrapper_open_class' => '',
292
+		'geodir_wrapper_open_replace' => '',
293
+		'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->',
294
+		'geodir_wrapper_content_open_id' => 'geodir_content',
295
+		'geodir_wrapper_content_open_class' => '',
296
+		'geodir_wrapper_content_open_replace' => '',
297
+		'geodir_wrapper_content_close_replace' => '',
298
+		'geodir_article_open_id' => '',
299
+		'geodir_article_open_class' => '',
300
+		'geodir_article_open_replace' => '',
301
+		'geodir_article_close_replace' => '',
302
+		'geodir_sidebar_right_open_id' => '',
303
+		'geodir_sidebar_right_open_class' => '',
304
+		'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
305
+		'geodir_sidebar_right_close_replace' => '',
306
+		'geodir_sidebar_left_open_id' => '',
307
+		'geodir_sidebar_left_open_class' => '',
308
+		'geodir_sidebar_left_open_replace' => '<aside  id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
309
+		'geodir_sidebar_left_close_replace' => '',
310
+		'geodir_main_content_open_id' => '',
311
+		'geodir_main_content_open_class' => '',
312
+		'geodir_main_content_open_replace' => '<!-- removed -->',
313
+		'geodir_main_content_close_replace' => '<!-- removed -->',
314
+		'geodir_top_content_add' => '',
315
+		'geodir_before_main_content_add' => '<div class="clearfix geodir-common">',
316
+		'geodir_before_widget_filter' => '',
317
+		'geodir_after_widget_filter' => '',
318
+		'geodir_theme_compat_css' => '',
319
+		'geodir_theme_compat_js' => '',
320
+		'geodir_theme_compat_default_options' => '',
321
+		'geodir_theme_compat_code' => ''
322
+	);
323 323
 
324 324
 //Directory Theme
325
-    $theme_compat['Directory_Starter'] = array(
326
-        'geodir_wrapper_open_id' => 'geodir_wrapper',
327
-        'geodir_wrapper_open_class' => '',
328
-        'geodir_wrapper_open_replace' => '',
329
-        'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->',
330
-        'geodir_wrapper_content_open_id' => 'geodir_content',
331
-        'geodir_wrapper_content_open_class' => '',
332
-        'geodir_wrapper_content_open_replace' => '',
333
-        'geodir_wrapper_content_close_replace' => '',
334
-        'geodir_article_open_id' => '',
335
-        'geodir_article_open_class' => '',
336
-        'geodir_article_open_replace' => '',
337
-        'geodir_article_close_replace' => '',
338
-        'geodir_sidebar_right_open_id' => '',
339
-        'geodir_sidebar_right_open_class' => '',
340
-        'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
341
-        'geodir_sidebar_right_close_replace' => '',
342
-        'geodir_sidebar_left_open_id' => '',
343
-        'geodir_sidebar_left_open_class' => '',
344
-        'geodir_sidebar_left_open_replace' => '<aside  id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
345
-        'geodir_sidebar_left_close_replace' => '',
346
-        'geodir_main_content_open_id' => '',
347
-        'geodir_main_content_open_class' => '',
348
-        'geodir_main_content_open_replace' => '<!-- removed -->',
349
-        'geodir_main_content_close_replace' => '<!-- removed -->',
350
-        'geodir_top_content_add' => '',
351
-        'geodir_before_main_content_add' => '<div class="clearfix geodir-common">',
352
-        'geodir_before_widget_filter' => '',
353
-        'geodir_after_widget_filter' => '',
354
-        'geodir_theme_compat_css' => '',
355
-        'geodir_theme_compat_js' => '',
356
-        'geodir_theme_compat_default_options' => '',
357
-        'geodir_theme_compat_code' => ''
358
-    );
325
+	$theme_compat['Directory_Starter'] = array(
326
+		'geodir_wrapper_open_id' => 'geodir_wrapper',
327
+		'geodir_wrapper_open_class' => '',
328
+		'geodir_wrapper_open_replace' => '',
329
+		'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->',
330
+		'geodir_wrapper_content_open_id' => 'geodir_content',
331
+		'geodir_wrapper_content_open_class' => '',
332
+		'geodir_wrapper_content_open_replace' => '',
333
+		'geodir_wrapper_content_close_replace' => '',
334
+		'geodir_article_open_id' => '',
335
+		'geodir_article_open_class' => '',
336
+		'geodir_article_open_replace' => '',
337
+		'geodir_article_close_replace' => '',
338
+		'geodir_sidebar_right_open_id' => '',
339
+		'geodir_sidebar_right_open_class' => '',
340
+		'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
341
+		'geodir_sidebar_right_close_replace' => '',
342
+		'geodir_sidebar_left_open_id' => '',
343
+		'geodir_sidebar_left_open_class' => '',
344
+		'geodir_sidebar_left_open_replace' => '<aside  id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
345
+		'geodir_sidebar_left_close_replace' => '',
346
+		'geodir_main_content_open_id' => '',
347
+		'geodir_main_content_open_class' => '',
348
+		'geodir_main_content_open_replace' => '<!-- removed -->',
349
+		'geodir_main_content_close_replace' => '<!-- removed -->',
350
+		'geodir_top_content_add' => '',
351
+		'geodir_before_main_content_add' => '<div class="clearfix geodir-common">',
352
+		'geodir_before_widget_filter' => '',
353
+		'geodir_after_widget_filter' => '',
354
+		'geodir_theme_compat_css' => '',
355
+		'geodir_theme_compat_js' => '',
356
+		'geodir_theme_compat_default_options' => '',
357
+		'geodir_theme_compat_code' => ''
358
+	);
359 359
 
360 360
 //Jobby
361
-    $theme_compat['Jobby'] = $theme_compat['Directory_Starter'];
361
+	$theme_compat['Jobby'] = $theme_compat['Directory_Starter'];
362 362
 
363 363
 //GeoProperty
364
-    $theme_compat['GeoProperty'] = $theme_compat['Directory_Starter'];
364
+	$theme_compat['GeoProperty'] = $theme_compat['Directory_Starter'];
365 365
 
366 366
 //Avada
367
-    $theme_compat['Avada'] = array(
368
-        'geodir_wrapper_open_id' => '',
369
-        'geodir_wrapper_open_class' => '',
370
-        'geodir_wrapper_open_replace' => '<!-- removed -->',
371
-        'geodir_wrapper_close_replace' => '<!-- removed -->',
372
-        'geodir_wrapper_content_open_id' => 'content',
373
-        'geodir_wrapper_content_open_class' => '',
374
-        'geodir_wrapper_content_open_replace' => '',
375
-        'geodir_wrapper_content_close_replace' => '',
376
-        'geodir_article_open_id' => '',
377
-        'geodir_article_open_class' => '',
378
-        'geodir_article_open_replace' => '',
379
-        'geodir_article_close_replace' => '',
380
-        'geodir_sidebar_right_open_id' => '',
381
-        'geodir_sidebar_right_open_class' => '',
382
-        'geodir_sidebar_right_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
383
-        'geodir_sidebar_right_close_replace' => '</div><!-- end sidebar -->',
384
-        'geodir_sidebar_left_open_id' => '',
385
-        'geodir_sidebar_left_open_class' => '',
386
-        'geodir_sidebar_left_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
387
-        'geodir_sidebar_left_close_replace' => '</div><!-- end sidebar -->',
388
-        'geodir_main_content_open_id' => '',
389
-        'geodir_main_content_open_class' => '',
390
-        'geodir_main_content_open_replace' => '<!-- removed -->',
391
-        'geodir_main_content_close_replace' => '<!-- removed -->',
392
-        'geodir_top_content_add' => '',
393
-        'geodir_before_main_content_add' => '',
394
-        'geodir_before_widget_filter' => '',
395
-        'geodir_after_widget_filter' => '',
396
-        'geodir_theme_compat_css' => stripslashes('.geodir-sidebar-left{float:left}select,textarea{border-style:solid;border-width:1px}.top-menu li > div{visibility:visible}.geodir-chosen-container-single .chosen-single{height:auto}ul li#menu-item-gd-location-switcher ul{width:222px}ul li#menu-item-gd-location-switcher ul li{padding-right:0!important}#mobile-nav li#mobile-menu-item-gd-location-switcher li a{padding-left:10px;padding-right:10px}#menu-item-gd-location-switcher dd,#mobile-menu-item-gd-location-switcher{margin-left:0}#menu-item-gd-location-switcher dd a{display:block}.geodir-chosen-container .chosen-results li.highlighted{background-color:#eee;background-image:none;color:#444}#mobile-nav li.mobile-nav-item li a:before{content:\'\';margin:0}#mobile-nav li.mobile-nav-item li a{padding:10px;width:auto}.geodir-listing-search{text-align:center}.geodir-search{float:none;margin:0}.geodir-search select,.geodir-search .search_by_post,.geodir-search input[type="text"],.geodir-search button[type="button"], .geodir-search input[type="button"],.geodir-search input[type="submit"]{display:inline-block;float:none}.geodir-cat-list ul li,.map_category ul li{list-style-type:none}.wpgeo-avada .page-title ul li:after{content:\'\'}.top_banner_section{margin-bottom:0}.geodir-category-list-in{margin:0;padding:15px}.geodir_full_page .geodir-cat-list .widget-title{margin-top:0}.geodir_full_page .geodir-cat-list ul li{padding-left:0}.geodir-loc-bar{border:none;margin:0;padding:0}.geodir-loc-bar-in{padding:15px 0}.geodir_full_page section.widget{margin-bottom:20px}.sidebar .geodir-loginbox-list li{margin-bottom:10px;padding-bottom:10px}.sidebar .geodir-loginbox-list li a{display:block}.sidebar .geodir-chosen-container .chosen-results li{margin:0;padding:5px 6px}.sidebar .geodir-chosen-container .chosen-results li.highlighted{background:#eee;background-image:none;color:#000}.sidebar .geodir_category_list_view li.geodir-gridview{display:inline-block;margin-bottom:15px}.wpgeo-avada.double-sidebars #main #sidebar{margin-left:3%}.wpgeo-avada.double-sidebars #main #sidebar-2{margin-left:-100%}.wpgeo-avada.double-sidebars #content{float:left;margin-left:0}.geodir_full_page section.widget{margin-bottom: 0px;} .sidebar .widget .geodir-hide {display: none;}li.fusion-mobile-nav-item .geodir_location_tab_container a:before{content: "" !important; margin-right: auto !important;}li.fusion-mobile-nav-item .geodir_location_tab_container a{padding-left:5px !important;}'),
397
-        'geodir_theme_compat_js' => '',
398
-        'geodir_theme_compat_default_options' => '',
399
-        'geodir_theme_compat_code' => 'Avada'
400
-    );
367
+	$theme_compat['Avada'] = array(
368
+		'geodir_wrapper_open_id' => '',
369
+		'geodir_wrapper_open_class' => '',
370
+		'geodir_wrapper_open_replace' => '<!-- removed -->',
371
+		'geodir_wrapper_close_replace' => '<!-- removed -->',
372
+		'geodir_wrapper_content_open_id' => 'content',
373
+		'geodir_wrapper_content_open_class' => '',
374
+		'geodir_wrapper_content_open_replace' => '',
375
+		'geodir_wrapper_content_close_replace' => '',
376
+		'geodir_article_open_id' => '',
377
+		'geodir_article_open_class' => '',
378
+		'geodir_article_open_replace' => '',
379
+		'geodir_article_close_replace' => '',
380
+		'geodir_sidebar_right_open_id' => '',
381
+		'geodir_sidebar_right_open_class' => '',
382
+		'geodir_sidebar_right_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
383
+		'geodir_sidebar_right_close_replace' => '</div><!-- end sidebar -->',
384
+		'geodir_sidebar_left_open_id' => '',
385
+		'geodir_sidebar_left_open_class' => '',
386
+		'geodir_sidebar_left_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>',
387
+		'geodir_sidebar_left_close_replace' => '</div><!-- end sidebar -->',
388
+		'geodir_main_content_open_id' => '',
389
+		'geodir_main_content_open_class' => '',
390
+		'geodir_main_content_open_replace' => '<!-- removed -->',
391
+		'geodir_main_content_close_replace' => '<!-- removed -->',
392
+		'geodir_top_content_add' => '',
393
+		'geodir_before_main_content_add' => '',
394
+		'geodir_before_widget_filter' => '',
395
+		'geodir_after_widget_filter' => '',
396
+		'geodir_theme_compat_css' => stripslashes('.geodir-sidebar-left{float:left}select,textarea{border-style:solid;border-width:1px}.top-menu li > div{visibility:visible}.geodir-chosen-container-single .chosen-single{height:auto}ul li#menu-item-gd-location-switcher ul{width:222px}ul li#menu-item-gd-location-switcher ul li{padding-right:0!important}#mobile-nav li#mobile-menu-item-gd-location-switcher li a{padding-left:10px;padding-right:10px}#menu-item-gd-location-switcher dd,#mobile-menu-item-gd-location-switcher{margin-left:0}#menu-item-gd-location-switcher dd a{display:block}.geodir-chosen-container .chosen-results li.highlighted{background-color:#eee;background-image:none;color:#444}#mobile-nav li.mobile-nav-item li a:before{content:\'\';margin:0}#mobile-nav li.mobile-nav-item li a{padding:10px;width:auto}.geodir-listing-search{text-align:center}.geodir-search{float:none;margin:0}.geodir-search select,.geodir-search .search_by_post,.geodir-search input[type="text"],.geodir-search button[type="button"], .geodir-search input[type="button"],.geodir-search input[type="submit"]{display:inline-block;float:none}.geodir-cat-list ul li,.map_category ul li{list-style-type:none}.wpgeo-avada .page-title ul li:after{content:\'\'}.top_banner_section{margin-bottom:0}.geodir-category-list-in{margin:0;padding:15px}.geodir_full_page .geodir-cat-list .widget-title{margin-top:0}.geodir_full_page .geodir-cat-list ul li{padding-left:0}.geodir-loc-bar{border:none;margin:0;padding:0}.geodir-loc-bar-in{padding:15px 0}.geodir_full_page section.widget{margin-bottom:20px}.sidebar .geodir-loginbox-list li{margin-bottom:10px;padding-bottom:10px}.sidebar .geodir-loginbox-list li a{display:block}.sidebar .geodir-chosen-container .chosen-results li{margin:0;padding:5px 6px}.sidebar .geodir-chosen-container .chosen-results li.highlighted{background:#eee;background-image:none;color:#000}.sidebar .geodir_category_list_view li.geodir-gridview{display:inline-block;margin-bottom:15px}.wpgeo-avada.double-sidebars #main #sidebar{margin-left:3%}.wpgeo-avada.double-sidebars #main #sidebar-2{margin-left:-100%}.wpgeo-avada.double-sidebars #content{float:left;margin-left:0}.geodir_full_page section.widget{margin-bottom: 0px;} .sidebar .widget .geodir-hide {display: none;}li.fusion-mobile-nav-item .geodir_location_tab_container a:before{content: "" !important; margin-right: auto !important;}li.fusion-mobile-nav-item .geodir_location_tab_container a{padding-left:5px !important;}'),
397
+		'geodir_theme_compat_js' => '',
398
+		'geodir_theme_compat_default_options' => '',
399
+		'geodir_theme_compat_code' => 'Avada'
400
+	);
401 401
 
402 402
 //Enfold
403
-    $theme_compat['Enfold'] = array(
404
-        'geodir_wrapper_open_id' => '',
405
-        'geodir_wrapper_open_class' => '',
406
-        'geodir_wrapper_open_replace' => '',
407
-        'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->',
408
-        'geodir_wrapper_content_open_id' => '',
409
-        'geodir_wrapper_content_open_class' => '',
410
-        'geodir_wrapper_content_open_replace' => '',
411
-        'geodir_wrapper_content_close_replace' => '</div></main>',
412
-        'geodir_article_open_id' => '',
413
-        'geodir_article_open_class' => '',
414
-        'geodir_article_open_replace' => '',
415
-        'geodir_article_close_replace' => '',
416
-        'geodir_sidebar_right_open_id' => '',
417
-        'geodir_sidebar_right_open_class' => '',
418
-        'geodir_sidebar_right_open_replace' => '',
419
-        'geodir_sidebar_right_close_replace' => '</div></aside><!-- sidebar ends here-->',
420
-        'geodir_sidebar_left_open_id' => '',
421
-        'geodir_sidebar_left_open_class' => '',
422
-        'geodir_sidebar_left_open_replace' => '',
423
-        'geodir_sidebar_left_close_replace' => '</div></aside><!-- sidebar ends here-->',
424
-        'geodir_main_content_open_id' => '',
425
-        'geodir_main_content_open_class' => '',
426
-        'geodir_main_content_open_replace' => '',
427
-        'geodir_main_content_close_replace' => '',
428
-        'geodir_top_content_add' => '',
429
-        'geodir_before_main_content_add' => '',
430
-        'geodir_before_widget_filter' => '',
431
-        'geodir_after_widget_filter' => '',
432
-        'geodir_theme_compat_css' => stripslashes('.geodir_full_page .top_banner_section{margin-bottom:0}.widget .geodir-cat-list ul li{clear:none}.wpgeo-enfold .av-main-nav ul{width:222px}.geodir-listing-search .geodir-loc-bar{border-top:none;padding:0}#main .geodir-listing-search,.geodir-listing-search .geodir-loc-bar{margin-bottom:0}#main .geodir-loc-bar-in,#main .geodir-category-list-in{background-color:#fcfcfc;margin:20px 0;padding:20px}#main .geodir_full_page .geodir-loc-bar-in,#main .geodir_full_page .geodir-loc-bar,#main .geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}#main .geodir-loc-bar-in{padding:20px}#main .geodir-search{margin:0;width:100%}#main .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#main .geodir-search input[type="text"]{margin:0 3% 0 0;padding:10px;width:32.4%}#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"]{font-size:inherit;line-height:2.25;margin:0;padding:7px;width:13%}.enfold-home-top section.widget{margin:0;padding:0}.enfold-home-top .top_banner_section{margin-bottom:0}.enfold-home-top .geodir-loc-bar{background:#fcfcfc;border:none;margin:0;padding:0}#main .enfold-home-top .geodir-loc-bar-in{background:none;border:none;margin:0 auto;padding:20px 0}#main .geodir-breadcrumb{border-bottom-style:solid;border-bottom-width:1px}#gd-tabs dt{clear:none}#geodir_slider ul li{list-style-type:none;margin:0;padding:0}#respond{clear:both}#comments .comments-title span{display:inline;font-size:inherit;font-weight:700}#reviewsTab .comments-area .bypostauthor cite span{display:inline}#top #comments .commentlist .comment,#top #comments .commentlist .comment > div{min-height:0}.commentlist .commenttext{padding-top:15px}#comment_imagesdropbox{margin-bottom:20px}.wpgeo-enfold .geodir_category_list_view li{margin-left:0;padding:0}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_category_list_view li .geodir-post-img{display:block}.wpgeo-enfold .geodir_event_listing_calendar tr.title{background:#ccc}@media only screen and (max-width:480px){.geodir_category_list_view li .geodir-content,.geodir_category_list_view li .geodir-post-img,.geodir_category_list_view li .geodir-addinfo{float:none;width:100%;margin:10px 0}#main .geodir-search input[type="text"],#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"],#main .geodir-search select{margin:10px 0;width:100%}}#main .geodir_full_page section:last-child .geodir-loc-bar{margin-bottom: -1px;border-bottom: none;}'),
433
-        'geodir_theme_compat_js' => '',
434
-        'geodir_theme_compat_default_options' => '',
435
-        'geodir_theme_compat_code' => 'Enfold'
436
-    );
403
+	$theme_compat['Enfold'] = array(
404
+		'geodir_wrapper_open_id' => '',
405
+		'geodir_wrapper_open_class' => '',
406
+		'geodir_wrapper_open_replace' => '',
407
+		'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->',
408
+		'geodir_wrapper_content_open_id' => '',
409
+		'geodir_wrapper_content_open_class' => '',
410
+		'geodir_wrapper_content_open_replace' => '',
411
+		'geodir_wrapper_content_close_replace' => '</div></main>',
412
+		'geodir_article_open_id' => '',
413
+		'geodir_article_open_class' => '',
414
+		'geodir_article_open_replace' => '',
415
+		'geodir_article_close_replace' => '',
416
+		'geodir_sidebar_right_open_id' => '',
417
+		'geodir_sidebar_right_open_class' => '',
418
+		'geodir_sidebar_right_open_replace' => '',
419
+		'geodir_sidebar_right_close_replace' => '</div></aside><!-- sidebar ends here-->',
420
+		'geodir_sidebar_left_open_id' => '',
421
+		'geodir_sidebar_left_open_class' => '',
422
+		'geodir_sidebar_left_open_replace' => '',
423
+		'geodir_sidebar_left_close_replace' => '</div></aside><!-- sidebar ends here-->',
424
+		'geodir_main_content_open_id' => '',
425
+		'geodir_main_content_open_class' => '',
426
+		'geodir_main_content_open_replace' => '',
427
+		'geodir_main_content_close_replace' => '',
428
+		'geodir_top_content_add' => '',
429
+		'geodir_before_main_content_add' => '',
430
+		'geodir_before_widget_filter' => '',
431
+		'geodir_after_widget_filter' => '',
432
+		'geodir_theme_compat_css' => stripslashes('.geodir_full_page .top_banner_section{margin-bottom:0}.widget .geodir-cat-list ul li{clear:none}.wpgeo-enfold .av-main-nav ul{width:222px}.geodir-listing-search .geodir-loc-bar{border-top:none;padding:0}#main .geodir-listing-search,.geodir-listing-search .geodir-loc-bar{margin-bottom:0}#main .geodir-loc-bar-in,#main .geodir-category-list-in{background-color:#fcfcfc;margin:20px 0;padding:20px}#main .geodir_full_page .geodir-loc-bar-in,#main .geodir_full_page .geodir-loc-bar,#main .geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}#main .geodir-loc-bar-in{padding:20px}#main .geodir-search{margin:0;width:100%}#main .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#main .geodir-search input[type="text"]{margin:0 3% 0 0;padding:10px;width:32.4%}#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"]{font-size:inherit;line-height:2.25;margin:0;padding:7px;width:13%}.enfold-home-top section.widget{margin:0;padding:0}.enfold-home-top .top_banner_section{margin-bottom:0}.enfold-home-top .geodir-loc-bar{background:#fcfcfc;border:none;margin:0;padding:0}#main .enfold-home-top .geodir-loc-bar-in{background:none;border:none;margin:0 auto;padding:20px 0}#main .geodir-breadcrumb{border-bottom-style:solid;border-bottom-width:1px}#gd-tabs dt{clear:none}#geodir_slider ul li{list-style-type:none;margin:0;padding:0}#respond{clear:both}#comments .comments-title span{display:inline;font-size:inherit;font-weight:700}#reviewsTab .comments-area .bypostauthor cite span{display:inline}#top #comments .commentlist .comment,#top #comments .commentlist .comment > div{min-height:0}.commentlist .commenttext{padding-top:15px}#comment_imagesdropbox{margin-bottom:20px}.wpgeo-enfold .geodir_category_list_view li{margin-left:0;padding:0}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_category_list_view li .geodir-post-img{display:block}.wpgeo-enfold .geodir_event_listing_calendar tr.title{background:#ccc}@media only screen and (max-width:480px){.geodir_category_list_view li .geodir-content,.geodir_category_list_view li .geodir-post-img,.geodir_category_list_view li .geodir-addinfo{float:none;width:100%;margin:10px 0}#main .geodir-search input[type="text"],#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"],#main .geodir-search select{margin:10px 0;width:100%}}#main .geodir_full_page section:last-child .geodir-loc-bar{margin-bottom: -1px;border-bottom: none;}'),
433
+		'geodir_theme_compat_js' => '',
434
+		'geodir_theme_compat_default_options' => '',
435
+		'geodir_theme_compat_code' => 'Enfold'
436
+	);
437 437
 
438 438
 // X
439
-    $theme_compat['X'] = array(
440
-        'geodir_wrapper_open_id' => '',
441
-        'geodir_wrapper_open_class' => '',
442
-        'geodir_wrapper_open_replace' => '',
443
-        'geodir_wrapper_close_replace' => '',
444
-        'geodir_wrapper_content_open_id' => '',
445
-        'geodir_wrapper_content_open_class' => '',
446
-        'geodir_wrapper_content_open_replace' => '',
447
-        'geodir_wrapper_content_close_replace' => '',
448
-        'geodir_article_open_id' => '',
449
-        'geodir_article_open_class' => '',
450
-        'geodir_article_open_replace' => '',
451
-        'geodir_article_close_replace' => '',
452
-        'geodir_sidebar_right_open_id' => '',
453
-        'geodir_sidebar_right_open_class' => '',
454
-        'geodir_sidebar_right_open_replace' => '',
455
-        'geodir_sidebar_right_close_replace' => '',
456
-        'geodir_sidebar_left_open_id' => '',
457
-        'geodir_sidebar_left_open_class' => '',
458
-        'geodir_sidebar_left_open_replace' => '',
459
-        'geodir_sidebar_left_close_replace' => '',
460
-        'geodir_main_content_open_id' => '',
461
-        'geodir_main_content_open_class' => '',
462
-        'geodir_main_content_open_replace' => '',
463
-        'geodir_main_content_close_replace' => '',
464
-        'geodir_top_content_add' => '',
465
-        'geodir_before_main_content_add' => '',
466
-        'geodir_before_widget_filter' => '',
467
-        'geodir_after_widget_filter' => '',
468
-        'geodir_theme_compat_css' => stripslashes('.x-colophon.bottom{clear:both}#geodir-main-content,.geodir_flex-container{margin-top:16px}.geodir-x ul{list-style:none}.widget ul.geodir_category_list_view{border:none}.geodir_category_list_view li.geodir-gridview:last-child{border-bottom:1px solid #e1e1e1}.home .x-header-landmark{display:none}.geodir-x .x-main .geodir_advance_search_widget{margin:0}.geodir-x .top_banner_section{margin-bottom:0}.geodir-loc-bar{background:rgba(0,0,0,0.05);margin:0;padding:0}.geodir-loc-bar-in{background:none;border:none;padding:10px}.geodir-search{margin:0;width:100%}.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{border:1px solid #ccc;box-shadow:none;height:auto;line-height:21px;margin:0 1% 0 0;padding:5px 10px}.widget .geodir-search select,.geodir-search input[type="text"]{width:28%}.geodir-search input[type="submit"],.geodir-search input[type="button"]{line-height:19px;margin-right:0;width:11%}.geodir-search input:hover[type="submit"],.geodir-search input:hover[type="button"]{background:#333;color:#fff}.geodir-cat-list .widget-title{margin-top:0}.geodir-x .geodir-category-list-in{background:rgba(0,0,0,0.05);border:none}.widget .geodir-cat-list ul.geodir-popular-cat-list{border:none;border-radius:0;box-shadow:none}.geodir_full_page .geodir-cat-list ul li{border:none}.geodir_full_page .geodir-cat-list ul li a{border:none}.post-type-archive .geodir-loc-bar{border:none;margin-top:20px}#menu-item-gd-location-switcher dd{margin-left:0}.geodir-chosen-container-single .chosen-single{height:auto}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_full_page section.widget{clear:both}.x-ethos .entry-title{margin-bottom:20px}.x-ethos .geodir-chosen-container-single .chosen-single{padding:0 0 0 8px}.x-ethos .widget ul li a,.x-ethos .geodir_category_list_view li{color:#333}@media only screen and (max-width:767px){.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{margin:0 0 10px;width:100%}}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-loc-bar,.geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-category-list-in{border-bottom:1px solid rgba(0,0,0,0.1)}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'),
469
-        'geodir_theme_compat_js' => '',
470
-        'geodir_theme_compat_default_options' => '',
471
-        'geodir_theme_compat_code' => 'X'
472
-    );
439
+	$theme_compat['X'] = array(
440
+		'geodir_wrapper_open_id' => '',
441
+		'geodir_wrapper_open_class' => '',
442
+		'geodir_wrapper_open_replace' => '',
443
+		'geodir_wrapper_close_replace' => '',
444
+		'geodir_wrapper_content_open_id' => '',
445
+		'geodir_wrapper_content_open_class' => '',
446
+		'geodir_wrapper_content_open_replace' => '',
447
+		'geodir_wrapper_content_close_replace' => '',
448
+		'geodir_article_open_id' => '',
449
+		'geodir_article_open_class' => '',
450
+		'geodir_article_open_replace' => '',
451
+		'geodir_article_close_replace' => '',
452
+		'geodir_sidebar_right_open_id' => '',
453
+		'geodir_sidebar_right_open_class' => '',
454
+		'geodir_sidebar_right_open_replace' => '',
455
+		'geodir_sidebar_right_close_replace' => '',
456
+		'geodir_sidebar_left_open_id' => '',
457
+		'geodir_sidebar_left_open_class' => '',
458
+		'geodir_sidebar_left_open_replace' => '',
459
+		'geodir_sidebar_left_close_replace' => '',
460
+		'geodir_main_content_open_id' => '',
461
+		'geodir_main_content_open_class' => '',
462
+		'geodir_main_content_open_replace' => '',
463
+		'geodir_main_content_close_replace' => '',
464
+		'geodir_top_content_add' => '',
465
+		'geodir_before_main_content_add' => '',
466
+		'geodir_before_widget_filter' => '',
467
+		'geodir_after_widget_filter' => '',
468
+		'geodir_theme_compat_css' => stripslashes('.x-colophon.bottom{clear:both}#geodir-main-content,.geodir_flex-container{margin-top:16px}.geodir-x ul{list-style:none}.widget ul.geodir_category_list_view{border:none}.geodir_category_list_view li.geodir-gridview:last-child{border-bottom:1px solid #e1e1e1}.home .x-header-landmark{display:none}.geodir-x .x-main .geodir_advance_search_widget{margin:0}.geodir-x .top_banner_section{margin-bottom:0}.geodir-loc-bar{background:rgba(0,0,0,0.05);margin:0;padding:0}.geodir-loc-bar-in{background:none;border:none;padding:10px}.geodir-search{margin:0;width:100%}.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{border:1px solid #ccc;box-shadow:none;height:auto;line-height:21px;margin:0 1% 0 0;padding:5px 10px}.widget .geodir-search select,.geodir-search input[type="text"]{width:28%}.geodir-search input[type="submit"],.geodir-search input[type="button"]{line-height:19px;margin-right:0;width:11%}.geodir-search input:hover[type="submit"],.geodir-search input:hover[type="button"]{background:#333;color:#fff}.geodir-cat-list .widget-title{margin-top:0}.geodir-x .geodir-category-list-in{background:rgba(0,0,0,0.05);border:none}.widget .geodir-cat-list ul.geodir-popular-cat-list{border:none;border-radius:0;box-shadow:none}.geodir_full_page .geodir-cat-list ul li{border:none}.geodir_full_page .geodir-cat-list ul li a{border:none}.post-type-archive .geodir-loc-bar{border:none;margin-top:20px}#menu-item-gd-location-switcher dd{margin-left:0}.geodir-chosen-container-single .chosen-single{height:auto}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_full_page section.widget{clear:both}.x-ethos .entry-title{margin-bottom:20px}.x-ethos .geodir-chosen-container-single .chosen-single{padding:0 0 0 8px}.x-ethos .widget ul li a,.x-ethos .geodir_category_list_view li{color:#333}@media only screen and (max-width:767px){.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{margin:0 0 10px;width:100%}}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-loc-bar,.geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-category-list-in{border-bottom:1px solid rgba(0,0,0,0.1)}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'),
469
+		'geodir_theme_compat_js' => '',
470
+		'geodir_theme_compat_default_options' => '',
471
+		'geodir_theme_compat_code' => 'X'
472
+	);
473 473
 
474 474
 // Divi
475
-    $theme_compat['Divi'] = array(
476
-        'geodir_wrapper_open_id' => 'main-content',
477
-        'geodir_wrapper_open_class' => '',
478
-        'geodir_wrapper_open_replace' => '',
479
-        'geodir_wrapper_close_replace' => '',
480
-        'geodir_wrapper_content_open_id' => 'left-area',
481
-        'geodir_wrapper_content_open_class' => '',
482
-        'geodir_wrapper_content_open_replace' => '<div class="container"><div id="content-area" class="clearfix"><div id="[id]" class="[class]" role="main" >',
483
-        'geodir_wrapper_content_close_replace' => '',
484
-        'geodir_article_open_id' => '',
485
-        'geodir_article_open_class' => '',
486
-        'geodir_article_open_replace' => '',
487
-        'geodir_article_close_replace' => '',
488
-        'geodir_sidebar_right_open_id' => 'sidebar',
489
-        'geodir_sidebar_right_open_class' => '',
490
-        'geodir_sidebar_right_open_replace' => '<aside  id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >',
491
-        'geodir_sidebar_right_close_replace' => '</aside><!-- sidebar ends here--></div></div>',
492
-        'geodir_sidebar_left_open_id' => 'sidebar',
493
-        'geodir_sidebar_left_open_class' => '',
494
-        'geodir_sidebar_left_open_replace' => '<aside  id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >',
495
-        'geodir_sidebar_left_close_replace' => '</aside><!-- sidebar ends here--></div></div>',
496
-        'geodir_main_content_open_id' => '',
497
-        'geodir_main_content_open_class' => '',
498
-        'geodir_main_content_open_replace' => '',
499
-        'geodir_main_content_close_replace' => '',
500
-        'geodir_top_content_add' => '',
501
-        'geodir_before_main_content_add' => '',
502
-        'geodir_before_widget_filter' => '',
503
-        'geodir_after_widget_filter' => '',
504
-        'geodir_theme_compat_css' => stripslashes('#left-area ul.geodir-direction-nav{list-style-type:none}#sidebar .geodir-company_info{margin-left:30px}#sidebar .geodir-widget{float:none;margin:0 0 30px 30px}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.archive .entry-header,.geodir-breadcrumb{border-bottom:1px solid #e2e2e2}.archive .entry-header h1,ul#breadcrumbs{margin:0 auto;width:1080px}#left-area ul.geodir_category_list_view{padding:10px 0}.nav li#menu-item-gd-location-switcher ul{width:222px}#menu-item-gd-location-switcher li.gd-location-switcher-menu-item{padding-right:0}#menu-item-gd-location-switcher dd{margin-left:0}#menu-item-gd-location-switcher .geodir_location_tab_container dd a{padding:5px;width:auto}@media only screen and ( max-width: 980px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:690px}}@media only screen and ( max-width: 767px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:400px}}@media only screen and ( max-width: 479px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:280px}}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'),
505
-        'geodir_theme_compat_js' => '',
506
-        'geodir_theme_compat_default_options' => '',
507
-        'geodir_theme_compat_code' => 'Divi'
508
-    );
475
+	$theme_compat['Divi'] = array(
476
+		'geodir_wrapper_open_id' => 'main-content',
477
+		'geodir_wrapper_open_class' => '',
478
+		'geodir_wrapper_open_replace' => '',
479
+		'geodir_wrapper_close_replace' => '',
480
+		'geodir_wrapper_content_open_id' => 'left-area',
481
+		'geodir_wrapper_content_open_class' => '',
482
+		'geodir_wrapper_content_open_replace' => '<div class="container"><div id="content-area" class="clearfix"><div id="[id]" class="[class]" role="main" >',
483
+		'geodir_wrapper_content_close_replace' => '',
484
+		'geodir_article_open_id' => '',
485
+		'geodir_article_open_class' => '',
486
+		'geodir_article_open_replace' => '',
487
+		'geodir_article_close_replace' => '',
488
+		'geodir_sidebar_right_open_id' => 'sidebar',
489
+		'geodir_sidebar_right_open_class' => '',
490
+		'geodir_sidebar_right_open_replace' => '<aside  id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >',
491
+		'geodir_sidebar_right_close_replace' => '</aside><!-- sidebar ends here--></div></div>',
492
+		'geodir_sidebar_left_open_id' => 'sidebar',
493
+		'geodir_sidebar_left_open_class' => '',
494
+		'geodir_sidebar_left_open_replace' => '<aside  id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >',
495
+		'geodir_sidebar_left_close_replace' => '</aside><!-- sidebar ends here--></div></div>',
496
+		'geodir_main_content_open_id' => '',
497
+		'geodir_main_content_open_class' => '',
498
+		'geodir_main_content_open_replace' => '',
499
+		'geodir_main_content_close_replace' => '',
500
+		'geodir_top_content_add' => '',
501
+		'geodir_before_main_content_add' => '',
502
+		'geodir_before_widget_filter' => '',
503
+		'geodir_after_widget_filter' => '',
504
+		'geodir_theme_compat_css' => stripslashes('#left-area ul.geodir-direction-nav{list-style-type:none}#sidebar .geodir-company_info{margin-left:30px}#sidebar .geodir-widget{float:none;margin:0 0 30px 30px}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.archive .entry-header,.geodir-breadcrumb{border-bottom:1px solid #e2e2e2}.archive .entry-header h1,ul#breadcrumbs{margin:0 auto;width:1080px}#left-area ul.geodir_category_list_view{padding:10px 0}.nav li#menu-item-gd-location-switcher ul{width:222px}#menu-item-gd-location-switcher li.gd-location-switcher-menu-item{padding-right:0}#menu-item-gd-location-switcher dd{margin-left:0}#menu-item-gd-location-switcher .geodir_location_tab_container dd a{padding:5px;width:auto}@media only screen and ( max-width: 980px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:690px}}@media only screen and ( max-width: 767px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:400px}}@media only screen and ( max-width: 479px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:280px}}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'),
505
+		'geodir_theme_compat_js' => '',
506
+		'geodir_theme_compat_default_options' => '',
507
+		'geodir_theme_compat_code' => 'Divi'
508
+	);
509 509
 
510 510
 // Genesis
511
-    $theme_compat['Genesis'] = array(
512
-        'geodir_wrapper_open_id' => '',
513
-        'geodir_wrapper_open_class' => 'content-sidebar-wrap',
514
-        'geodir_wrapper_open_replace' => '',
515
-        'geodir_wrapper_close_replace' => '',
516
-        'geodir_wrapper_content_open_id' => '',
517
-        'geodir_wrapper_content_open_class' => 'content',
518
-        'geodir_wrapper_content_open_replace' => '<div class="[class]" role="main" >',
519
-        'geodir_wrapper_content_close_replace' => '',
520
-        'geodir_article_open_id' => '',
521
-        'geodir_article_open_class' => '',
522
-        'geodir_article_open_replace' => '',
523
-        'geodir_article_close_replace' => '',
524
-        'geodir_sidebar_right_open_id' => '',
525
-        'geodir_sidebar_right_open_class' => 'sidebar sidebar-primary widget-area',
526
-        'geodir_sidebar_right_open_replace' => '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">',
527
-        'geodir_sidebar_right_close_replace' => '',
528
-        'geodir_sidebar_left_open_id' => '',
529
-        'geodir_sidebar_left_open_class' => 'sidebar sidebar-secondary widget-area',
530
-        'geodir_sidebar_left_open_replace' => '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">',
531
-        'geodir_sidebar_left_close_replace' => '',
532
-        'geodir_main_content_open_id' => '',
533
-        'geodir_main_content_open_class' => '',
534
-        'geodir_main_content_open_replace' => '<main  id="[id]" class="entry [class]"  role="main">',
535
-        'geodir_main_content_close_replace' => '',
536
-        'geodir_top_content_add' => '',
537
-        'geodir_before_main_content_add' => '',
538
-        'geodir_before_widget_filter' => '',
539
-        'geodir_after_widget_filter' => '',
540
-        'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-gd-location-switcher menu-item-has-children gd-location-switcher',
541
-        'geodir_theme_compat_css' => stripslashes('.full-width-content #geodir-wrapper-content{width:100%}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}.content{float:left}.sidebar-content .content,.sidebar-content #geodir-wrapper-content{float:right}.sidebar .geodir-company_info{background-color:#fff;border:none}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.geodir-breadcrumb-bar{margin-bottom:-35px} .search-page .entry-title,.listings-page .entry-title{font-size: 20px;}.site-inner .geodir-breadcrumb-bar{margin-bottom:0px}'),
542
-        'geodir_theme_compat_js' => '',
543
-        'geodir_theme_compat_default_options' => '',
544
-        'geodir_theme_compat_code' => 'Genesis'
545
-    );
511
+	$theme_compat['Genesis'] = array(
512
+		'geodir_wrapper_open_id' => '',
513
+		'geodir_wrapper_open_class' => 'content-sidebar-wrap',
514
+		'geodir_wrapper_open_replace' => '',
515
+		'geodir_wrapper_close_replace' => '',
516
+		'geodir_wrapper_content_open_id' => '',
517
+		'geodir_wrapper_content_open_class' => 'content',
518
+		'geodir_wrapper_content_open_replace' => '<div class="[class]" role="main" >',
519
+		'geodir_wrapper_content_close_replace' => '',
520
+		'geodir_article_open_id' => '',
521
+		'geodir_article_open_class' => '',
522
+		'geodir_article_open_replace' => '',
523
+		'geodir_article_close_replace' => '',
524
+		'geodir_sidebar_right_open_id' => '',
525
+		'geodir_sidebar_right_open_class' => 'sidebar sidebar-primary widget-area',
526
+		'geodir_sidebar_right_open_replace' => '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">',
527
+		'geodir_sidebar_right_close_replace' => '',
528
+		'geodir_sidebar_left_open_id' => '',
529
+		'geodir_sidebar_left_open_class' => 'sidebar sidebar-secondary widget-area',
530
+		'geodir_sidebar_left_open_replace' => '<aside  id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">',
531
+		'geodir_sidebar_left_close_replace' => '',
532
+		'geodir_main_content_open_id' => '',
533
+		'geodir_main_content_open_class' => '',
534
+		'geodir_main_content_open_replace' => '<main  id="[id]" class="entry [class]"  role="main">',
535
+		'geodir_main_content_close_replace' => '',
536
+		'geodir_top_content_add' => '',
537
+		'geodir_before_main_content_add' => '',
538
+		'geodir_before_widget_filter' => '',
539
+		'geodir_after_widget_filter' => '',
540
+		'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-gd-location-switcher menu-item-has-children gd-location-switcher',
541
+		'geodir_theme_compat_css' => stripslashes('.full-width-content #geodir-wrapper-content{width:100%}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}.content{float:left}.sidebar-content .content,.sidebar-content #geodir-wrapper-content{float:right}.sidebar .geodir-company_info{background-color:#fff;border:none}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.geodir-breadcrumb-bar{margin-bottom:-35px} .search-page .entry-title,.listings-page .entry-title{font-size: 20px;}.site-inner .geodir-breadcrumb-bar{margin-bottom:0px}'),
542
+		'geodir_theme_compat_js' => '',
543
+		'geodir_theme_compat_default_options' => '',
544
+		'geodir_theme_compat_code' => 'Genesis'
545
+	);
546 546
 
547 547
 // Jupiter
548
-    $theme_compat['Jupiter'] = array(
549
-        'geodir_wrapper_open_id' => '',
550
-        'geodir_wrapper_open_class' => '',
551
-        'geodir_wrapper_open_replace' => '<div id="theme-page"><div class="mk-main-wrapper-holder"><div  class="theme-page-wrapper mk-main-wrapper  mk-grid vc_row-fluid">',
552
-        'geodir_wrapper_close_replace' => '</div></div></div>',
553
-        'geodir_wrapper_content_open_id' => '',
554
-        'geodir_wrapper_content_open_class' => '',
555
-        'geodir_wrapper_content_open_replace' => '',
556
-        'geodir_wrapper_content_close_replace' => '',
557
-        'geodir_article_open_id' => '',
558
-        'geodir_article_open_class' => '',
559
-        'geodir_article_open_replace' => '',
560
-        'geodir_article_close_replace' => '',
561
-        'geodir_sidebar_right_open_id' => 'mk-sidebar',
562
-        'geodir_sidebar_right_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right',
563
-        'geodir_sidebar_right_open_replace' => '',
564
-        'geodir_sidebar_right_close_replace' => '',
565
-        'geodir_sidebar_left_open_id' => 'mk-sidebar',
566
-        'geodir_sidebar_left_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right',
567
-        'geodir_sidebar_left_open_replace' => '',
568
-        'geodir_sidebar_left_close_replace' => '',
569
-        'geodir_main_content_open_id' => '',
570
-        'geodir_main_content_open_class' => '',
571
-        'geodir_main_content_open_replace' => '',
572
-        'geodir_main_content_close_replace' => '',
573
-        'geodir_top_content_add' => '',
574
-        'geodir_before_main_content_add' => '',
575
-        'geodir_before_widget_filter' => '',
576
-        'geodir_after_widget_filter' => '',
577
-        'geodir_before_title_filter' => '<h3 class="widgettitle geodir-widget-title">',
578
-        'geodir_after_title_filter' => '',
579
-        'geodir_menu_li_class_filter' => 'menu-item menu-item-has-children no-mega-menu',
580
-        'geodir_sub_menu_ul_class_filter' => '',
581
-        'geodir_sub_menu_li_class_filter' => '',
582
-        'geodir_menu_a_class_filter' => 'menu-item-link',
583
-        'geodir_sub_menu_a_class_filter' => 'menu-item-link one-page-nav-item',
584
-        'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-type-social menu-item-type-social gd-location-switcher menu-item-has-children no-mega-menu',
585
-        'geodir_location_switcher_menu_a_class_filter' => 'menu-item-link',
586
-        'geodir_location_switcher_menu_sub_ul_class_filter' => '',
587
-        'geodir_location_switcher_menu_sub_li_class_filter' => '',
588
-        'geodir_theme_compat_css' => stripslashes('.geodir-widget li,.geodir_category_list_view li{margin:0}#theme-page h3.geodir-entry-title{font-size:14px}#menu-item-gd-location-switcher dd{line-height:44px}#menu-item-gd-location-switcher .geodir_location_sugestion{line-height:20px}.geodir_loginbox{overflow:visible}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'),
589
-        'geodir_theme_compat_js' => '',
590
-        'geodir_theme_compat_default_options' => '',
591
-        'geodir_theme_compat_code' => 'Jupiter'
592
-    );
548
+	$theme_compat['Jupiter'] = array(
549
+		'geodir_wrapper_open_id' => '',
550
+		'geodir_wrapper_open_class' => '',
551
+		'geodir_wrapper_open_replace' => '<div id="theme-page"><div class="mk-main-wrapper-holder"><div  class="theme-page-wrapper mk-main-wrapper  mk-grid vc_row-fluid">',
552
+		'geodir_wrapper_close_replace' => '</div></div></div>',
553
+		'geodir_wrapper_content_open_id' => '',
554
+		'geodir_wrapper_content_open_class' => '',
555
+		'geodir_wrapper_content_open_replace' => '',
556
+		'geodir_wrapper_content_close_replace' => '',
557
+		'geodir_article_open_id' => '',
558
+		'geodir_article_open_class' => '',
559
+		'geodir_article_open_replace' => '',
560
+		'geodir_article_close_replace' => '',
561
+		'geodir_sidebar_right_open_id' => 'mk-sidebar',
562
+		'geodir_sidebar_right_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right',
563
+		'geodir_sidebar_right_open_replace' => '',
564
+		'geodir_sidebar_right_close_replace' => '',
565
+		'geodir_sidebar_left_open_id' => 'mk-sidebar',
566
+		'geodir_sidebar_left_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right',
567
+		'geodir_sidebar_left_open_replace' => '',
568
+		'geodir_sidebar_left_close_replace' => '',
569
+		'geodir_main_content_open_id' => '',
570
+		'geodir_main_content_open_class' => '',
571
+		'geodir_main_content_open_replace' => '',
572
+		'geodir_main_content_close_replace' => '',
573
+		'geodir_top_content_add' => '',
574
+		'geodir_before_main_content_add' => '',
575
+		'geodir_before_widget_filter' => '',
576
+		'geodir_after_widget_filter' => '',
577
+		'geodir_before_title_filter' => '<h3 class="widgettitle geodir-widget-title">',
578
+		'geodir_after_title_filter' => '',
579
+		'geodir_menu_li_class_filter' => 'menu-item menu-item-has-children no-mega-menu',
580
+		'geodir_sub_menu_ul_class_filter' => '',
581
+		'geodir_sub_menu_li_class_filter' => '',
582
+		'geodir_menu_a_class_filter' => 'menu-item-link',
583
+		'geodir_sub_menu_a_class_filter' => 'menu-item-link one-page-nav-item',
584
+		'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-type-social menu-item-type-social gd-location-switcher menu-item-has-children no-mega-menu',
585
+		'geodir_location_switcher_menu_a_class_filter' => 'menu-item-link',
586
+		'geodir_location_switcher_menu_sub_ul_class_filter' => '',
587
+		'geodir_location_switcher_menu_sub_li_class_filter' => '',
588
+		'geodir_theme_compat_css' => stripslashes('.geodir-widget li,.geodir_category_list_view li{margin:0}#theme-page h3.geodir-entry-title{font-size:14px}#menu-item-gd-location-switcher dd{line-height:44px}#menu-item-gd-location-switcher .geodir_location_sugestion{line-height:20px}.geodir_loginbox{overflow:visible}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'),
589
+		'geodir_theme_compat_js' => '',
590
+		'geodir_theme_compat_default_options' => '',
591
+		'geodir_theme_compat_code' => 'Jupiter'
592
+	);
593 593
 
594 594
 // Multi News
595
-    $theme_compat['Multi_News'] = array(
596
-        'geodir_wrapper_open_id' => '',
597
-        'geodir_wrapper_open_class' => 'main-container clearfix',
598
-        'geodir_wrapper_open_replace' => '',
599
-        'geodir_wrapper_close_replace' => '',
600
-        'geodir_wrapper_content_open_id' => '',
601
-        'geodir_wrapper_content_open_class' => '',
602
-        'geodir_wrapper_content_open_replace' => '<div class="main-left" ><div class="main-content  "><div class="site-content page-wrap">',
603
-        'geodir_wrapper_content_close_replace' => '</div></div></div>',
604
-        'geodir_article_open_id' => '',
605
-        'geodir_article_open_class' => '',
606
-        'geodir_article_open_replace' => '',
607
-        'geodir_article_close_replace' => '',
608
-        'geodir_sidebar_right_open_id' => '',
609
-        'geodir_sidebar_right_open_class' => '',
610
-        'geodir_sidebar_right_open_replace' => '<aside  class="sidebar" role="complementary" itemscope itemtype="[itemtype]" >',
611
-        'geodir_sidebar_right_close_replace' => '',
612
-        'geodir_sidebar_left_open_id' => '',
613
-        'geodir_sidebar_left_open_class' => '',
614
-        'geodir_sidebar_left_open_replace' => '<aside  class="secondary-sidebar" role="complementary" itemscope itemtype="[itemtype]" >',
615
-        'geodir_sidebar_left_close_replace' => '',
616
-        'geodir_main_content_open_id' => '',
617
-        'geodir_main_content_open_class' => '',
618
-        'geodir_main_content_open_replace' => '<div class="site-content page-wrap">',
619
-        'geodir_main_content_close_replace' => '</div>',
620
-        'geodir_top_content_add' => '',
621
-        'geodir_before_main_content_add' => '',
622
-        'geodir_full_page_class_filter' => 'section full-width-section',
623
-        'geodir_before_widget_filter' => '',
624
-        'geodir_after_widget_filter' => '',
625
-        'geodir_before_title_filter' => '<div class="widget-title"><h2>',
626
-        'geodir_after_title_filter' => '</h2></div>',
627
-        'geodir_menu_li_class_filter' => '',
628
-        'geodir_sub_menu_ul_class_filter' => '',
629
-        'geodir_sub_menu_li_class_filter' => '',
630
-        'geodir_menu_a_class_filter' => '',
631
-        'geodir_sub_menu_a_class_filter' => '',
632
-        'geodir_location_switcher_menu_li_class_filter' => '',
633
-        'geodir_location_switcher_menu_a_class_filter' => '',
634
-        'geodir_location_switcher_menu_sub_ul_class_filter' => '',
635
-        'geodir_location_switcher_menu_sub_li_class_filter' => '',
636
-        'geodir_theme_compat_css' => stripslashes('.full-width-section .geodir-search{margin:0;width:100%}.geodir_full_page .geodir-search{margin:0 auto;float:none}.geodir-search input[type=button],.geodir-search input[type=submit]{width:13%}.geodir-search input[type=text]{border:1px solid #ddd;border-radius:0;padding:0 8px}.geodir-category-list-in,.geodir-loc-bar-in{background:#f2f2f2;border-color:#dbdbdb}.geodir-category-list-in{margin-top:0}.geodir-cat-list .widget-title h2{margin:-13px -13px 13px}.widget .geodir-cat-list ul li.geodir-pcat-show a:before{display:none!important}.widget .geodir-cat-list ul li.geodir-pcat-show i{margin-right:5px}.container .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#geodir_carousel,#geodir_slider{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;margin-bottom:20px!important;border:1px solid #e1e1e1;box-shadow:none}#geodir_carousel{padding:10px}.geodir-tabs-content ol.commentlist{margin:40px 0;padding:0}li#post_mapTab{min-height:400px}#reviewsTab ol.commentlist li{border-bottom:none}#reviewsTab ol.commentlist li article.comment{border-bottom:1px solid #e1e1e1;padding-bottom:10px}.comment-content .rating{display:none}.comment-respond .gd_rating{margin-bottom:20px}div.geodir-rating{width:85px!important}.comment-respond .comment-notes{margin-bottom:10px}.average-review span,.comment-form label,.dtreviewed,.geodir-details-sidebar-user-links a,.geodir-viewall,.geodir_more_info span,.reviewer,dl.geodir-tab-head dd a{font-family:"Archivo Narrow",sans-serif}section.comment-content{margin:0 0 0 12%}#reviewsTab .comments-area .comment-content{width:auto}section.comment-content .description,section.comment-content p{margin:15px 0}dl.geodir-tab-head dd a{background:#f3f3f3;margin-top:-1px;font-size:14px;padding:0 15px}dl.geodir-tab-head dd.geodir-tab-active a{padding-bottom:1px}.geodir-widget .geodir_list_heading,.geodir-widget h3.widget-title{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px;color:#2d2d2d}.geodir-widget .geodir_list_heading h3{background:0 0;border:none}.geodir-widget .geodir_list_heading{margin:-13px -14px 13px}.geodir-map-listing-page{border-width:1px 0 0;border-style:solid;border-color:#dbdbdb}.geodir-sidebar-wrap .geodir-company_info{margin:15px}.geodir-details-sidebar-social-sharing iframe{float:left}.geodir-details-sidebar-rating{overflow:hidden}.geodir-details-sidebar-rating .gd_rating_show,.geodir-details-sidebar-rating .geodir-rating{float:left;margin-right:15px}.geodir-details-sidebar-rating span.item{float:left;margin-top:5px}.geodir-details-sidebar-rating .average-review{top:-4px;position:relative}.geodir-details-sidebar-rating span.item img{margin-top:5px}.geodir_full_page{background:#fff;border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 0 #e5e5e5;box-shadow:0 1px 0 #e5e5e5;padding:15px;margin-bottom:20px;clear:both}.geodir_map_container .main_list img{margin:0 5px}.geodir_category_list_view li.geodir-gridview .geodir-post-img .geodir_thumbnail{margin-bottom:10px}.geodir-addinfo .geodir-pinpoint,.geodir-addinfo a i{margin-right:5px}.geodir_category_list_view li.geodir-gridview h3{font-size:18px;margin-bottom:10px}#related_listingTab ul.geodir_category_list_view{padding:0!important}#reviewsTab #comments .gd_rating{margin-top:5px}.widget .geodir_category_list_view li .geodir-entry-content,.widget .geodir_category_list_view li a:before{display:none!important}.geodir_category_list_view li .geodir-entry-title{margin-bottom:10px}.widget ul.geodir_category_list_view{padding:15px}.sidebar .widget .geodir_category_list_view li{width:calc(100% - 25px)}.widget .geodir-loginbox-list li{overflow:visible!important}.widget ul.chosen-results{margin:0!important}.main_list_selecter{margin-right:5px}.geodir-viewall{float:right;width:auto!important}.widget-title h2{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px}.widget:first-child .geodir_list_heading .widget-title{margin-top:0}.geodir_list_heading .widget-title{float:left;width:80%;margin-top:0}.geodir_list_heading .widget-title h2{padding:0 px;background:0 0;border:none;height:auto;line-height:auto}.chosen-default:before{content:none;display:none;position:absolute;margin-left:-1000000px;float:left}#geodir-wrapper .entry-crumbs{margin-bottom:20px}.geodir-search .mom-select{float:left;width:150px;margin:5px;border:1px solid #ddd;height:40px}.iprelative .gm-style .gm-style-iw{width:100%!important}'),
637
-        'geodir_theme_compat_js' => 'jQuery(document).ready(function(e){e(".geodir_full_page").length&&""===e.trim(e(".geodir_full_page").html())&&e(".geodir_full_page").css({display:"none"})});',
638
-        'geodir_theme_compat_default_options' => '',
639
-        'geodir_theme_compat_code' => 'Multi_News'
640
-    );
641
-
642
-    update_option('gd_theme_compats', $theme_compat);
643
-
644
-    gd_set_theme_compat();// set the compat pack if avail
595
+	$theme_compat['Multi_News'] = array(
596
+		'geodir_wrapper_open_id' => '',
597
+		'geodir_wrapper_open_class' => 'main-container clearfix',
598
+		'geodir_wrapper_open_replace' => '',
599
+		'geodir_wrapper_close_replace' => '',
600
+		'geodir_wrapper_content_open_id' => '',
601
+		'geodir_wrapper_content_open_class' => '',
602
+		'geodir_wrapper_content_open_replace' => '<div class="main-left" ><div class="main-content  "><div class="site-content page-wrap">',
603
+		'geodir_wrapper_content_close_replace' => '</div></div></div>',
604
+		'geodir_article_open_id' => '',
605
+		'geodir_article_open_class' => '',
606
+		'geodir_article_open_replace' => '',
607
+		'geodir_article_close_replace' => '',
608
+		'geodir_sidebar_right_open_id' => '',
609
+		'geodir_sidebar_right_open_class' => '',
610
+		'geodir_sidebar_right_open_replace' => '<aside  class="sidebar" role="complementary" itemscope itemtype="[itemtype]" >',
611
+		'geodir_sidebar_right_close_replace' => '',
612
+		'geodir_sidebar_left_open_id' => '',
613
+		'geodir_sidebar_left_open_class' => '',
614
+		'geodir_sidebar_left_open_replace' => '<aside  class="secondary-sidebar" role="complementary" itemscope itemtype="[itemtype]" >',
615
+		'geodir_sidebar_left_close_replace' => '',
616
+		'geodir_main_content_open_id' => '',
617
+		'geodir_main_content_open_class' => '',
618
+		'geodir_main_content_open_replace' => '<div class="site-content page-wrap">',
619
+		'geodir_main_content_close_replace' => '</div>',
620
+		'geodir_top_content_add' => '',
621
+		'geodir_before_main_content_add' => '',
622
+		'geodir_full_page_class_filter' => 'section full-width-section',
623
+		'geodir_before_widget_filter' => '',
624
+		'geodir_after_widget_filter' => '',
625
+		'geodir_before_title_filter' => '<div class="widget-title"><h2>',
626
+		'geodir_after_title_filter' => '</h2></div>',
627
+		'geodir_menu_li_class_filter' => '',
628
+		'geodir_sub_menu_ul_class_filter' => '',
629
+		'geodir_sub_menu_li_class_filter' => '',
630
+		'geodir_menu_a_class_filter' => '',
631
+		'geodir_sub_menu_a_class_filter' => '',
632
+		'geodir_location_switcher_menu_li_class_filter' => '',
633
+		'geodir_location_switcher_menu_a_class_filter' => '',
634
+		'geodir_location_switcher_menu_sub_ul_class_filter' => '',
635
+		'geodir_location_switcher_menu_sub_li_class_filter' => '',
636
+		'geodir_theme_compat_css' => stripslashes('.full-width-section .geodir-search{margin:0;width:100%}.geodir_full_page .geodir-search{margin:0 auto;float:none}.geodir-search input[type=button],.geodir-search input[type=submit]{width:13%}.geodir-search input[type=text]{border:1px solid #ddd;border-radius:0;padding:0 8px}.geodir-category-list-in,.geodir-loc-bar-in{background:#f2f2f2;border-color:#dbdbdb}.geodir-category-list-in{margin-top:0}.geodir-cat-list .widget-title h2{margin:-13px -13px 13px}.widget .geodir-cat-list ul li.geodir-pcat-show a:before{display:none!important}.widget .geodir-cat-list ul li.geodir-pcat-show i{margin-right:5px}.container .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#geodir_carousel,#geodir_slider{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;margin-bottom:20px!important;border:1px solid #e1e1e1;box-shadow:none}#geodir_carousel{padding:10px}.geodir-tabs-content ol.commentlist{margin:40px 0;padding:0}li#post_mapTab{min-height:400px}#reviewsTab ol.commentlist li{border-bottom:none}#reviewsTab ol.commentlist li article.comment{border-bottom:1px solid #e1e1e1;padding-bottom:10px}.comment-content .rating{display:none}.comment-respond .gd_rating{margin-bottom:20px}div.geodir-rating{width:85px!important}.comment-respond .comment-notes{margin-bottom:10px}.average-review span,.comment-form label,.dtreviewed,.geodir-details-sidebar-user-links a,.geodir-viewall,.geodir_more_info span,.reviewer,dl.geodir-tab-head dd a{font-family:"Archivo Narrow",sans-serif}section.comment-content{margin:0 0 0 12%}#reviewsTab .comments-area .comment-content{width:auto}section.comment-content .description,section.comment-content p{margin:15px 0}dl.geodir-tab-head dd a{background:#f3f3f3;margin-top:-1px;font-size:14px;padding:0 15px}dl.geodir-tab-head dd.geodir-tab-active a{padding-bottom:1px}.geodir-widget .geodir_list_heading,.geodir-widget h3.widget-title{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px;color:#2d2d2d}.geodir-widget .geodir_list_heading h3{background:0 0;border:none}.geodir-widget .geodir_list_heading{margin:-13px -14px 13px}.geodir-map-listing-page{border-width:1px 0 0;border-style:solid;border-color:#dbdbdb}.geodir-sidebar-wrap .geodir-company_info{margin:15px}.geodir-details-sidebar-social-sharing iframe{float:left}.geodir-details-sidebar-rating{overflow:hidden}.geodir-details-sidebar-rating .gd_rating_show,.geodir-details-sidebar-rating .geodir-rating{float:left;margin-right:15px}.geodir-details-sidebar-rating span.item{float:left;margin-top:5px}.geodir-details-sidebar-rating .average-review{top:-4px;position:relative}.geodir-details-sidebar-rating span.item img{margin-top:5px}.geodir_full_page{background:#fff;border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 0 #e5e5e5;box-shadow:0 1px 0 #e5e5e5;padding:15px;margin-bottom:20px;clear:both}.geodir_map_container .main_list img{margin:0 5px}.geodir_category_list_view li.geodir-gridview .geodir-post-img .geodir_thumbnail{margin-bottom:10px}.geodir-addinfo .geodir-pinpoint,.geodir-addinfo a i{margin-right:5px}.geodir_category_list_view li.geodir-gridview h3{font-size:18px;margin-bottom:10px}#related_listingTab ul.geodir_category_list_view{padding:0!important}#reviewsTab #comments .gd_rating{margin-top:5px}.widget .geodir_category_list_view li .geodir-entry-content,.widget .geodir_category_list_view li a:before{display:none!important}.geodir_category_list_view li .geodir-entry-title{margin-bottom:10px}.widget ul.geodir_category_list_view{padding:15px}.sidebar .widget .geodir_category_list_view li{width:calc(100% - 25px)}.widget .geodir-loginbox-list li{overflow:visible!important}.widget ul.chosen-results{margin:0!important}.main_list_selecter{margin-right:5px}.geodir-viewall{float:right;width:auto!important}.widget-title h2{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px}.widget:first-child .geodir_list_heading .widget-title{margin-top:0}.geodir_list_heading .widget-title{float:left;width:80%;margin-top:0}.geodir_list_heading .widget-title h2{padding:0 px;background:0 0;border:none;height:auto;line-height:auto}.chosen-default:before{content:none;display:none;position:absolute;margin-left:-1000000px;float:left}#geodir-wrapper .entry-crumbs{margin-bottom:20px}.geodir-search .mom-select{float:left;width:150px;margin:5px;border:1px solid #ddd;height:40px}.iprelative .gm-style .gm-style-iw{width:100%!important}'),
637
+		'geodir_theme_compat_js' => 'jQuery(document).ready(function(e){e(".geodir_full_page").length&&""===e.trim(e(".geodir_full_page").html())&&e(".geodir_full_page").css({display:"none"})});',
638
+		'geodir_theme_compat_default_options' => '',
639
+		'geodir_theme_compat_code' => 'Multi_News'
640
+	);
641
+
642
+	update_option('gd_theme_compats', $theme_compat);
643
+
644
+	gd_set_theme_compat();// set the compat pack if avail
645 645
 }
646 646
 
647 647
 
@@ -653,61 +653,61 @@  discard block
 block discarded – undo
653 653
  * @global object $wpdb WordPress Database object.
654 654
  */
655 655
 function gd_convert_virtual_pages(){
656
-    global $wpdb;
657
-
658
-    // Update the add listing page settings
659
-    $add_listing_page = $wpdb->get_var(
660
-        $wpdb->prepare(
661
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
662
-            array('add-listing')
663
-        )
664
-    );
665
-
666
-    if($add_listing_page){
667
-        wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') );
668
-        update_option( 'geodir_add_listing_page', $add_listing_page);
669
-    }
670
-
671
-    // Update the listing preview page settings
672
-    $listing_preview_page = $wpdb->get_var(
673
-        $wpdb->prepare(
674
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
675
-            array('listing-preview')
676
-        )
677
-    );
678
-
679
-    if($listing_preview_page){
680
-        wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') );
681
-        update_option( 'geodir_preview_page', $listing_preview_page);
682
-    }
683
-
684
-    // Update the listing success page settings
685
-    $listing_success_page = $wpdb->get_var(
686
-        $wpdb->prepare(
687
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
688
-            array('listing-success')
689
-        )
690
-    );
691
-
692
-    if($listing_success_page){
693
-        wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') );
694
-        update_option( 'geodir_success_page', $listing_success_page);
695
-    }
696
-
697
-    // Update the listing success page settings
698
-    $location_page = $wpdb->get_var(
699
-        $wpdb->prepare(
700
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
701
-            array('location')
702
-        )
703
-    );
704
-
705
-    if($location_page){
706
-        $location_slug = get_option('geodir_location_prefix');
707
-        if(!$location_slug ){$location_slug  = 'location';}
708
-        wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) );
709
-        update_option( 'geodir_location_page', $location_page);
710
-    }
656
+	global $wpdb;
657
+
658
+	// Update the add listing page settings
659
+	$add_listing_page = $wpdb->get_var(
660
+		$wpdb->prepare(
661
+			"SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
662
+			array('add-listing')
663
+		)
664
+	);
665
+
666
+	if($add_listing_page){
667
+		wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') );
668
+		update_option( 'geodir_add_listing_page', $add_listing_page);
669
+	}
670
+
671
+	// Update the listing preview page settings
672
+	$listing_preview_page = $wpdb->get_var(
673
+		$wpdb->prepare(
674
+			"SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
675
+			array('listing-preview')
676
+		)
677
+	);
678
+
679
+	if($listing_preview_page){
680
+		wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') );
681
+		update_option( 'geodir_preview_page', $listing_preview_page);
682
+	}
683
+
684
+	// Update the listing success page settings
685
+	$listing_success_page = $wpdb->get_var(
686
+		$wpdb->prepare(
687
+			"SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
688
+			array('listing-success')
689
+		)
690
+	);
691
+
692
+	if($listing_success_page){
693
+		wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') );
694
+		update_option( 'geodir_success_page', $listing_success_page);
695
+	}
696
+
697
+	// Update the listing success page settings
698
+	$location_page = $wpdb->get_var(
699
+		$wpdb->prepare(
700
+			"SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
701
+			array('location')
702
+		)
703
+	);
704
+
705
+	if($location_page){
706
+		$location_slug = get_option('geodir_location_prefix');
707
+		if(!$location_slug ){$location_slug  = 'location';}
708
+		wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) );
709
+		update_option( 'geodir_location_page', $location_page);
710
+	}
711 711
 
712 712
 }
713 713
 
@@ -721,31 +721,31 @@  discard block
 block discarded – undo
721 721
 function gd_fix_cpt_rewrite_slug()
722 722
 {
723 723
 
724
-    $alt_post_types = array();
725
-    $post_types = get_option('geodir_post_types');
724
+	$alt_post_types = array();
725
+	$post_types = get_option('geodir_post_types');
726 726
 
727 727
 
728
-    if (is_array($post_types)){
728
+	if (is_array($post_types)){
729 729
 
730
-        foreach ($post_types as $post_type => $args) {
730
+		foreach ($post_types as $post_type => $args) {
731 731
 
732 732
 
733
-            if(isset($args['rewrite']['slug'])){
734
-                $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']);
735
-            }
733
+			if(isset($args['rewrite']['slug'])){
734
+				$args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']);
735
+			}
736 736
 
737
-                $alt_post_types[$post_type] = $args;
737
+				$alt_post_types[$post_type] = $args;
738 738
 
739
-        }
740
-    }
739
+		}
740
+	}
741 741
 
742
-    if(!empty($alt_post_types)) {
743
-        update_option('geodir_post_types',$alt_post_types);
744
-        }
742
+	if(!empty($alt_post_types)) {
743
+		update_option('geodir_post_types',$alt_post_types);
744
+		}
745 745
 
746 746
 
747
-    // flush the rewrite rules
748
-    flush_rewrite_rules();
747
+	// flush the rewrite rules
748
+	flush_rewrite_rules();
749 749
 }
750 750
 
751 751
 
@@ -758,18 +758,18 @@  discard block
 block discarded – undo
758 758
  */
759 759
 function gd_fix_address_detail_table_limit()
760 760
 {
761
-    global $wpdb;
762
-
763
-    $all_postypes = geodir_get_posttypes();
764
-
765
-    if (!empty($all_postypes)) {
766
-        foreach ($all_postypes as $key) {
767
-            // update each GD CTP
768
-            try {
769
-                $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL");
770
-            } catch(Exception $e) {
771
-                error_log( 'Error: ' . $e->getMessage() );
772
-            }
773
-        }
774
-    }
761
+	global $wpdb;
762
+
763
+	$all_postypes = geodir_get_posttypes();
764
+
765
+	if (!empty($all_postypes)) {
766
+		foreach ($all_postypes as $key) {
767
+			// update each GD CTP
768
+			try {
769
+				$wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL");
770
+			} catch(Exception $e) {
771
+				error_log( 'Error: ' . $e->getMessage() );
772
+			}
773
+		}
774
+	}
775 775
 }
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 global $wpdb;
11 11
 
12
-if (get_option('geodirectory' . '_db_version') != GEODIRECTORY_VERSION) {
12
+if (get_option('geodirectory'.'_db_version') != GEODIRECTORY_VERSION) {
13 13
     /**
14 14
      * Include custom database table related functions.
15 15
      *
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
     }
48 48
 
49 49
 
50
-    add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions
50
+    add_action('init', 'gd_fix_cpt_rewrite_slug', 11); // this needs to be kept for a few versions
51 51
 
52
-    update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION);
52
+    update_option('geodirectory'.'_db_version', GEODIRECTORY_VERSION);
53 53
 
54 54
 }
55 55
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
  * @since 1.0.0
85 85
  * @package GeoDirectory
86 86
  */
87
-function geodir_upgrade_146(){
87
+function geodir_upgrade_146() {
88 88
     gd_convert_virtual_pages();
89 89
 }
90 90
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
  * @since 1.5.0
95 95
  * @package GeoDirectory
96 96
  */
97
-function geodir_upgrade_150(){
97
+function geodir_upgrade_150() {
98 98
     gd_fix_cpt_rewrite_slug();
99 99
 }
100 100
 
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
  * @since 1.4.8
107 107
  * @package GeoDirectory
108 108
  */
109
-function geodir_upgrade_148(){
109
+function geodir_upgrade_148() {
110 110
     /*
111 111
      * Blank the users google password if present as we now use oAuth 2.0
112 112
      */
113
-    update_option('geodir_ga_pass','');
114
-    update_option('geodir_ga_user','');
113
+    update_option('geodir_ga_pass', '');
114
+    update_option('geodir_ga_user', '');
115 115
 
116 116
 }
117 117
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  * @since 1.5.3
123 123
  * @package GeoDirectory
124 124
  */
125
-function geodir_upgrade_153(){
125
+function geodir_upgrade_153() {
126 126
     geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
127 127
     geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
128 128
 }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
  * @since 1.5.3
134 134
  * @package GeoDirectory
135 135
  */
136
-function geodir_upgrade_154(){
136
+function geodir_upgrade_154() {
137 137
     geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
138 138
 }
139 139
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
  * @since 1.5.2
144 144
  * @package GeoDirectory
145 145
  */
146
-function geodir_upgrade_152(){
146
+function geodir_upgrade_152() {
147 147
     gd_fix_address_detail_table_limit();
148 148
 }
149 149
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 function geodir_fix_review_date()
178 178
 {
179 179
     global $wpdb;
180
-    $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'");
180
+    $wpdb->query("UPDATE ".GEODIR_REVIEW_TABLE." gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'");
181 181
 }
182 182
 
183 183
 /**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 function geodir_fix_review_post_status()
191 191
 {
192 192
     global $wpdb;
193
-    $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'");
193
+    $wpdb->query("UPDATE ".GEODIR_REVIEW_TABLE." gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'");
194 194
 }
195 195
 
196 196
 /**
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 function geodir_fix_review_content()
205 205
 {
206 206
     global $wpdb;
207
-    if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) {
207
+    if ($wpdb->query("UPDATE ".GEODIR_REVIEW_TABLE." gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) {
208 208
         return true;
209 209
     } else {
210 210
         return false;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         foreach ($all_postypes as $key) {
230 230
             // update each GD CTP
231 231
 
232
-            $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city,  gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL");
232
+            $wpdb->query("UPDATE ".GEODIR_REVIEW_TABLE." gdr JOIN ".$wpdb->prefix."geodir_".$key."_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city,  gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL");
233 233
 
234 234
         }
235 235
         return true;
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     if (!empty($all_postypes)) {
254 254
         foreach ($all_postypes as $key) {
255 255
             // update each GD CTP
256
-            $reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d");
256
+            $reviews = $wpdb->get_results("SELECT post_id FROM ".$wpdb->prefix."geodir_".$key."_detail d");
257 257
 
258 258
             if (!empty($reviews)) {
259 259
                 foreach ($reviews as $post_id) {
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 
642 642
     update_option('gd_theme_compats', $theme_compat);
643 643
 
644
-    gd_set_theme_compat();// set the compat pack if avail
644
+    gd_set_theme_compat(); // set the compat pack if avail
645 645
 }
646 646
 
647 647
 
@@ -652,61 +652,61 @@  discard block
 block discarded – undo
652 652
  * @package GeoDirectory
653 653
  * @global object $wpdb WordPress Database object.
654 654
  */
655
-function gd_convert_virtual_pages(){
655
+function gd_convert_virtual_pages() {
656 656
     global $wpdb;
657 657
 
658 658
     // Update the add listing page settings
659 659
     $add_listing_page = $wpdb->get_var(
660 660
         $wpdb->prepare(
661
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
661
+            "SELECT ID FROM ".$wpdb->posts." WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
662 662
             array('add-listing')
663 663
         )
664 664
     );
665 665
 
666
-    if($add_listing_page){
667
-        wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') );
668
-        update_option( 'geodir_add_listing_page', $add_listing_page);
666
+    if ($add_listing_page) {
667
+        wp_update_post(array('ID' => $add_listing_page, 'post_status' => 'publish'));
668
+        update_option('geodir_add_listing_page', $add_listing_page);
669 669
     }
670 670
 
671 671
     // Update the listing preview page settings
672 672
     $listing_preview_page = $wpdb->get_var(
673 673
         $wpdb->prepare(
674
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
674
+            "SELECT ID FROM ".$wpdb->posts." WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
675 675
             array('listing-preview')
676 676
         )
677 677
     );
678 678
 
679
-    if($listing_preview_page){
680
-        wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') );
681
-        update_option( 'geodir_preview_page', $listing_preview_page);
679
+    if ($listing_preview_page) {
680
+        wp_update_post(array('ID' => $listing_preview_page, 'post_status' => 'publish'));
681
+        update_option('geodir_preview_page', $listing_preview_page);
682 682
     }
683 683
 
684 684
     // Update the listing success page settings
685 685
     $listing_success_page = $wpdb->get_var(
686 686
         $wpdb->prepare(
687
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
687
+            "SELECT ID FROM ".$wpdb->posts." WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
688 688
             array('listing-success')
689 689
         )
690 690
     );
691 691
 
692
-    if($listing_success_page){
693
-        wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') );
694
-        update_option( 'geodir_success_page', $listing_success_page);
692
+    if ($listing_success_page) {
693
+        wp_update_post(array('ID' => $listing_success_page, 'post_status' => 'publish'));
694
+        update_option('geodir_success_page', $listing_success_page);
695 695
     }
696 696
 
697 697
     // Update the listing success page settings
698 698
     $location_page = $wpdb->get_var(
699 699
         $wpdb->prepare(
700
-            "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
700
+            "SELECT ID FROM ".$wpdb->posts." WHERE post_name = %s AND post_status='virtual' LIMIT 1;",
701 701
             array('location')
702 702
         )
703 703
     );
704 704
 
705
-    if($location_page){
705
+    if ($location_page) {
706 706
         $location_slug = get_option('geodir_location_prefix');
707
-        if(!$location_slug ){$location_slug  = 'location';}
708
-        wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) );
709
-        update_option( 'geodir_location_page', $location_page);
707
+        if (!$location_slug) {$location_slug = 'location'; }
708
+        wp_update_post(array('ID' => $location_page, 'post_status' => 'publish', 'post_name' => $location_slug));
709
+        update_option('geodir_location_page', $location_page);
710 710
     }
711 711
 
712 712
 }
@@ -725,13 +725,13 @@  discard block
 block discarded – undo
725 725
     $post_types = get_option('geodir_post_types');
726 726
 
727 727
 
728
-    if (is_array($post_types)){
728
+    if (is_array($post_types)) {
729 729
 
730 730
         foreach ($post_types as $post_type => $args) {
731 731
 
732 732
 
733
-            if(isset($args['rewrite']['slug'])){
734
-                $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']);
733
+            if (isset($args['rewrite']['slug'])) {
734
+                $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%", "", $args['rewrite']['slug']);
735 735
             }
736 736
 
737 737
                 $alt_post_types[$post_type] = $args;
@@ -739,8 +739,8 @@  discard block
 block discarded – undo
739 739
         }
740 740
     }
741 741
 
742
-    if(!empty($alt_post_types)) {
743
-        update_option('geodir_post_types',$alt_post_types);
742
+    if (!empty($alt_post_types)) {
743
+        update_option('geodir_post_types', $alt_post_types);
744 744
         }
745 745
 
746 746
 
@@ -766,9 +766,9 @@  discard block
 block discarded – undo
766 766
         foreach ($all_postypes as $key) {
767 767
             // update each GD CTP
768 768
             try {
769
-                $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL");
770
-            } catch(Exception $e) {
771
-                error_log( 'Error: ' . $e->getMessage() );
769
+                $wpdb->query("ALTER TABLE ".$wpdb->prefix."geodir_".$key."_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL");
770
+            } catch (Exception $e) {
771
+                error_log('Error: '.$e->getMessage());
772 772
             }
773 773
         }
774 774
     }
Please login to merge, or discard this patch.
geodirectory-templates/popup-forms.php 2 patches
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
             <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID;?>"/>
30 30
 
31 31
             <h3><?php
32
-                /**
33
-                 * Filter the title for the send to friend popup form.
34
-                 *
35
-                 * @since 1.0.0
36
-                 * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text.
37
-                 */
38
-                echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3>
32
+				/**
33
+				 * Filter the title for the send to friend popup form.
34
+				 *
35
+				 * @since 1.0.0
36
+				 * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text.
37
+				 */
38
+				echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3>
39 39
 
40 40
             <p id="reply_send_success" class="sucess_msg" style="display:none;"></p>
41 41
             <?php
42
-            /**
43
-             * Called before each field in the send to friend popup template.
44
-             *
45
-             * @since 1.0.0
46
-             * @param string $field The field name the actions is called before.
47
-             */
48
-            do_action('geodir_before_stf_form_field', 'to_name');?>
42
+			/**
43
+			 * Called before each field in the send to friend popup template.
44
+			 *
45
+			 * @since 1.0.0
46
+			 * @param string $field The field name the actions is called before.
47
+			 */
48
+			do_action('geodir_before_stf_form_field', 'to_name');?>
49 49
             <div class="row clearfix">
50 50
                 <div class="geodir_popup_heading">
51 51
                     <label><?php _e('Friend Name', 'geodirectory');?> : <span>*</span></label></div>
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
                     <span class="message_error2" id="to_nameInfo"></span></div>
55 55
             </div>
56 56
             <?php
57
-            /**
58
-             * Called after each field in the send to friend popup template.
59
-             *
60
-             * @since 1.0.0
61
-             * @param string $field The field name the actions is called after.
62
-             */
63
-            do_action('geodir_after_stf_form_field', 'to_name');?>
57
+			/**
58
+			 * Called after each field in the send to friend popup template.
59
+			 *
60
+			 * @since 1.0.0
61
+			 * @param string $field The field name the actions is called after.
62
+			 */
63
+			do_action('geodir_after_stf_form_field', 'to_name');?>
64 64
             <?php
65
-            /** This action is documented in geodirectory-templates/popup-forms.php */
66
-            do_action('geodir_before_stf_form_field', 'to_email');?>
65
+			/** This action is documented in geodirectory-templates/popup-forms.php */
66
+			do_action('geodir_before_stf_form_field', 'to_email');?>
67 67
             <div class="row  clearfix">
68 68
                 <div class="geodir_popup_heading">
69 69
                     <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div>
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
                     <span class="message_error2" id="to_emailInfo"></span></div>
73 73
             </div>
74 74
             <?php
75
-            /** This action is documented in geodirectory-templates/popup-forms.php */
76
-            do_action('geodir_after_stf_form_field', 'to_email');?>
75
+			/** This action is documented in geodirectory-templates/popup-forms.php */
76
+			do_action('geodir_after_stf_form_field', 'to_email');?>
77 77
             <?php
78
-            /** This action is documented in geodirectory-templates/popup-forms.php */
79
-            do_action('geodir_before_stf_form_field', 'yourname');?>
78
+			/** This action is documented in geodirectory-templates/popup-forms.php */
79
+			do_action('geodir_before_stf_form_field', 'yourname');?>
80 80
             <div class="row  clearfix">
81 81
                 <div class="geodir_popup_heading">
82 82
                     <label><?php _e('Your Name', 'geodirectory');?> : <span>*</span></label></div>
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
                     <span class="message_error2" id="yournameInfo"></span></div>
86 86
             </div>
87 87
             <?php
88
-            /** This action is documented in geodirectory-templates/popup-forms.php */
89
-            do_action('geodir_after_stf_form_field', 'yourname');?>
88
+			/** This action is documented in geodirectory-templates/popup-forms.php */
89
+			do_action('geodir_after_stf_form_field', 'yourname');?>
90 90
             <?php
91
-            /** This action is documented in geodirectory-templates/popup-forms.php */
92
-            do_action('geodir_before_stf_form_field', 'youremail');?>
91
+			/** This action is documented in geodirectory-templates/popup-forms.php */
92
+			do_action('geodir_before_stf_form_field', 'youremail');?>
93 93
             <div class="row  clearfix">
94 94
                 <div class="geodir_popup_heading">
95 95
                     <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div>
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
                     <span class="message_error2" id="youremailInfo"></span></div>
99 99
             </div>
100 100
             <?php
101
-            /** This action is documented in geodirectory-templates/popup-forms.php */
102
-            do_action('geodir_after_stf_form_field', 'youremail');?>
101
+			/** This action is documented in geodirectory-templates/popup-forms.php */
102
+			do_action('geodir_after_stf_form_field', 'youremail');?>
103 103
             <?php
104
-            /** This action is documented in geodirectory-templates/popup-forms.php */
105
-            do_action('geodir_before_stf_form_field', 'frnd_subject');?>
104
+			/** This action is documented in geodirectory-templates/popup-forms.php */
105
+			do_action('geodir_before_stf_form_field', 'frnd_subject');?>
106 106
             <div class="row  clearfix">
107 107
                 <div class="geodir_popup_heading">
108 108
                     <label><?php _e('Subject', 'geodirectory');?> : <span>*</span></label></div>
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
                     <span class="message_error2" id="frnd_subjectInfo"></span></div>
114 114
             </div>
115 115
             <?php
116
-            /** This action is documented in geodirectory-templates/popup-forms.php */
117
-            do_action('geodir_after_stf_form_field', 'frnd_subject');?>
116
+			/** This action is documented in geodirectory-templates/popup-forms.php */
117
+			do_action('geodir_after_stf_form_field', 'frnd_subject');?>
118 118
             <?php
119
-            /** This action is documented in geodirectory-templates/popup-forms.php */
120
-            do_action('geodir_before_stf_form_field', 'frnd_comments');?>
119
+			/** This action is documented in geodirectory-templates/popup-forms.php */
120
+			do_action('geodir_before_stf_form_field', 'frnd_comments');?>
121 121
             <div class="row  clearfix">
122 122
                 <div class="geodir_popup_heading">
123 123
                     <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div>
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
                     <span class="message_error2" id="frnd_commentsInfo"></span></div>
128 128
             </div>
129 129
             <?php
130
-            /** This action is documented in geodirectory-templates/popup-forms.php */
131
-            do_action('geodir_after_stf_form_field', 'frnd_comments');?>
130
+			/** This action is documented in geodirectory-templates/popup-forms.php */
131
+			do_action('geodir_after_stf_form_field', 'frnd_comments');?>
132 132
             <?php if (function_exists('geodir_get_captch')) {
133
-                geodir_get_captch('-1');
134
-            }?>
133
+				geodir_get_captch('-1');
134
+			}?>
135 135
             <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory')?> " class="button "/>
136 136
         </form>
137 137
     </div> <?php
@@ -145,23 +145,23 @@  discard block
 block discarded – undo
145 145
             <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/>
146 146
 
147 147
             <h3><?php
148
-                /**
149
-                 * Filter the title for the send inquiry popup form.
150
-                 *
151
-                 * @since 1.0.0
152
-                 * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text.
153
-                 */
154
-                echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3>
148
+				/**
149
+				 * Filter the title for the send inquiry popup form.
150
+				 *
151
+				 * @since 1.0.0
152
+				 * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text.
153
+				 */
154
+				echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3>
155 155
 
156 156
             <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p>
157 157
             <?php
158
-            /**
159
-             * Called before each field in the send to friend inquiry template.
160
-             *
161
-             * @since 1.0.0
162
-             * @param string $field The field name the actions is called before.
163
-             */
164
-            do_action('geodir_before_inquiry_form_field', 'inq_name');?>
158
+			/**
159
+			 * Called before each field in the send to friend inquiry template.
160
+			 *
161
+			 * @since 1.0.0
162
+			 * @param string $field The field name the actions is called before.
163
+			 */
164
+			do_action('geodir_before_inquiry_form_field', 'inq_name');?>
165 165
             <div class="row  clearfix">
166 166
                 <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory');?> :
167 167
                         <span>*</span></label></div>
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
                     <span class="message_error2" id="span_agt_mail_name"></span></div>
171 171
             </div>
172 172
             <?php
173
-            /**
174
-             * Called after each field in the send to friend inquiry template.
175
-             *
176
-             * @since 1.0.0
177
-             * @param string $field The field name the actions is called after.
178
-             */
179
-            do_action('geodir_after_inquiry_form_field', 'inq_name');?>
173
+			/**
174
+			 * Called after each field in the send to friend inquiry template.
175
+			 *
176
+			 * @since 1.0.0
177
+			 * @param string $field The field name the actions is called after.
178
+			 */
179
+			do_action('geodir_after_inquiry_form_field', 'inq_name');?>
180 180
             <?php
181
-            /** This action is documented in geodirectory-templates/popup-forms.php */
182
-            do_action('geodir_before_inquiry_form_field', 'inq_email');?>
181
+			/** This action is documented in geodirectory-templates/popup-forms.php */
182
+			do_action('geodir_before_inquiry_form_field', 'inq_email');?>
183 183
             <div class="row  clearfix">
184 184
                 <div class="geodir_popup_heading">
185 185
                     <label><?php _e('Email', 'geodirectory');?> : <span>*</span></label></div>
@@ -189,11 +189,11 @@  discard block
 block discarded – undo
189 189
                 </div>
190 190
             </div>
191 191
             <?php
192
-            /** This action is documented in geodirectory-templates/popup-forms.php */
193
-            do_action('geodir_after_inquiry_form_field', 'inq_email');?>
192
+			/** This action is documented in geodirectory-templates/popup-forms.php */
193
+			do_action('geodir_after_inquiry_form_field', 'inq_email');?>
194 194
             <?php
195
-            /** This action is documented in geodirectory-templates/popup-forms.php */
196
-            do_action('geodir_before_inquiry_form_field', 'inq_phone');?>
195
+			/** This action is documented in geodirectory-templates/popup-forms.php */
196
+			do_action('geodir_before_inquiry_form_field', 'inq_phone');?>
197 197
             <div class="row  clearfix">
198 198
                 <div class="geodir_popup_heading">
199 199
                     <label><?php _e('Contact Info', 'geodirectory');?> :</label></div>
@@ -202,11 +202,11 @@  discard block
 block discarded – undo
202 202
                 </div>
203 203
             </div>
204 204
             <?php
205
-            /** This action is documented in geodirectory-templates/popup-forms.php */
206
-            do_action('geodir_after_inquiry_form_field', 'inq_phone');?>
205
+			/** This action is documented in geodirectory-templates/popup-forms.php */
206
+			do_action('geodir_after_inquiry_form_field', 'inq_phone');?>
207 207
             <?php
208
-            /** This action is documented in geodirectory-templates/popup-forms.php */
209
-            do_action('geodir_before_inquiry_form_field', 'inq_msg');?>
208
+			/** This action is documented in geodirectory-templates/popup-forms.php */
209
+			do_action('geodir_before_inquiry_form_field', 'inq_msg');?>
210 210
             <div class="row  clearfix">
211 211
                 <div class="geodir_popup_heading">
212 212
                     <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div>
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
                     <span class="message_error2" id="span_agt_mail_msg"></span></div>
217 217
             </div>
218 218
             <?php
219
-            /** This action is documented in geodirectory-templates/popup-forms.php */
220
-            do_action('geodir_after_inquiry_form_field', 'inq_msg');?>
219
+			/** This action is documented in geodirectory-templates/popup-forms.php */
220
+			do_action('geodir_after_inquiry_form_field', 'inq_msg');?>
221 221
             <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>"
222 222
                    class="button clearfix"/>
223 223
         </form>
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
  * @param int $post_id The post id requested by the popup.
20 20
  * @param object $post_info The post object requested by the popup.
21 21
  */
22
-do_action('geodir_popup_forms_template_start',$post_id,$post_info);
22
+do_action('geodir_popup_forms_template_start', $post_id, $post_info);
23 23
 
24 24
 if ($_REQUEST['popuptype'] == 'b_sendtofriend') { ?>
25 25
 
26 26
     <div id="basic-modal-content" class="clearfix">
27 27
         <form name="send_to_frnd" id="send_to_frnd" action="<?php echo get_permalink($post_info->ID); ?>" method="post">
28 28
             <input type="hidden" name="sendact" value="email_frnd"/>
29
-            <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID;?>"/>
29
+            <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID; ?>"/>
30 30
 
31 31
             <h3><?php
32 32
                 /**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                  * @since 1.0.0
36 36
                  * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text.
37 37
                  */
38
-                echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3>
38
+                echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND); ?></h3>
39 39
 
40 40
             <p id="reply_send_success" class="sucess_msg" style="display:none;"></p>
41 41
             <?php
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
              * @since 1.0.0
46 46
              * @param string $field The field name the actions is called before.
47 47
              */
48
-            do_action('geodir_before_stf_form_field', 'to_name');?>
48
+            do_action('geodir_before_stf_form_field', 'to_name'); ?>
49 49
             <div class="row clearfix">
50 50
                 <div class="geodir_popup_heading">
51
-                    <label><?php _e('Friend Name', 'geodirectory');?> : <span>*</span></label></div>
51
+                    <label><?php _e('Friend Name', 'geodirectory'); ?> : <span>*</span></label></div>
52 52
                 <div class="geodir_popup_field">
53 53
                     <input class="is_required" field_type="text" name="to_name" id="to_name" type="text" value=""/>
54 54
                     <span class="message_error2" id="to_nameInfo"></span></div>
@@ -60,75 +60,75 @@  discard block
 block discarded – undo
60 60
              * @since 1.0.0
61 61
              * @param string $field The field name the actions is called after.
62 62
              */
63
-            do_action('geodir_after_stf_form_field', 'to_name');?>
63
+            do_action('geodir_after_stf_form_field', 'to_name'); ?>
64 64
             <?php
65 65
             /** This action is documented in geodirectory-templates/popup-forms.php */
66
-            do_action('geodir_before_stf_form_field', 'to_email');?>
66
+            do_action('geodir_before_stf_form_field', 'to_email'); ?>
67 67
             <div class="row  clearfix">
68 68
                 <div class="geodir_popup_heading">
69
-                    <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div>
69
+                    <label> <?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div>
70 70
                 <div class="geodir_popup_field">
71 71
                     <input class="is_required" field_type="email" name="to_email" id="to_email" type="text" value=""/>
72 72
                     <span class="message_error2" id="to_emailInfo"></span></div>
73 73
             </div>
74 74
             <?php
75 75
             /** This action is documented in geodirectory-templates/popup-forms.php */
76
-            do_action('geodir_after_stf_form_field', 'to_email');?>
76
+            do_action('geodir_after_stf_form_field', 'to_email'); ?>
77 77
             <?php
78 78
             /** This action is documented in geodirectory-templates/popup-forms.php */
79
-            do_action('geodir_before_stf_form_field', 'yourname');?>
79
+            do_action('geodir_before_stf_form_field', 'yourname'); ?>
80 80
             <div class="row  clearfix">
81 81
                 <div class="geodir_popup_heading">
82
-                    <label><?php _e('Your Name', 'geodirectory');?> : <span>*</span></label></div>
82
+                    <label><?php _e('Your Name', 'geodirectory'); ?> : <span>*</span></label></div>
83 83
                 <div class="geodir_popup_field">
84 84
                     <input class="is_required" field_type="text" name="yourname" id="yourname" type="text" value=""/>
85 85
                     <span class="message_error2" id="yournameInfo"></span></div>
86 86
             </div>
87 87
             <?php
88 88
             /** This action is documented in geodirectory-templates/popup-forms.php */
89
-            do_action('geodir_after_stf_form_field', 'yourname');?>
89
+            do_action('geodir_after_stf_form_field', 'yourname'); ?>
90 90
             <?php
91 91
             /** This action is documented in geodirectory-templates/popup-forms.php */
92
-            do_action('geodir_before_stf_form_field', 'youremail');?>
92
+            do_action('geodir_before_stf_form_field', 'youremail'); ?>
93 93
             <div class="row  clearfix">
94 94
                 <div class="geodir_popup_heading">
95
-                    <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div>
95
+                    <label> <?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div>
96 96
                 <div class="geodir_popup_field">
97 97
                     <input class="is_required" field_type="email" name="youremail" id="youremail" type="text" value=""/>
98 98
                     <span class="message_error2" id="youremailInfo"></span></div>
99 99
             </div>
100 100
             <?php
101 101
             /** This action is documented in geodirectory-templates/popup-forms.php */
102
-            do_action('geodir_after_stf_form_field', 'youremail');?>
102
+            do_action('geodir_after_stf_form_field', 'youremail'); ?>
103 103
             <?php
104 104
             /** This action is documented in geodirectory-templates/popup-forms.php */
105
-            do_action('geodir_before_stf_form_field', 'frnd_subject');?>
105
+            do_action('geodir_before_stf_form_field', 'frnd_subject'); ?>
106 106
             <div class="row  clearfix">
107 107
                 <div class="geodir_popup_heading">
108
-                    <label><?php _e('Subject', 'geodirectory');?> : <span>*</span></label></div>
108
+                    <label><?php _e('Subject', 'geodirectory'); ?> : <span>*</span></label></div>
109 109
                 <div class="geodir_popup_field">
110 110
                     <input class="is_required" field_type="text" name="frnd_subject"
111
-                           value="<?php echo __('About', 'geodirectory') . ' ' . $post_info->post_title;?>"
111
+                           value="<?php echo __('About', 'geodirectory').' '.$post_info->post_title; ?>"
112 112
                            id="frnd_subject" type="text" value=""/>
113 113
                     <span class="message_error2" id="frnd_subjectInfo"></span></div>
114 114
             </div>
115 115
             <?php
116 116
             /** This action is documented in geodirectory-templates/popup-forms.php */
117
-            do_action('geodir_after_stf_form_field', 'frnd_subject');?>
117
+            do_action('geodir_after_stf_form_field', 'frnd_subject'); ?>
118 118
             <?php
119 119
             /** This action is documented in geodirectory-templates/popup-forms.php */
120
-            do_action('geodir_before_stf_form_field', 'frnd_comments');?>
120
+            do_action('geodir_before_stf_form_field', 'frnd_comments'); ?>
121 121
             <div class="row  clearfix">
122 122
                 <div class="geodir_popup_heading">
123
-                    <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div>
123
+                    <label><?php _e('Comments', 'geodirectory'); ?> : <span>*</span></label></div>
124 124
                 <div class="geodir_popup_field">
125 125
                     <textarea class="is_required" field_type="textarea" name="frnd_comments" id="frnd_comments" cols=""
126
-                              rows=""><?php echo SEND_TO_FRIEND_SAMPLE_CONTENT;?></textarea>
126
+                              rows=""><?php echo SEND_TO_FRIEND_SAMPLE_CONTENT; ?></textarea>
127 127
                     <span class="message_error2" id="frnd_commentsInfo"></span></div>
128 128
             </div>
129 129
             <?php
130 130
             /** This action is documented in geodirectory-templates/popup-forms.php */
131
-            do_action('geodir_after_stf_form_field', 'frnd_comments');?>
131
+            do_action('geodir_after_stf_form_field', 'frnd_comments'); ?>
132 132
             <?php if (function_exists('geodir_get_captch')) {
133 133
                 geodir_get_captch('-1');
134 134
             }?>
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         <form method="post" name="agt_mail_agent" id="agt_mail_agent"
143 143
               action="<?php echo get_permalink($post_info->ID); ?>">
144 144
             <input type="hidden" name="sendact" value="send_inqury"/>
145
-            <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/>
145
+            <input type="hidden" name="pid" value="<?php echo $post_info->ID; ?>"/>
146 146
 
147 147
             <h3><?php
148 148
                 /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                  * @since 1.0.0
152 152
                  * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text.
153 153
                  */
154
-                echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3>
154
+                echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY); ?> </h3>
155 155
 
156 156
             <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p>
157 157
             <?php
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
              * @since 1.0.0
162 162
              * @param string $field The field name the actions is called before.
163 163
              */
164
-            do_action('geodir_before_inquiry_form_field', 'inq_name');?>
164
+            do_action('geodir_before_inquiry_form_field', 'inq_name'); ?>
165 165
             <div class="row  clearfix">
166
-                <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory');?> :
166
+                <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory'); ?> :
167 167
                         <span>*</span></label></div>
168 168
                 <div class="geodir_popup_field">
169 169
                     <input class="is_required" field_type="text" name="inq_name" type="text" value=""/>
@@ -176,13 +176,13 @@  discard block
 block discarded – undo
176 176
              * @since 1.0.0
177 177
              * @param string $field The field name the actions is called after.
178 178
              */
179
-            do_action('geodir_after_inquiry_form_field', 'inq_name');?>
179
+            do_action('geodir_after_inquiry_form_field', 'inq_name'); ?>
180 180
             <?php
181 181
             /** This action is documented in geodirectory-templates/popup-forms.php */
182
-            do_action('geodir_before_inquiry_form_field', 'inq_email');?>
182
+            do_action('geodir_before_inquiry_form_field', 'inq_email'); ?>
183 183
             <div class="row  clearfix">
184 184
                 <div class="geodir_popup_heading">
185
-                    <label><?php _e('Email', 'geodirectory');?> : <span>*</span></label></div>
185
+                    <label><?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div>
186 186
                 <div class="geodir_popup_field">
187 187
                     <input class="is_required" field_type="email" name="inq_email" type="text" value=""/>
188 188
                     <span class="message_error2" id="span_agt_mail_email"></span>
@@ -190,35 +190,35 @@  discard block
 block discarded – undo
190 190
             </div>
191 191
             <?php
192 192
             /** This action is documented in geodirectory-templates/popup-forms.php */
193
-            do_action('geodir_after_inquiry_form_field', 'inq_email');?>
193
+            do_action('geodir_after_inquiry_form_field', 'inq_email'); ?>
194 194
             <?php
195 195
             /** This action is documented in geodirectory-templates/popup-forms.php */
196
-            do_action('geodir_before_inquiry_form_field', 'inq_phone');?>
196
+            do_action('geodir_before_inquiry_form_field', 'inq_phone'); ?>
197 197
             <div class="row  clearfix">
198 198
                 <div class="geodir_popup_heading">
199
-                    <label><?php _e('Contact Info', 'geodirectory');?> :</label></div>
199
+                    <label><?php _e('Contact Info', 'geodirectory'); ?> :</label></div>
200 200
                 <div class="geodir_popup_field">
201 201
                     <input name="inq_phone" id="agt_mail_phone" type="text" value=""/>
202 202
                 </div>
203 203
             </div>
204 204
             <?php
205 205
             /** This action is documented in geodirectory-templates/popup-forms.php */
206
-            do_action('geodir_after_inquiry_form_field', 'inq_phone');?>
206
+            do_action('geodir_after_inquiry_form_field', 'inq_phone'); ?>
207 207
             <?php
208 208
             /** This action is documented in geodirectory-templates/popup-forms.php */
209
-            do_action('geodir_before_inquiry_form_field', 'inq_msg');?>
209
+            do_action('geodir_before_inquiry_form_field', 'inq_msg'); ?>
210 210
             <div class="row  clearfix">
211 211
                 <div class="geodir_popup_heading">
212
-                    <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div>
212
+                    <label><?php _e('Comments', 'geodirectory'); ?> : <span>*</span></label></div>
213 213
                 <div class="geodir_popup_field">
214 214
                     <textarea class="is_required" field_type="textarea" name="inq_msg" cols=""
215
-                              rows=""><?php echo SEND_INQUIRY_SAMPLE_CONTENT;?></textarea>
215
+                              rows=""><?php echo SEND_INQUIRY_SAMPLE_CONTENT; ?></textarea>
216 216
                     <span class="message_error2" id="span_agt_mail_msg"></span></div>
217 217
             </div>
218 218
             <?php
219 219
             /** This action is documented in geodirectory-templates/popup-forms.php */
220
-            do_action('geodir_after_inquiry_form_field', 'inq_msg');?>
221
-            <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>"
220
+            do_action('geodir_after_inquiry_form_field', 'inq_msg'); ?>
221
+            <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory'); ?>"
222 222
                    class="button clearfix"/>
223 223
         </form>
224 224
     </div> <?php
Please login to merge, or discard this patch.
geodirectory-templates/add-listing.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 global $gd_session;
13 13
 
14 14
 if (!isset($_REQUEST['backandedit'])) {
15
-    $gd_session->un_set('listing');
15
+	$gd_session->un_set('listing');
16 16
 }
17 17
 // call header
18 18
 get_header();
Please login to merge, or discard this patch.
geodirectory-templates/reg_frm.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
  * @package GeoDirectory
10 10
  */
11 11
 if (isset($_GET['redirect_to']) && $_GET['redirect_to'] != '') {
12
-    $redirect_to = $_GET['redirect_to'];
12
+	$redirect_to = $_GET['redirect_to'];
13 13
 } else {
14
-    //echo $_SERVER['HTTP_HOST'] ;
15
-    $redirect_to = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
16
-    if (strpos($redirect_to, $_SERVER['HTTP_HOST']) === false) {
17
-        $redirect_to = home_url();
18
-    }
14
+	//echo $_SERVER['HTTP_HOST'] ;
15
+	$redirect_to = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
16
+	if (strpos($redirect_to, $_SERVER['HTTP_HOST']) === false) {
17
+		$redirect_to = home_url();
18
+	}
19 19
 }
20 20
 ?>
21 21
 <div id="sign_up">
@@ -26,28 +26,28 @@  discard block
 block discarded – undo
26 26
         <h4>
27 27
             <?php
28 28
 
29
-            /**
30
-             * Filter the `REGISTRATION_NOW_TEXT` title text on the register form template.
31
-             *
32
-             * @since 1.0.0
33
-             */
34
-            echo apply_filters('geodir_registration_page_title', REGISTRATION_NOW_TEXT);
29
+			/**
30
+			 * Filter the `REGISTRATION_NOW_TEXT` title text on the register form template.
31
+			 *
32
+			 * @since 1.0.0
33
+			 */
34
+			echo apply_filters('geodir_registration_page_title', REGISTRATION_NOW_TEXT);
35 35
 
36
-            ?>
36
+			?>
37 37
         </h4>
38 38
         <?php
39
-        global $geodir_signup_error;
40
-        if ($geodir_signup_error != '') {
41
-            echo '<p class="error_msg">' . $geodir_signup_error . '</p>';
42
-            unset($geodir_signup_error);
43
-        } else {
44
-            if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 1) {
45
-                echo '<p class="error_msg">' . EMAIL_USERNAME_EXIST_MSG . '</p>';
46
-            } else if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'regnewusr') {
47
-                echo '<p class="error_msg">' . REGISTRATION_DESABLED_MSG . '</p>';
48
-            }
49
-        }
50
-        ?>
39
+		global $geodir_signup_error;
40
+		if ($geodir_signup_error != '') {
41
+			echo '<p class="error_msg">' . $geodir_signup_error . '</p>';
42
+			unset($geodir_signup_error);
43
+		} else {
44
+			if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 1) {
45
+				echo '<p class="error_msg">' . EMAIL_USERNAME_EXIST_MSG . '</p>';
46
+			} else if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'regnewusr') {
47
+				echo '<p class="error_msg">' . REGISTRATION_DESABLED_MSG . '</p>';
48
+			}
49
+		}
50
+		?>
51 51
 
52 52
         <form name="cus_registerform" id="cus_registerform"
53 53
               action="<?php echo htmlspecialchars(geodir_curPageURL()); ?>" method="post">
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
             <div class="form_row clearfix">
58 58
                 <input placeholder='<?php echo EMAIL_TEXT; ?>' type="text" name="user_email" id="user_email"
59 59
                        class="textfield" value="<?php global $user_email;
60
-                if (!isset($user_email)) {
61
-                    $user_email = '';
62
-                }
63
-                echo esc_attr(stripslashes($user_email)); ?>" size="25"/>
60
+				if (!isset($user_email)) {
61
+					$user_email = '';
62
+				}
63
+				echo esc_attr(stripslashes($user_email)); ?>" size="25"/>
64 64
 
65 65
                 <?php if (!get_option('geodir_allow_cpass')) { ?>
66 66
 				<div id="reg_passmail">
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
                 <div class="form_row clearfix">
75 75
                     <input placeholder='<?php echo FIRST_NAME_TEXT; ?>' type="text" name="user_fname" id="user_fname"
76 76
                            class="textfield" value="<?php if (isset($user_fname)) {
77
-                        echo esc_attr(stripslashes($user_fname));
78
-                    } ?>" size="25"/>
77
+						echo esc_attr(stripslashes($user_fname));
78
+					} ?>" size="25"/>
79 79
                     <span id="user_fnameInfo"></span>
80 80
                 </div>
81 81
             </div>
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
             <?php } ?>
102 102
 
103 103
             <?php
104
-            /**
105
-             * Called just before the register new user button on the register form template.
106
-             *
107
-             * Also used by other plugins to add social connect buttons.
108
-             *
109
-             * @since 1.0.0
110
-             */
111
-            do_action('social_connect_form'); ?>
104
+			/**
105
+			 * Called just before the register new user button on the register form template.
106
+			 *
107
+			 * Also used by other plugins to add social connect buttons.
108
+			 *
109
+			 * @since 1.0.0
110
+			 */
111
+			do_action('social_connect_form'); ?>
112 112
             <input type="submit" name="registernow" value="<?php echo REGISTER_NOW_TEXT; ?>" class="geodir_button"/>
113 113
         </form>
114 114
     </div>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@
 block discarded – undo
38 38
         <?php
39 39
         global $geodir_signup_error;
40 40
         if ($geodir_signup_error != '') {
41
-            echo '<p class="error_msg">' . $geodir_signup_error . '</p>';
41
+            echo '<p class="error_msg">'.$geodir_signup_error.'</p>';
42 42
             unset($geodir_signup_error);
43 43
         } else {
44 44
             if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 1) {
45
-                echo '<p class="error_msg">' . EMAIL_USERNAME_EXIST_MSG . '</p>';
45
+                echo '<p class="error_msg">'.EMAIL_USERNAME_EXIST_MSG.'</p>';
46 46
             } else if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'regnewusr') {
47
-                echo '<p class="error_msg">' . REGISTRATION_DESABLED_MSG . '</p>';
47
+                echo '<p class="error_msg">'.REGISTRATION_DESABLED_MSG.'</p>';
48 48
             }
49 49
         }
50 50
         ?>
Please login to merge, or discard this patch.