Test Failed
Push — master ( f7a989...ca8ef6 )
by Stiofan
01:18
created
geodirectory-templates/geodir-information.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,27 +12,27 @@
 block discarded – undo
12 12
         <div class="clearfix">
13 13
             <div id="geodir_content">
14 14
                 <?php
15
-                /** This action is documented in geodirectory-templates/geodir-home.php */
16
-                do_action('geodir_add_page_content', 'before', 'info-page');
17
-                global $information;
18
-                echo '<h5 class="geodir_information">';
19
-                echo $information;
20
-                echo '</h5>';
21
-                /** This action is documented in geodirectory-templates/geodir-home.php */
22
-                do_action('geodir_add_page_content', 'after', 'info-page');
23
-                ?>
15
+				/** This action is documented in geodirectory-templates/geodir-home.php */
16
+				do_action('geodir_add_page_content', 'before', 'info-page');
17
+				global $information;
18
+				echo '<h5 class="geodir_information">';
19
+				echo $information;
20
+				echo '</h5>';
21
+				/** This action is documented in geodirectory-templates/geodir-home.php */
22
+				do_action('geodir_add_page_content', 'after', 'info-page');
23
+				?>
24 24
             </div>
25 25
             <!-- geodir_content ends here-->
26 26
             <div id="gd-sidebar-wrapper">
27 27
                 <div class="geodir-sidebar-main">
28 28
                     <div class="geodir-gd-sidebar">
29 29
                         <?php
30
-                        /**
31
-                         * Calls the author sidebar.
32
-                         *
33
-                         * @since 1.6.11
34
-                         */
35
-                        dynamic_sidebar('geodir_author_right_sidebar'); ?>
30
+						/**
31
+						 * Calls the author sidebar.
32
+						 *
33
+						 * @since 1.6.11
34
+						 */
35
+						dynamic_sidebar('geodir_author_right_sidebar'); ?>
36 36
                     </div>
37 37
                 </div>
38 38
             </div>
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Kleo.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 // Page titles translatable CPT names
12 12
 function geodir_kelo_title_translation( $args) {
13 13
 
14
-    if(function_exists('geodir_is_geodir_page')){
15
-        $args['title'] = __($args['title'],'geodirectory');
16
-    }
14
+	if(function_exists('geodir_is_geodir_page')){
15
+		$args['title'] = __($args['title'],'geodirectory');
16
+	}
17 17
 
18
-    return $args;
18
+	return $args;
19 19
 }
20 20
 add_filter( 'kleo_title_args', 'geodir_kelo_title_translation', 10, 1 );
21 21
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Page titles translatable CPT names
12
-function geodir_kelo_title_translation( $args) {
12
+function geodir_kelo_title_translation($args) {
13 13
 
14
-    if(function_exists('geodir_is_geodir_page')){
15
-        $args['title'] = __($args['title'],'geodirectory');
14
+    if (function_exists('geodir_is_geodir_page')) {
15
+        $args['title'] = __($args['title'], 'geodirectory');
16 16
     }
17 17
 
18 18
     return $args;
19 19
 }
20
-add_filter( 'kleo_title_args', 'geodir_kelo_title_translation', 10, 1 );
20
+add_filter('kleo_title_args', 'geodir_kelo_title_translation', 10, 1);
21 21
 
22 22
 
Please login to merge, or discard this patch.
geodirectory-functions/map-functions/map_functions.php 3 patches
Indentation   +211 added lines, -211 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
  */
16 16
 function  geodir_init_map_jason()
17 17
 {
18
-    global $map_jason;
19
-    $map_jason = array();
18
+	global $map_jason;
19
+	$map_jason = array();
20 20
 }
21 21
 
22 22
 /**
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
  */
29 29
 function geodir_init_map_canvas_array()
30 30
 {
31
-    global $map_canvas_arr;
32
-    $map_canvas_arr = array();
31
+	global $map_canvas_arr;
32
+	$map_canvas_arr = array();
33 33
 }
34 34
 
35 35
 
@@ -50,50 +50,50 @@  discard block
 block discarded – undo
50 50
  */
51 51
 function create_marker_jason_of_posts($post)
52 52
 {
53
-    global $wpdb, $map_jason, $add_post_in_marker_array, $geodir_cat_icons, $gd_marker_sizes;
53
+	global $wpdb, $map_jason, $add_post_in_marker_array, $geodir_cat_icons, $gd_marker_sizes;
54 54
 
55
-    if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') {
55
+	if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') {
56 56
 
57
-        if(isset($map_jason[$post->ID])){return null;}
57
+		if(isset($map_jason[$post->ID])){return null;}
58 58
 
59
-        $srcharr = array("'", "/", "-", '"', '\\');
60
-        $replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
59
+		$srcharr = array("'", "/", "-", '"', '\\');
60
+		$replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
61 61
 
62 62
 
63
-        $geodir_cat_icons = geodir_get_term_icon();
64
-        $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$post->default_category]) ? $geodir_cat_icons[$post->default_category] : '';
63
+		$geodir_cat_icons = geodir_get_term_icon();
64
+		$icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$post->default_category]) ? $geodir_cat_icons[$post->default_category] : '';
65 65
 
66
-        $post_title = $post->post_title;
67
-        $title = str_replace($srcharr, $replarr, $post_title);
66
+		$post_title = $post->post_title;
67
+		$title = str_replace($srcharr, $replarr, $post_title);
68 68
 
69
-        if (is_ssl()) {
70
-            $icon = str_replace("http:","https:",$icon );
71
-        }
69
+		if (is_ssl()) {
70
+			$icon = str_replace("http:","https:",$icon );
71
+		}
72 72
         
73
-        if ($icon != '') {
74
-            $gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes;
73
+		if ($icon != '') {
74
+			$gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes;
75 75
             
76
-            if (isset($gd_marker_sizes[$icon])) {
77
-                $icon_size = $gd_marker_sizes[$icon];
78
-            } else {
79
-                $icon_size = geodir_get_marker_size($icon);
80
-                $gd_marker_sizes[$icon] = $icon_size;
81
-            }               
82
-        } else {
83
-            $icon_size = array('w' => 36, 'h' => 45);
84
-        }
85
-
86
-        $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
87
-
88
-        /**
89
-         * Filter the json data when creating output for post json marker..
90
-         *
91
-         * @since 1.5.7
92
-         * @param string $post_json JSON representation of the post marker info.
93
-         * @param object $post The post object.
94
-         */
95
-        $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
96
-    }
76
+			if (isset($gd_marker_sizes[$icon])) {
77
+				$icon_size = $gd_marker_sizes[$icon];
78
+			} else {
79
+				$icon_size = geodir_get_marker_size($icon);
80
+				$gd_marker_sizes[$icon] = $icon_size;
81
+			}               
82
+		} else {
83
+			$icon_size = array('w' => 36, 'h' => 45);
84
+		}
85
+
86
+		$post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
87
+
88
+		/**
89
+		 * Filter the json data when creating output for post json marker..
90
+		 *
91
+		 * @since 1.5.7
92
+		 * @param string $post_json JSON representation of the post marker info.
93
+		 * @param object $post The post object.
94
+		 */
95
+		$map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
96
+	}
97 97
 }
98 98
 
99 99
 /**
@@ -106,66 +106,66 @@  discard block
 block discarded – undo
106 106
  */
107 107
 function send_marker_jason_to_js()
108 108
 {
109
-    global $map_jason, $map_canvas_arr;
110
-
111
-    if (is_array($map_canvas_arr) && !empty($map_canvas_arr)) {
112
-        foreach ($map_canvas_arr as $canvas => $jason) {
113
-            if (is_array($map_jason) && !empty($map_jason)) {
114
-
115
-                // on details page only show the main marker on the map
116
-                if(geodir_is_page('detail')){
117
-                    global $post;
118
-                    if(isset($map_jason[$post->ID])){
119
-                        $map_jason = array($map_jason[$post->ID]);
120
-                    }
121
-                }
122
-                $canvas_jason = $canvas . "_jason";
123
-                $map_canvas_arr[$canvas] = array_unique($map_jason);
124
-                unset($cat_content_info);
125
-                $cat_content_info[] = implode(',', $map_canvas_arr[$canvas]);
126
-                $totalcount = count(array_unique($map_jason));
127
-                if (!empty($cat_content_info)) {
128
-                    $json_content = substr(implode(',', $cat_content_info), 1);
129
-                    $json_content = htmlentities($json_content, ENT_QUOTES, get_option('blog_charset')); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016
130
-                    $canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']';
131
-                } else {
132
-                    $canvas_jason = '[{"totalcount":"0"}]';
133
-                }
134
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
135
-
136
-                /**
137
-                 * Filter the send_marker_jason_to_js() function map canvas json args.
138
-                 *
139
-                 * You can use this filter to modify map canvas json args.
140
-                 *
141
-                 * @since 1.0.0
142
-                 * @package GeoDirectory
143
-                 * @param string $canvas Map canvas array key.
144
-                 * @param array $map_canvas_jason_args Map canvas args.
145
-                 */
146
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
147
-
148
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
149
-            } else {
150
-                $canvas_jason = '[{"totalcount":"0"}]';
151
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
152
-
153
-                /**
154
-                 * Filter the send_marker_jason_to_js() function map canvas json args.
155
-                 *
156
-                 * You can use this filter to modify map canvas json args.
157
-                 *
158
-                 * @since 1.0.0
159
-                 * @package GeoDirectory
160
-                 * @param string $canvas Map canvas array key.
161
-                 * @param array $map_canvas_jason_args Map canvas args.
162
-                 */
163
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
164
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
165
-            }
166
-        }
167
-
168
-    }
109
+	global $map_jason, $map_canvas_arr;
110
+
111
+	if (is_array($map_canvas_arr) && !empty($map_canvas_arr)) {
112
+		foreach ($map_canvas_arr as $canvas => $jason) {
113
+			if (is_array($map_jason) && !empty($map_jason)) {
114
+
115
+				// on details page only show the main marker on the map
116
+				if(geodir_is_page('detail')){
117
+					global $post;
118
+					if(isset($map_jason[$post->ID])){
119
+						$map_jason = array($map_jason[$post->ID]);
120
+					}
121
+				}
122
+				$canvas_jason = $canvas . "_jason";
123
+				$map_canvas_arr[$canvas] = array_unique($map_jason);
124
+				unset($cat_content_info);
125
+				$cat_content_info[] = implode(',', $map_canvas_arr[$canvas]);
126
+				$totalcount = count(array_unique($map_jason));
127
+				if (!empty($cat_content_info)) {
128
+					$json_content = substr(implode(',', $cat_content_info), 1);
129
+					$json_content = htmlentities($json_content, ENT_QUOTES, get_option('blog_charset')); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016
130
+					$canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']';
131
+				} else {
132
+					$canvas_jason = '[{"totalcount":"0"}]';
133
+				}
134
+				$map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
135
+
136
+				/**
137
+				 * Filter the send_marker_jason_to_js() function map canvas json args.
138
+				 *
139
+				 * You can use this filter to modify map canvas json args.
140
+				 *
141
+				 * @since 1.0.0
142
+				 * @package GeoDirectory
143
+				 * @param string $canvas Map canvas array key.
144
+				 * @param array $map_canvas_jason_args Map canvas args.
145
+				 */
146
+				$map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
147
+
148
+				wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
149
+			} else {
150
+				$canvas_jason = '[{"totalcount":"0"}]';
151
+				$map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
152
+
153
+				/**
154
+				 * Filter the send_marker_jason_to_js() function map canvas json args.
155
+				 *
156
+				 * You can use this filter to modify map canvas json args.
157
+				 *
158
+				 * @since 1.0.0
159
+				 * @package GeoDirectory
160
+				 * @param string $canvas Map canvas array key.
161
+				 * @param array $map_canvas_jason_args Map canvas args.
162
+				 */
163
+				$map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
164
+				wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
165
+			}
166
+		}
167
+
168
+	}
169 169
 }
170 170
 
171 171
 /**
@@ -184,99 +184,99 @@  discard block
 block discarded – undo
184 184
  */
185 185
 function home_map_taxonomy_walker($cat_taxonomy, $cat_parent = 0, $hide_empty = true, $pading = 0, $map_canvas_name = '', $child_collapse, $is_home_map = false)
186 186
 {
187
-    global $cat_count, $geodir_cat_icons;
187
+	global $cat_count, $geodir_cat_icons;
188 188
 
189
-    $exclude_categories = get_option('geodir_exclude_cat_on_map');
190
-    $exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade');
189
+	$exclude_categories = get_option('geodir_exclude_cat_on_map');
190
+	$exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade');
191 191
 
192
-    // check if exclude categories saved before fix of categories identical names
193
-    if ($exclude_categories_new) {
194
-        $gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : '';
195
-        $exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array();
196
-    }
192
+	// check if exclude categories saved before fix of categories identical names
193
+	if ($exclude_categories_new) {
194
+		$gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : '';
195
+		$exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array();
196
+	}
197 197
 
198
-    $exclude_cat_str = implode(',', $exclude_categories);
198
+	$exclude_cat_str = implode(',', $exclude_categories);
199 199
 
200
-    if ($exclude_cat_str == '') {
201
-        $exclude_cat_str = '0';
202
-    }
200
+	if ($exclude_cat_str == '') {
201
+		$exclude_cat_str = '0';
202
+	}
203 203
 
204
-    $cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'exclude' => $exclude_cat_str, 'hide_empty ' => $hide_empty));
204
+	$cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'exclude' => $exclude_cat_str, 'hide_empty ' => $hide_empty));
205 205
 
206
-    if ($hide_empty) {
207
-        $cat_terms = geodir_filter_empty_terms($cat_terms);
208
-    }
206
+	if ($hide_empty) {
207
+		$cat_terms = geodir_filter_empty_terms($cat_terms);
208
+	}
209 209
 
210
-    $main_list_class = '';
211
-    //If there are terms, start displaying
212
-    if (count($cat_terms) > 0) {
213
-        //Displaying as a list
214
-        $p = $pading * 15;
215
-        $pading++;
210
+	$main_list_class = '';
211
+	//If there are terms, start displaying
212
+	if (count($cat_terms) > 0) {
213
+		//Displaying as a list
214
+		$p = $pading * 15;
215
+		$pading++;
216 216
 
217
-        if ($cat_parent == 0) {
218
-            $list_class = 'main_list';
219
-            $display = '';
220
-        } else {
221
-            $list_class = 'sub_list';
222
-            $display = !$child_collapse ? '' : 'display:none';
223
-        }
217
+		if ($cat_parent == 0) {
218
+			$list_class = 'main_list';
219
+			$display = '';
220
+		} else {
221
+			$list_class = 'sub_list';
222
+			$display = !$child_collapse ? '' : 'display:none';
223
+		}
224 224
 
225 225
 
226
-        $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
226
+		$out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
227 227
 
228
-        $geodir_cat_icons = geodir_get_term_icon();
228
+		$geodir_cat_icons = geodir_get_term_icon();
229 229
 
230
-        $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') :  'gd_place';
231
-        $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt;
232
-        foreach ($cat_terms as $cat_term):
230
+		$geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') :  'gd_place';
231
+		$post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt;
232
+		foreach ($cat_terms as $cat_term):
233 233
 
234 234
 
235 235
 
236
-            $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$cat_term->term_id]) ? $geodir_cat_icons[$cat_term->term_id] : '';
236
+			$icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$cat_term->term_id]) ? $geodir_cat_icons[$cat_term->term_id] : '';
237 237
 
238
-            if (!in_array($cat_term->term_id, $exclude_categories)):
239
-                //Secret sauce.  Function calls itself to display child elements, if any
240
-                $checked = 'checked="checked"';
238
+			if (!in_array($cat_term->term_id, $exclude_categories)):
239
+				//Secret sauce.  Function calls itself to display child elements, if any
240
+				$checked = 'checked="checked"';
241 241
 
242
-                // Untick the category by default on home map
243
-                if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
244
-                    if (function_exists('icl_object_id')) { // if WPML
245
-                        global $sitepress;
246
-                        $default_lang = $sitepress->get_default_language();
247
-                        $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang);
248
-                    }else{
249
-                        $term_id = $cat_term->term_id;
250
-                    }
251
-                    if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) {
252
-                        $checked = '';
253
-                    }
254
-                }
242
+				// Untick the category by default on home map
243
+				if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
244
+					if (function_exists('icl_object_id')) { // if WPML
245
+						global $sitepress;
246
+						$default_lang = $sitepress->get_default_language();
247
+						$term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang);
248
+					}else{
249
+						$term_id = $cat_term->term_id;
250
+					}
251
+					if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) {
252
+						$checked = '';
253
+					}
254
+				}
255 255
 
256
-                $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
257
-                $term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
258
-                $term_check .= '  title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">';
259
-                $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
260
-                $out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>';
256
+				$term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
257
+				$term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
258
+				$term_check .= '  title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">';
259
+				$term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
260
+				$out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>';
261 261
 
262
-            endif;
262
+			endif;
263 263
 
264 264
 
265
-            // get sub category by recursion
266
-            $out .= home_map_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading, $map_canvas_name, $child_collapse, $is_home_map);
265
+			// get sub category by recursion
266
+			$out .= home_map_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading, $map_canvas_name, $child_collapse, $is_home_map);
267 267
 
268
-            $out .= '</li>';
268
+			$out .= '</li>';
269 269
 
270
-        endforeach;
270
+		endforeach;
271 271
 
272
-        $out .= '</ul>';
272
+		$out .= '</ul>';
273 273
 
274
-        return $out;
275
-    } else {
276
-        if ($cat_parent == 0)
277
-            return _e('No category', 'geodirectory');
278
-    }
279
-    return;
274
+		return $out;
275
+	} else {
276
+		if ($cat_parent == 0)
277
+			return _e('No category', 'geodirectory');
278
+	}
279
+	return;
280 280
 }
281 281
 
282 282
 /**
@@ -288,19 +288,19 @@  discard block
 block discarded – undo
288 288
  * @return string The map API provider name.
289 289
  */
290 290
 function geodir_map_name() {
291
-    $geodir_map_name = get_option('geodir_load_map', 'google');
291
+	$geodir_map_name = get_option('geodir_load_map', 'google');
292 292
     
293
-    if (!in_array($geodir_map_name, array('none', 'auto', 'google', 'osm'))) {
294
-        $geodir_map_name = 'auto';
295
-    }
296
-
297
-    /**
298
-     * Filter the map JS API provider name.
299
-     *
300
-     * @since 1.6.1
301
-     * @param string $geodir_map_name The map API provider name.
302
-     */
303
-    return apply_filters('geodir_map_name', $geodir_map_name);
293
+	if (!in_array($geodir_map_name, array('none', 'auto', 'google', 'osm'))) {
294
+		$geodir_map_name = 'auto';
295
+	}
296
+
297
+	/**
298
+	 * Filter the map JS API provider name.
299
+	 *
300
+	 * @since 1.6.1
301
+	 * @param string $geodir_map_name The map API provider name.
302
+	 */
303
+	return apply_filters('geodir_map_name', $geodir_map_name);
304 304
 }
305 305
 
306 306
 /**
@@ -316,48 +316,48 @@  discard block
 block discarded – undo
316 316
  * @return array The icon size.
317 317
  */
318 318
 function geodir_get_marker_size($icon, $default_size = array('w' => 36, 'h' => 45)) {
319
-    global $gd_marker_sizes;
319
+	global $gd_marker_sizes;
320 320
     
321
-    if (empty($gd_marker_sizes)) {
322
-        $gd_marker_sizes = array();
323
-    }
321
+	if (empty($gd_marker_sizes)) {
322
+		$gd_marker_sizes = array();
323
+	}
324 324
       
325
-    if (!empty($gd_marker_sizes[$icon])) {
326
-        return $gd_marker_sizes[$icon];
327
-    }
325
+	if (!empty($gd_marker_sizes[$icon])) {
326
+		return $gd_marker_sizes[$icon];
327
+	}
328 328
     
329
-    if (empty($icon)) {
330
-        $gd_marker_sizes[$icon] = $default_size;
329
+	if (empty($icon)) {
330
+		$gd_marker_sizes[$icon] = $default_size;
331 331
         
332
-        return $default_size;
333
-    }
332
+		return $default_size;
333
+	}
334 334
     
335
-    $icon_url = $icon;
335
+	$icon_url = $icon;
336 336
     
337
-    $uploads = wp_upload_dir(); // Array of key => value pairs
337
+	$uploads = wp_upload_dir(); // Array of key => value pairs
338 338
       
339
-    if (!path_is_absolute($icon)) {
340
-        $icon = str_replace($uploads['baseurl'], $uploads['basedir'], $icon);
341
-    }
339
+	if (!path_is_absolute($icon)) {
340
+		$icon = str_replace($uploads['baseurl'], $uploads['basedir'], $icon);
341
+	}
342 342
     
343
-    if (!path_is_absolute($icon) && strpos($icon, WP_CONTENT_URL) !== false) {
344
-        $icon = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $icon);
345
-    }
343
+	if (!path_is_absolute($icon) && strpos($icon, WP_CONTENT_URL) !== false) {
344
+		$icon = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $icon);
345
+	}
346 346
     
347
-    $sizes = array();
348
-    if (is_file($icon) && file_exists($icon)) {
349
-        $size = getimagesize(trim($icon));
347
+	$sizes = array();
348
+	if (is_file($icon) && file_exists($icon)) {
349
+		$size = getimagesize(trim($icon));
350 350
         
351
-        if (!empty($size[0]) && !empty($size[1])) {
352
-            $sizes = array('w' => $size[0], 'h' => $size[1]);
353
-        }
354
-    }
351
+		if (!empty($size[0]) && !empty($size[1])) {
352
+			$sizes = array('w' => $size[0], 'h' => $size[1]);
353
+		}
354
+	}
355 355
     
356
-    $sizes = !empty($sizes) ? $sizes : $default_size;
356
+	$sizes = !empty($sizes) ? $sizes : $default_size;
357 357
     
358
-    $gd_marker_sizes[$icon_url] = $sizes;
358
+	$gd_marker_sizes[$icon_url] = $sizes;
359 359
     
360
-    return $sizes;
360
+	return $sizes;
361 361
 }
362 362
 
363 363
 add_action('wp_footer', 'geodir_map_load_script', 10);
@@ -369,8 +369,8 @@  discard block
 block discarded – undo
369 369
  * @package GeoDirectory
370 370
  */
371 371
 function geodir_map_load_script() {
372
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
373
-        $plugin_url = geodir_plugin_url();
372
+	if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
373
+		$plugin_url = geodir_plugin_url();
374 374
 ?>
375 375
 <script type="text/javascript">
376 376
 if (!(window.google && typeof google.maps !== 'undefined')) {
@@ -384,5 +384,5 @@  discard block
 block discarded – undo
384 384
 }
385 385
 </script>
386 386
 <?php
387
-    }
387
+	}
388 388
 }
389 389
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') {
56 56
 
57
-        if(isset($map_jason[$post->ID])){return null;}
57
+        if (isset($map_jason[$post->ID])) {return null; }
58 58
 
59 59
         $srcharr = array("'", "/", "-", '"', '\\');
60 60
         $replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $title = str_replace($srcharr, $replarr, $post_title);
68 68
 
69 69
         if (is_ssl()) {
70
-            $icon = str_replace("http:","https:",$icon );
70
+            $icon = str_replace("http:", "https:", $icon);
71 71
         }
72 72
         
73 73
         if ($icon != '') {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $icon_size = array('w' => 36, 'h' => 45);
84 84
         }
85 85
 
86
-        $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
86
+        $post_json = '{"id":"'.$post->ID.'","t": "'.$title.'","lt": "'.$post->post_latitude.'","ln": "'.$post->post_longitude.'","mk_id":"'.$post->ID.'_'.$post->default_category.'","i":"'.$icon.'","w":"'.$icon_size['w'].'","h":"'.$icon_size['h'].'"}';
87 87
 
88 88
         /**
89 89
          * Filter the json data when creating output for post json marker..
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
          * @param string $post_json JSON representation of the post marker info.
93 93
          * @param object $post The post object.
94 94
          */
95
-        $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
95
+        $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts', $post_json, $post);
96 96
     }
97 97
 }
98 98
 
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
             if (is_array($map_jason) && !empty($map_jason)) {
114 114
 
115 115
                 // on details page only show the main marker on the map
116
-                if(geodir_is_page('detail')){
116
+                if (geodir_is_page('detail')) {
117 117
                     global $post;
118
-                    if(isset($map_jason[$post->ID])){
118
+                    if (isset($map_jason[$post->ID])) {
119 119
                         $map_jason = array($map_jason[$post->ID]);
120 120
                     }
121 121
                 }
122
-                $canvas_jason = $canvas . "_jason";
122
+                $canvas_jason = $canvas."_jason";
123 123
                 $map_canvas_arr[$canvas] = array_unique($map_jason);
124 124
                 unset($cat_content_info);
125 125
                 $cat_content_info[] = implode(',', $map_canvas_arr[$canvas]);
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
                 if (!empty($cat_content_info)) {
128 128
                     $json_content = substr(implode(',', $cat_content_info), 1);
129 129
                     $json_content = htmlentities($json_content, ENT_QUOTES, get_option('blog_charset')); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016
130
-                    $canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']';
130
+                    $canvas_jason = '[{"totalcount":"'.$totalcount.'",'.$json_content.']';
131 131
                 } else {
132 132
                     $canvas_jason = '[{"totalcount":"0"}]';
133 133
                 }
134
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
134
+                $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason);
135 135
 
136 136
                 /**
137 137
                  * Filter the send_marker_jason_to_js() function map canvas json args.
@@ -143,12 +143,12 @@  discard block
 block discarded – undo
143 143
                  * @param string $canvas Map canvas array key.
144 144
                  * @param array $map_canvas_jason_args Map canvas args.
145 145
                  */
146
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
146
+                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args);
147 147
 
148
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
148
+                wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args);
149 149
             } else {
150 150
                 $canvas_jason = '[{"totalcount":"0"}]';
151
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
151
+                $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason);
152 152
 
153 153
                 /**
154 154
                  * Filter the send_marker_jason_to_js() function map canvas json args.
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
                  * @param string $canvas Map canvas array key.
161 161
                  * @param array $map_canvas_jason_args Map canvas args.
162 162
                  */
163
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
164
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
163
+                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args);
164
+                wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args);
165 165
             }
166 166
         }
167 167
 
@@ -223,11 +223,11 @@  discard block
 block discarded – undo
223 223
         }
224 224
 
225 225
 
226
-        $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
226
+        $out = '<ul class="treeview '.$list_class.'" style="margin-left:'.$p.'px;'.$display.';">';
227 227
 
228 228
         $geodir_cat_icons = geodir_get_term_icon();
229 229
 
230
-        $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') :  'gd_place';
230
+        $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') : 'gd_place';
231 231
         $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt;
232 232
         foreach ($cat_terms as $cat_term):
233 233
 
@@ -245,19 +245,19 @@  discard block
 block discarded – undo
245 245
                         global $sitepress;
246 246
                         $default_lang = $sitepress->get_default_language();
247 247
                         $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang);
248
-                    }else{
248
+                    } else {
249 249
                         $term_id = $cat_term->term_id;
250 250
                     }
251
-                    if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) {
251
+                    if (!empty($geodir_home_map_untick) && in_array($post_type.'_'.$term_id, $geodir_home_map_untick)) {
252 252
                         $checked = '';
253 253
                     }
254 254
                 }
255 255
 
256
-                $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
257
-                $term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
258
-                $term_check .= '  title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">';
259
-                $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
260
-                $out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>';
256
+                $term_check = '<input type="checkbox" '.$checked.' id="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'" class="group_selector '.$main_list_class.'"';
257
+                $term_check .= ' name="'.$map_canvas_name.'_cat[]" ';
258
+                $term_check .= '  title="'.esc_attr(ucfirst($cat_term->name)).'" value="'.$cat_term->term_id.'" onclick="javascript:build_map_ajax_search_param(\''.$map_canvas_name.'\',false, this)">';
259
+                $term_img = '<img height="15" width="15" alt="'.$cat_term->taxonomy.'" src="'.$icon.'" title="'.ucfirst($cat_term->name).'"/>';
260
+                $out .= '<li>'.$term_check.'<label for="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'">'.$term_img.ucfirst($cat_term->name).'</label><i class="fa fa-long-arrow-down"></i>';
261 261
 
262 262
             endif;
263 263
 
@@ -369,18 +369,18 @@  discard block
 block discarded – undo
369 369
  * @package GeoDirectory
370 370
  */
371 371
 function geodir_map_load_script() {
372
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
372
+    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is('geodirectory-googlemap-script', 'done')) {
373 373
         $plugin_url = geodir_plugin_url();
374 374
 ?>
375 375
 <script type="text/javascript">
376 376
 if (!(window.google && typeof google.maps !== 'undefined')) {
377
-    var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-style-css");css.setAttribute("href","<?php echo $plugin_url;?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION;?>");
377
+    var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-style-css");css.setAttribute("href","<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION; ?>");
378 378
     document.getElementsByTagName("head")[0].appendChild(css);
379
-    var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-routing-style");css.setAttribute("href","<?php echo $plugin_url;?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css?ver=<?php echo GEODIRECTORY_VERSION;?>");
379
+    var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-routing-style");css.setAttribute("href","<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css?ver=<?php echo GEODIRECTORY_VERSION; ?>");
380 380
     document.getElementsByTagName("head")[0].appendChild(css);
381
-    document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo $plugin_url;?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
382
-    document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo $plugin_url;?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
383
-    document.write('<' + 'script id="geodirectory-leaflet-routing-script" src="<?php echo $plugin_url;?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
381
+    document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
382
+    document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
383
+    document.write('<' + 'script id="geodirectory-leaflet-routing-script" src="<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
384 384
 }
385 385
 </script>
386 386
 <?php
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                         global $sitepress;
246 246
                         $default_lang = $sitepress->get_default_language();
247 247
                         $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang);
248
-                    }else{
248
+                    } else{
249 249
                         $term_id = $cat_term->term_id;
250 250
                     }
251 251
                     if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) {
@@ -273,8 +273,9 @@  discard block
 block discarded – undo
273 273
 
274 274
         return $out;
275 275
     } else {
276
-        if ($cat_parent == 0)
277
-            return _e('No category', 'geodirectory');
276
+        if ($cat_parent == 0) {
277
+                    return _e('No category', 'geodirectory');
278
+        }
278 279
     }
279 280
     return;
280 281
 }
Please login to merge, or discard this patch.
geodirectory-functions/ajax_handler_functions.php 3 patches
Braces   +27 added lines, -20 removed lines patch added patch discarded remove patch
@@ -126,10 +126,11 @@  discard block
 block discarded – undo
126 126
     }
127 127
 
128 128
     if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'category_ajax') {
129
-        if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude']))
130
-            geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']);
131
-        else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax']))
132
-            geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']);
129
+        if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude'])) {
130
+                    geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']);
131
+        } else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax'])) {
132
+                    geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']);
133
+        }
133 134
     }
134 135
 
135 136
     if ((isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'admin_ajax') || isset($_REQUEST['create_field']) || isset($_REQUEST['sort_create_field'])) {
@@ -151,11 +152,12 @@  discard block
 block discarded – undo
151 152
         if (current_user_can('manage_options')) {
152 153
             switch ($_REQUEST['geodir_autofill']):
153 154
                 case "geodir_dummy_delete" :
154
-                    if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
155
-                        return;
155
+                    if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) {
156
+                                            return;
157
+                    }
156 158
 
157
-                    if (isset($_REQUEST['posttype']))
158
-                        /**
159
+                    if (isset($_REQUEST['posttype'])) {
160
+                                            /**
159 161
                          * Used to delete the dummy post data per post type.
160 162
                          *
161 163
                          * Uses dynamic hook, geodir_delete_dummy_posts_$_REQUEST['posttype'].
@@ -164,11 +166,13 @@  discard block
 block discarded – undo
164 166
                          * @param string $posttype The post type to insert.
165 167
                          * @param string $datatype The type of dummy data to insert.
166 168
                          */
167
-                        do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype']));
169
+                        do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype']));
170
+                    }
168 171
                     break;
169 172
                 case "geodir_dummy_insert" :
170
-                    if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
171
-                        return;
173
+                    if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) {
174
+                                            return;
175
+                    }
172 176
 
173 177
                     global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2;
174 178
                     $city_bound_lat1 = $_REQUEST['city_bound_lat1'];
@@ -267,8 +271,9 @@  discard block
 block discarded – undo
267 271
                         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
268 272
                             $redirect_to = get_permalink(geodir_add_listing_page_id());
269 273
                             $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false);
270
-                        } else
271
-                            $redirect_to = get_permalink(geodir_add_listing_page_id());
274
+                        } else {
275
+                                                    $redirect_to = get_permalink(geodir_add_listing_page_id());
276
+                        }
272 277
 
273 278
                         wp_redirect($redirect_to);
274 279
                     } else {
@@ -281,9 +286,9 @@  discard block
 block discarded – undo
281 286
 
282 287
                     $gd_session->un_set('listing');
283 288
 
284
-                    if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid']))
285
-                        wp_redirect(get_permalink($_REQUEST['pid']));
286
-                    else {
289
+                    if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) {
290
+                                            wp_redirect(get_permalink($_REQUEST['pid']));
291
+                    } else {
287 292
                         geodir_remove_temp_images();
288 293
                         wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type'])));
289 294
                     }
@@ -311,8 +316,9 @@  discard block
 block discarded – undo
311 316
                             } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
312 317
                                 $redirect_to = get_permalink(geodir_add_listing_page_id());
313 318
                                 $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false);
314
-                            } else
315
-                                $redirect_to = get_permalink(geodir_add_listing_page_id());
319
+                            } else {
320
+                                                            $redirect_to = get_permalink(geodir_add_listing_page_id());
321
+                            }
316 322
 
317 323
                             $gd_session->un_set('listing');
318 324
                             wp_redirect($redirect_to);
@@ -333,8 +339,9 @@  discard block
 block discarded – undo
333 339
                             $lastid = wp_delete_post($_REQUEST['pid']);
334 340
                         }
335 341
 
336
-                        if ($lastid && !is_wp_error($lastid))
337
-                            wp_redirect($_SERVER['HTTP_REFERER']);
342
+                        if ($lastid && !is_wp_error($lastid)) {
343
+                                                    wp_redirect($_SERVER['HTTP_REFERER']);
344
+                        }
338 345
 
339 346
                         //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) );
340 347
                     }
Please login to merge, or discard this patch.
Indentation   +305 added lines, -305 removed lines patch added patch discarded remove patch
@@ -16,22 +16,22 @@  discard block
 block discarded – undo
16 16
  */
17 17
 function geodir_on_wp_loaded()
18 18
 {
19
-    /**
20
-     * Called on the wp_loaded WP hook and used to send the send inquiry and send to friend forms.
21
-     *
22
-     * @since 1.0.0
23
-     */
24
-    do_action('giodir_handle_request_plugins_loaded');
25
-    global $wpdb;
19
+	/**
20
+	 * Called on the wp_loaded WP hook and used to send the send inquiry and send to friend forms.
21
+	 *
22
+	 * @since 1.0.0
23
+	 */
24
+	do_action('giodir_handle_request_plugins_loaded');
25
+	global $wpdb;
26 26
 
27 27
 
28
-    if (isset($_POST['sendact']) && $_POST['sendact'] == 'send_inqury') {
29
-        geodir_send_inquiry($_REQUEST); // function in custom_functions.php
28
+	if (isset($_POST['sendact']) && $_POST['sendact'] == 'send_inqury') {
29
+		geodir_send_inquiry($_REQUEST); // function in custom_functions.php
30 30
 
31
-    } elseif (isset($_POST['sendact']) && $_POST['sendact'] == 'email_frnd') {
32
-        geodir_send_friend($_REQUEST); // function in custom_functions.php
31
+	} elseif (isset($_POST['sendact']) && $_POST['sendact'] == 'email_frnd') {
32
+		geodir_send_friend($_REQUEST); // function in custom_functions.php
33 33
 
34
-    }
34
+	}
35 35
 
36 36
 }
37 37
 
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
  */
45 45
 function geodir_on_wp()
46 46
 {
47
-    if(geodir_is_page('login')) {
48
-        geodir_user_signup();
49
-    }
47
+	if(geodir_is_page('login')) {
48
+		geodir_user_signup();
49
+	}
50 50
 
51 51
 }
52 52
 
@@ -59,32 +59,32 @@  discard block
 block discarded – undo
59 59
  */
60 60
 function geodir_on_init()
61 61
 {
62
-    /**
63
-     * Called on the wp_init WP hook at the start of the geodir_on_init() function.
64
-     *
65
-     * @since 1.0.0
66
-     */
67
-    do_action('giodir_handle_request');
68
-    global $wpdb;
62
+	/**
63
+	 * Called on the wp_init WP hook at the start of the geodir_on_init() function.
64
+	 *
65
+	 * @since 1.0.0
66
+	 */
67
+	do_action('giodir_handle_request');
68
+	global $wpdb;
69 69
 
70 70
 
71 71
 
72 72
 
73
-    if (get_option('geodir_allow_wpadmin') == '0' && is_user_logged_in() && !current_user_can('manage_options') && !class_exists('BuddyPress')) {
74
-        show_admin_bar(false);
75
-    }
73
+	if (get_option('geodir_allow_wpadmin') == '0' && is_user_logged_in() && !current_user_can('manage_options') && !class_exists('BuddyPress')) {
74
+		show_admin_bar(false);
75
+	}
76 76
 
77 77
 
78
-    if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'get_markers') {
79
-        /**
80
-         * Contains map marker functions.
81
-         *
82
-         * @since 1.0.0
83
-         * @package GeoDirectory
84
-         */
85
-        include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php');
86
-        die;
87
-    }
78
+	if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'get_markers') {
79
+		/**
80
+		 * Contains map marker functions.
81
+		 *
82
+		 * @since 1.0.0
83
+		 * @package GeoDirectory
84
+		 */
85
+		include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php');
86
+		die;
87
+	}
88 88
 
89 89
 
90 90
 
@@ -104,289 +104,289 @@  discard block
 block discarded – undo
104 104
  * @todo check if nonce is required here and if so add one.
105 105
  */
106 106
 function geodir_ajax_handler() {
107
-    global $wpdb, $gd_session,$post;
107
+	global $wpdb, $gd_session,$post;
108 108
 
109
-    if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') {
109
+	if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') {
110 110
 		$gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']);
111
-        echo '1';
112
-    }
113
-
114
-    if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'category_ajax') {
115
-        if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude']))
116
-            geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']);
117
-        else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax']))
118
-            geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']);
119
-    }
120
-
121
-    if ((isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'admin_ajax') || isset($_REQUEST['create_field']) || isset($_REQUEST['sort_create_field'])) {
122
-        if (current_user_can('manage_options')) {
123
-            /**
124
-             * Contains admin ajax handling functions.
125
-             *
126
-             * @since 1.0.0
127
-             * @package GeoDirectory
128
-             */
129
-            include_once(geodir_plugin_path() . '/geodirectory-admin/geodir_admin_ajax.php');
130
-        } else {
131
-            wp_redirect(geodir_login_url());
132
-            gd_die();
133
-        }
134
-    }
135
-
136
-    if (isset($_REQUEST['geodir_autofill']) && $_REQUEST['geodir_autofill'] != '' && isset($_REQUEST['_wpnonce'])) {
137
-        if (current_user_can('manage_options')) {
138
-            switch ($_REQUEST['geodir_autofill']):
139
-                case "geodir_dummy_delete" :
140
-                    if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
141
-                        return;
142
-
143
-                    if (isset($_REQUEST['posttype']))
144
-                        /**
145
-                         * Used to delete the dummy post data per post type.
146
-                         *
147
-                         * Uses dynamic hook, geodir_delete_dummy_posts_$_REQUEST['posttype'].
148
-                         *
149
-                         * @since 1.6.11
150
-                         * @param string $posttype The post type to insert.
151
-                         * @param string $datatype The type of dummy data to insert.
152
-                         */
153
-                        do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype']));
154
-                    break;
155
-                case "geodir_dummy_insert" :
156
-                    if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
157
-                        return;
158
-
159
-                    global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2;
160
-                    $city_bound_lat1 = $_REQUEST['city_bound_lat1'];
161
-                    $city_bound_lng1 = $_REQUEST['city_bound_lng1'];
162
-                    $city_bound_lat2 = $_REQUEST['city_bound_lat2'];
163
-                    $city_bound_lng2 = $_REQUEST['city_bound_lng2'];
164
-
165
-                    if (isset($_REQUEST['posttype'])){
166
-                        /**
167
-                         * Used to insert the dummy post data per post type.
168
-                         *
169
-                         * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype'].
170
-                         *
171
-                         * @since 1.6.11
172
-                         * @param string $posttype The post type to insert.
173
-                         * @param string $datatype The type of dummy data to insert.
174
-                         * @param int $post_index The item number to insert.
175
-                         */
176
-                        do_action('geodir_insert_dummy_posts',sanitize_key($_REQUEST['posttype']),sanitize_key($_REQUEST['datatype']),absint($_REQUEST['insert_dummy_post_index']));
177
-                    }
178
-
179
-
180
-                    break;
181
-            endswitch;
182
-        } else {
183
-            wp_redirect(geodir_login_url());
184
-            exit();
185
-        }
186
-    }
187
-
188
-    if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') {
189
-
190
-        if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') {
191
-            $template = locate_template(array("geodirectory/popup-forms.php"));
192
-            if (!$template) {
193
-                $template = geodir_plugin_path() . '/geodirectory-templates/popup-forms.php';
194
-            }
195
-            require_once($template);
196
-        }
197
-
198
-        gd_die();
199
-    }
200
-
201
-    /*if(isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'filter_ajax'){
111
+		echo '1';
112
+	}
113
+
114
+	if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'category_ajax') {
115
+		if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude']))
116
+			geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']);
117
+		else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax']))
118
+			geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']);
119
+	}
120
+
121
+	if ((isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'admin_ajax') || isset($_REQUEST['create_field']) || isset($_REQUEST['sort_create_field'])) {
122
+		if (current_user_can('manage_options')) {
123
+			/**
124
+			 * Contains admin ajax handling functions.
125
+			 *
126
+			 * @since 1.0.0
127
+			 * @package GeoDirectory
128
+			 */
129
+			include_once(geodir_plugin_path() . '/geodirectory-admin/geodir_admin_ajax.php');
130
+		} else {
131
+			wp_redirect(geodir_login_url());
132
+			gd_die();
133
+		}
134
+	}
135
+
136
+	if (isset($_REQUEST['geodir_autofill']) && $_REQUEST['geodir_autofill'] != '' && isset($_REQUEST['_wpnonce'])) {
137
+		if (current_user_can('manage_options')) {
138
+			switch ($_REQUEST['geodir_autofill']):
139
+				case "geodir_dummy_delete" :
140
+					if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
141
+						return;
142
+
143
+					if (isset($_REQUEST['posttype']))
144
+						/**
145
+						 * Used to delete the dummy post data per post type.
146
+						 *
147
+						 * Uses dynamic hook, geodir_delete_dummy_posts_$_REQUEST['posttype'].
148
+						 *
149
+						 * @since 1.6.11
150
+						 * @param string $posttype The post type to insert.
151
+						 * @param string $datatype The type of dummy data to insert.
152
+						 */
153
+						do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype']));
154
+					break;
155
+				case "geodir_dummy_insert" :
156
+					if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
157
+						return;
158
+
159
+					global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2;
160
+					$city_bound_lat1 = $_REQUEST['city_bound_lat1'];
161
+					$city_bound_lng1 = $_REQUEST['city_bound_lng1'];
162
+					$city_bound_lat2 = $_REQUEST['city_bound_lat2'];
163
+					$city_bound_lng2 = $_REQUEST['city_bound_lng2'];
164
+
165
+					if (isset($_REQUEST['posttype'])){
166
+						/**
167
+						 * Used to insert the dummy post data per post type.
168
+						 *
169
+						 * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype'].
170
+						 *
171
+						 * @since 1.6.11
172
+						 * @param string $posttype The post type to insert.
173
+						 * @param string $datatype The type of dummy data to insert.
174
+						 * @param int $post_index The item number to insert.
175
+						 */
176
+						do_action('geodir_insert_dummy_posts',sanitize_key($_REQUEST['posttype']),sanitize_key($_REQUEST['datatype']),absint($_REQUEST['insert_dummy_post_index']));
177
+					}
178
+
179
+
180
+					break;
181
+			endswitch;
182
+		} else {
183
+			wp_redirect(geodir_login_url());
184
+			exit();
185
+		}
186
+	}
187
+
188
+	if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') {
189
+
190
+		if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') {
191
+			$template = locate_template(array("geodirectory/popup-forms.php"));
192
+			if (!$template) {
193
+				$template = geodir_plugin_path() . '/geodirectory-templates/popup-forms.php';
194
+			}
195
+			require_once($template);
196
+		}
197
+
198
+		gd_die();
199
+	}
200
+
201
+	/*if(isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'filter_ajax'){
202 202
         include_once ( geodir_plugin_path() . '/geodirectory-templates/advance-search-form.php');
203 203
     }*/
204 204
 
205
-    if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'map_ajax') {
206
-        /**
207
-         * Contains map marker functions.
208
-         *
209
-         * @since 1.0.0
210
-         * @package GeoDirectory
211
-         */
212
-        include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php');
213
-    }
214
-
215
-    if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') {
216
-        if (is_user_logged_in()) {
217
-            switch ($_REQUEST['ajax_action']):
218
-                case "add" :
219
-                    geodir_add_to_favorite((int)$_REQUEST['pid']);
220
-                    break;
221
-                case "remove" :
222
-                    geodir_remove_from_favorite((int)$_REQUEST['pid']);
223
-                    break;
224
-            endswitch;
225
-        } else {
226
-            wp_redirect(geodir_login_url());
227
-            exit();
228
-        }
229
-    }
230
-
231
-    if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'add_listing') {
232
-
233
-        $is_current_user_owner = true;
234
-        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
235
-            $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']);
236
-        }
237
-
238
-        $request = $gd_session->get('listing');
239
-
240
-        if (is_user_logged_in() && $is_current_user_owner) {
241
-
242
-            switch ($_REQUEST['ajax_action']):
243
-                case "add":
244
-                case "update":
245
-
246
-                    if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') {
247
-                        $last_id = geodir_save_listing();
248
-
249
-                        if ($last_id) {
250
-                            //$redirect_to = get_permalink( $last_id );
251
-                            $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id));
252
-
253
-                        } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
254
-                            $redirect_to = get_permalink(geodir_add_listing_page_id());
255
-                            $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false);
256
-                        } else
257
-                            $redirect_to = get_permalink(geodir_add_listing_page_id());
258
-
259
-                        wp_redirect($redirect_to);
260
-                    } else {
261
-                        $gd_session->un_set('listing');
262
-                        wp_redirect(home_url());
263
-                    }
264
-
265
-                    break;
266
-                case "cancel" :
267
-
268
-                    $gd_session->un_set('listing');
269
-
270
-                    if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid']))
271
-                        wp_redirect(get_permalink($_REQUEST['pid']));
272
-                    else {
273
-                        geodir_remove_temp_images();
274
-                        wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type'])));
275
-                    }
276
-
277
-                    break;
278
-
279
-                case "publish" :
280
-
281
-                    if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') {
282
-
283
-                        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
284
-                            $new_post = array();
285
-                            $new_post['ID'] = $_REQUEST['pid'];
286
-
287
-                            $lastid = wp_update_post($new_post);
288
-
289
-                            $gd_session->un_set('listing');
290
-                            wp_redirect(get_permalink($lastid));
291
-                        } else {
292
-                            $last_id = geodir_save_listing();
293
-
294
-                            if ($last_id) {
295
-                                //$redirect_to = get_permalink( $last_id );
296
-                                $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id));
297
-                            } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
298
-                                $redirect_to = get_permalink(geodir_add_listing_page_id());
299
-                                $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false);
300
-                            } else
301
-                                $redirect_to = get_permalink(geodir_add_listing_page_id());
302
-
303
-                            $gd_session->un_set('listing');
304
-                            wp_redirect($redirect_to);
305
-                        }
306
-                    } else {
307
-                        $gd_session->un_set('listing');
308
-                        wp_redirect(home_url());
309
-                    }
310
-
311
-                    break;
312
-                case "delete" :
313
-                    if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
314
-                        global $current_user;
315
-
316
-                        if (get_option('geodir_disable_perm_delete')) {
317
-                            $lastid = wp_trash_post($_REQUEST['pid']);
318
-                        } else {
319
-                            $lastid = wp_delete_post($_REQUEST['pid']);
320
-                        }
321
-
322
-                        if ($lastid && !is_wp_error($lastid))
323
-                            wp_redirect($_SERVER['HTTP_REFERER']);
324
-
325
-                        //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) );
326
-                    }
327
-                    break;
328
-            endswitch;
329
-
330
-            $gd_session->un_set('listing');
331
-        } else {
332
-            $gd_session->un_set('listing');
333
-            wp_redirect(geodir_login_url());
334
-            exit();
335
-        }
336
-    }
337
-
338
-    if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'user_login') {
339
-        /**
340
-         * Contains registration and login functions.
341
-         * @todo Fix the file path.
342
-         *
343
-         * @since 1.0.0
344
-         * @package GeoDirectory
345
-         */
346
-        include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php');
347
-    }
348
-
349
-    if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') {
350
-        $args = array('taxonomy' => sanitize_text_field($_REQUEST['term']));
351
-        if (!empty($_REQUEST['parent_only'])) {
352
-            $args['parent'] = 0;
353
-        }
354
-        $terms_o = get_terms($args);
205
+	if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'map_ajax') {
206
+		/**
207
+		 * Contains map marker functions.
208
+		 *
209
+		 * @since 1.0.0
210
+		 * @package GeoDirectory
211
+		 */
212
+		include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php');
213
+	}
214
+
215
+	if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') {
216
+		if (is_user_logged_in()) {
217
+			switch ($_REQUEST['ajax_action']):
218
+				case "add" :
219
+					geodir_add_to_favorite((int)$_REQUEST['pid']);
220
+					break;
221
+				case "remove" :
222
+					geodir_remove_from_favorite((int)$_REQUEST['pid']);
223
+					break;
224
+			endswitch;
225
+		} else {
226
+			wp_redirect(geodir_login_url());
227
+			exit();
228
+		}
229
+	}
230
+
231
+	if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'add_listing') {
232
+
233
+		$is_current_user_owner = true;
234
+		if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
235
+			$is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']);
236
+		}
237
+
238
+		$request = $gd_session->get('listing');
239
+
240
+		if (is_user_logged_in() && $is_current_user_owner) {
241
+
242
+			switch ($_REQUEST['ajax_action']):
243
+				case "add":
244
+				case "update":
245
+
246
+					if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') {
247
+						$last_id = geodir_save_listing();
248
+
249
+						if ($last_id) {
250
+							//$redirect_to = get_permalink( $last_id );
251
+							$redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id));
252
+
253
+						} elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
254
+							$redirect_to = get_permalink(geodir_add_listing_page_id());
255
+							$redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false);
256
+						} else
257
+							$redirect_to = get_permalink(geodir_add_listing_page_id());
258
+
259
+						wp_redirect($redirect_to);
260
+					} else {
261
+						$gd_session->un_set('listing');
262
+						wp_redirect(home_url());
263
+					}
264
+
265
+					break;
266
+				case "cancel" :
267
+
268
+					$gd_session->un_set('listing');
269
+
270
+					if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid']))
271
+						wp_redirect(get_permalink($_REQUEST['pid']));
272
+					else {
273
+						geodir_remove_temp_images();
274
+						wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type'])));
275
+					}
276
+
277
+					break;
278
+
279
+				case "publish" :
280
+
281
+					if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') {
282
+
283
+						if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
284
+							$new_post = array();
285
+							$new_post['ID'] = $_REQUEST['pid'];
286
+
287
+							$lastid = wp_update_post($new_post);
288
+
289
+							$gd_session->un_set('listing');
290
+							wp_redirect(get_permalink($lastid));
291
+						} else {
292
+							$last_id = geodir_save_listing();
293
+
294
+							if ($last_id) {
295
+								//$redirect_to = get_permalink( $last_id );
296
+								$redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id));
297
+							} elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
298
+								$redirect_to = get_permalink(geodir_add_listing_page_id());
299
+								$redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false);
300
+							} else
301
+								$redirect_to = get_permalink(geodir_add_listing_page_id());
302
+
303
+							$gd_session->un_set('listing');
304
+							wp_redirect($redirect_to);
305
+						}
306
+					} else {
307
+						$gd_session->un_set('listing');
308
+						wp_redirect(home_url());
309
+					}
310
+
311
+					break;
312
+				case "delete" :
313
+					if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
314
+						global $current_user;
315
+
316
+						if (get_option('geodir_disable_perm_delete')) {
317
+							$lastid = wp_trash_post($_REQUEST['pid']);
318
+						} else {
319
+							$lastid = wp_delete_post($_REQUEST['pid']);
320
+						}
321
+
322
+						if ($lastid && !is_wp_error($lastid))
323
+							wp_redirect($_SERVER['HTTP_REFERER']);
324
+
325
+						//wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) );
326
+					}
327
+					break;
328
+			endswitch;
329
+
330
+			$gd_session->un_set('listing');
331
+		} else {
332
+			$gd_session->un_set('listing');
333
+			wp_redirect(geodir_login_url());
334
+			exit();
335
+		}
336
+	}
337
+
338
+	if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'user_login') {
339
+		/**
340
+		 * Contains registration and login functions.
341
+		 * @todo Fix the file path.
342
+		 *
343
+		 * @since 1.0.0
344
+		 * @package GeoDirectory
345
+		 */
346
+		include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php');
347
+	}
348
+
349
+	if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') {
350
+		$args = array('taxonomy' => sanitize_text_field($_REQUEST['term']));
351
+		if (!empty($_REQUEST['parent_only'])) {
352
+			$args['parent'] = 0;
353
+		}
354
+		$terms_o = get_terms($args);
355 355
         
356
-        // Skip terms which has no listing
357
-        if (!empty($terms_o)) {
358
-            $filter_terms = array();
356
+		// Skip terms which has no listing
357
+		if (!empty($terms_o)) {
358
+			$filter_terms = array();
359 359
             
360
-            foreach ($terms_o as $term) {
361
-                if (isset($term->count) && $term->count > 0) {
362
-                    $filter_terms[] = $term;
363
-                }
364
-            }
365
-            $terms_o = $filter_terms;
366
-        }
360
+			foreach ($terms_o as $term) {
361
+				if (isset($term->count) && $term->count > 0) {
362
+					$filter_terms[] = $term;
363
+				}
364
+			}
365
+			$terms_o = $filter_terms;
366
+		}
367 367
         
368
-        $terms = geodir_sort_terms($terms_o, 'count');
369
-        geodir_helper_cat_list_output($terms, intval($_REQUEST['limit']));
370
-        exit();
371
-    }
368
+		$terms = geodir_sort_terms($terms_o, 'count');
369
+		geodir_helper_cat_list_output($terms, intval($_REQUEST['limit']));
370
+		exit();
371
+	}
372 372
 
373
-    gd_die();
373
+	gd_die();
374 374
 }
375 375
 
376 376
 
377 377
 function geodir_show_ga_stats(){
378
-    if (isset($_REQUEST['ga_start'])) {
379
-        $ga_start = $_REQUEST['ga_start'];
380
-    } else {
381
-        $ga_start = '';
382
-    }
383
-    if (isset($_REQUEST['ga_end'])) {
384
-        $ga_end = $_REQUEST['ga_end'];
385
-    } else {
386
-        $ga_end = '';
387
-    }
388
-    geodir_getGoogleAnalytics($_REQUEST['ga_page'], $ga_start, $ga_end);
389
-    die;
378
+	if (isset($_REQUEST['ga_start'])) {
379
+		$ga_start = $_REQUEST['ga_start'];
380
+	} else {
381
+		$ga_start = '';
382
+	}
383
+	if (isset($_REQUEST['ga_end'])) {
384
+		$ga_end = $_REQUEST['ga_end'];
385
+	} else {
386
+		$ga_end = '';
387
+	}
388
+	geodir_getGoogleAnalytics($_REQUEST['ga_page'], $ga_start, $ga_end);
389
+	die;
390 390
 }
391 391
 add_action( 'wp_ajax_gdga', 'geodir_show_ga_stats' );
392 392
 add_action( 'wp_ajax_nopriv_gdga', 'geodir_show_ga_stats' );
393 393
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  */
45 45
 function geodir_on_wp()
46 46
 {
47
-    if(geodir_is_page('login')) {
47
+    if (geodir_is_page('login')) {
48 48
         geodir_user_signup();
49 49
     }
50 50
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
          * @since 1.0.0
83 83
          * @package GeoDirectory
84 84
          */
85
-        include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php');
85
+        include_once(geodir_plugin_path().'/geodirectory-functions/map-functions/get_markers.php');
86 86
         die;
87 87
     }
88 88
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
  * @todo check if nonce is required here and if so add one.
105 105
  */
106 106
 function geodir_ajax_handler() {
107
-    global $wpdb, $gd_session,$post;
107
+    global $wpdb, $gd_session, $post;
108 108
 
109 109
     if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') {
110 110
 		$gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
              * @since 1.0.0
127 127
              * @package GeoDirectory
128 128
              */
129
-            include_once(geodir_plugin_path() . '/geodirectory-admin/geodir_admin_ajax.php');
129
+            include_once(geodir_plugin_path().'/geodirectory-admin/geodir_admin_ajax.php');
130 130
         } else {
131 131
             wp_redirect(geodir_login_url());
132 132
             gd_die();
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                          * @param string $posttype The post type to insert.
151 151
                          * @param string $datatype The type of dummy data to insert.
152 152
                          */
153
-                        do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype']));
153
+                        do_action('geodir_delete_dummy_posts', sanitize_key($_REQUEST['posttype']), sanitize_key(['datatype']));
154 154
                     break;
155 155
                 case "geodir_dummy_insert" :
156 156
                     if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename'))
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     $city_bound_lat2 = $_REQUEST['city_bound_lat2'];
163 163
                     $city_bound_lng2 = $_REQUEST['city_bound_lng2'];
164 164
 
165
-                    if (isset($_REQUEST['posttype'])){
165
+                    if (isset($_REQUEST['posttype'])) {
166 166
                         /**
167 167
                          * Used to insert the dummy post data per post type.
168 168
                          *
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                          * @param string $datatype The type of dummy data to insert.
174 174
                          * @param int $post_index The item number to insert.
175 175
                          */
176
-                        do_action('geodir_insert_dummy_posts',sanitize_key($_REQUEST['posttype']),sanitize_key($_REQUEST['datatype']),absint($_REQUEST['insert_dummy_post_index']));
176
+                        do_action('geodir_insert_dummy_posts', sanitize_key($_REQUEST['posttype']), sanitize_key($_REQUEST['datatype']), absint($_REQUEST['insert_dummy_post_index']));
177 177
                     }
178 178
 
179 179
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') {
191 191
             $template = locate_template(array("geodirectory/popup-forms.php"));
192 192
             if (!$template) {
193
-                $template = geodir_plugin_path() . '/geodirectory-templates/popup-forms.php';
193
+                $template = geodir_plugin_path().'/geodirectory-templates/popup-forms.php';
194 194
             }
195 195
             require_once($template);
196 196
         }
@@ -209,17 +209,17 @@  discard block
 block discarded – undo
209 209
          * @since 1.0.0
210 210
          * @package GeoDirectory
211 211
          */
212
-        include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php');
212
+        include_once(geodir_plugin_path().'/geodirectory-functions/map-functions/get_markers.php');
213 213
     }
214 214
 
215 215
     if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') {
216 216
         if (is_user_logged_in()) {
217 217
             switch ($_REQUEST['ajax_action']):
218 218
                 case "add" :
219
-                    geodir_add_to_favorite((int)$_REQUEST['pid']);
219
+                    geodir_add_to_favorite((int) $_REQUEST['pid']);
220 220
                     break;
221 221
                 case "remove" :
222
-                    geodir_remove_from_favorite((int)$_REQUEST['pid']);
222
+                    geodir_remove_from_favorite((int) $_REQUEST['pid']);
223 223
                     break;
224 224
             endswitch;
225 225
         } else {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         $is_current_user_owner = true;
234 234
         if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
235
-            $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']);
235
+            $is_current_user_owner = geodir_listing_belong_to_current_user((int) $_REQUEST['pid']);
236 236
         }
237 237
 
238 238
         $request = $gd_session->get('listing');
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
          * @since 1.0.0
344 344
          * @package GeoDirectory
345 345
          */
346
-        include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php');
346
+        include_once(geodir_plugin_path().'/geodirectory-functions/geodirectory_reg.php');
347 347
     }
348 348
 
349 349
     if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') {
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 }
375 375
 
376 376
 
377
-function geodir_show_ga_stats(){
377
+function geodir_show_ga_stats() {
378 378
     if (isset($_REQUEST['ga_start'])) {
379 379
         $ga_start = $_REQUEST['ga_start'];
380 380
     } else {
@@ -388,5 +388,5 @@  discard block
 block discarded – undo
388 388
     geodir_getGoogleAnalytics($_REQUEST['ga_page'], $ga_start, $ga_end);
389 389
     die;
390 390
 }
391
-add_action( 'wp_ajax_gdga', 'geodir_show_ga_stats' );
392
-add_action( 'wp_ajax_nopriv_gdga', 'geodir_show_ga_stats' );
393 391
\ No newline at end of file
392
+add_action('wp_ajax_gdga', 'geodir_show_ga_stats');
393
+add_action('wp_ajax_nopriv_gdga', 'geodir_show_ga_stats');
394 394
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-admin/dummy-data/standard_places.php 3 patches
Indentation   +1224 added lines, -1224 removed lines patch added patch discarded remove patch
@@ -12,38 +12,38 @@  discard block
 block discarded – undo
12 12
 $post_meta = array();
13 13
 
14 14
 if($dummy_post_index==1){
15
-    $category_array = array('Attractions', 'Hotels', 'Restaurants', 'Food Nightlife', 'Festival', 'Videos', 'Feature');
16
-    geodir_dummy_data_taxonomies($post_type,$category_array );
17
-    update_option($post_type.'_dummy_data_type','standard_places');
15
+	$category_array = array('Attractions', 'Hotels', 'Restaurants', 'Food Nightlife', 'Festival', 'Videos', 'Feature');
16
+	geodir_dummy_data_taxonomies($post_type,$category_array );
17
+	update_option($post_type.'_dummy_data_type','standard_places');
18 18
 }
19 19
 
20 20
 if (geodir_dummy_folder_exists())
21
-    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
21
+	$dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
22 22
 else
23
-    $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
23
+	$dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
24 24
 
25 25
 $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
26 26
 
27 27
 switch ($dummy_post_index) {
28 28
 
29
-    case(1):
30
-        $image_array[] = "$dummy_image_url/a1.jpg";
31
-        $image_array[] = "$dummy_image_url/a2.jpg";
32
-        $image_array[] = "$dummy_image_url/a3.jpg";
33
-        $image_array[] = "$dummy_image_url/a4.jpg";
34
-        $image_array[] = "$dummy_image_url/a5.jpg";
35
-        $image_array[] = "$dummy_image_url/a6.jpg";
36
-        $image_array[] = "$dummy_image_url/a7.jpg";
37
-        $image_array[] = "$dummy_image_url/a8.jpg";
38
-        $image_array[] = "$dummy_image_url/a9.jpg";
39
-        $image_array[] = "$dummy_image_url/a10.jpg";
40
-        $image_array[] = "$dummy_image_url/a11.jpg";
41
-
42
-
43
-        $post_info[] = array(
44
-            "listing_type" => $post_type,
45
-            "post_title" => 'Franklin Square',
46
-            "post_desc" => ' <h3> Location </h3>
29
+	case(1):
30
+		$image_array[] = "$dummy_image_url/a1.jpg";
31
+		$image_array[] = "$dummy_image_url/a2.jpg";
32
+		$image_array[] = "$dummy_image_url/a3.jpg";
33
+		$image_array[] = "$dummy_image_url/a4.jpg";
34
+		$image_array[] = "$dummy_image_url/a5.jpg";
35
+		$image_array[] = "$dummy_image_url/a6.jpg";
36
+		$image_array[] = "$dummy_image_url/a7.jpg";
37
+		$image_array[] = "$dummy_image_url/a8.jpg";
38
+		$image_array[] = "$dummy_image_url/a9.jpg";
39
+		$image_array[] = "$dummy_image_url/a10.jpg";
40
+		$image_array[] = "$dummy_image_url/a11.jpg";
41
+
42
+
43
+		$post_info[] = array(
44
+			"listing_type" => $post_type,
45
+			"post_title" => 'Franklin Square',
46
+			"post_desc" => ' <h3> Location </h3>
47 47
 		
48 48
 		6th and Race Streets in Historic Philadelphia
49 49
 		<h3>The Experience</h3>
@@ -78,42 +78,42 @@  discard block
 block discarded – undo
78 78
 		Just in time for summer, Franklin Square has opened SquareBurger, a Stephen Starr-run “burger shack” selling summer staples: hot dogs, fries, milkshakes (made with Tasty Kakes) and, of course, hamburgers and cheeseburgers.
79 79
 		
80 80
 		SquareBurger is open until October - perfect for a couple bites between rounds of miniature golf!',
81
-            "post_images" => $image_array,
82
-            "post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
83
-            "post_tags" => array('Tags', 'Sample Tags'),
84
-            "geodir_video" => '',
85
-            "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
86
-            "geodir_contact" => '(111) 677-4444',
87
-            "geodir_email" => '[email protected]',
88
-            "geodir_website" => 'http://franklinsquare.com',
89
-            "geodir_twitter" => 'http://twitter.com/franklinsquare',
90
-            "geodir_facebook" => 'http://facebook.com/franklinsquare',
91
-            "post_dummy" => '1'
92
-        );
93
-
94
-
95
-        break;
96
-    case 2:
97
-        $image_array = array();
98
-        $post_meta = array();
99
-
100
-        /// Attractions ////post start 2///
101
-        $image_array[] = "$dummy_image_url/a6.jpg";
102
-        $image_array[] = "$dummy_image_url/a1.jpg";
103
-        $image_array[] = "$dummy_image_url/a3.jpg";
104
-        $image_array[] = "$dummy_image_url/a4.jpg";
105
-        $image_array[] = "$dummy_image_url/a5.jpg";
106
-        $image_array[] = "$dummy_image_url/a2.jpg";
107
-        $image_array[] = "$dummy_image_url/a7.jpg";
108
-        $image_array[] = "$dummy_image_url/a8.jpg";
109
-        $image_array[] = "$dummy_image_url/a9.jpg";
110
-        $image_array[] = "$dummy_image_url/a10.jpg";
111
-        $image_array[] = "$dummy_image_url/a11.jpg";
112
-
113
-        $post_info[] = array(
114
-            "listing_type" => $post_type,
115
-            "post_title" => 'Please Touch Museum',
116
-            "post_desc" => '<h3>New Location! </h3>
81
+			"post_images" => $image_array,
82
+			"post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
83
+			"post_tags" => array('Tags', 'Sample Tags'),
84
+			"geodir_video" => '',
85
+			"geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
86
+			"geodir_contact" => '(111) 677-4444',
87
+			"geodir_email" => '[email protected]',
88
+			"geodir_website" => 'http://franklinsquare.com',
89
+			"geodir_twitter" => 'http://twitter.com/franklinsquare',
90
+			"geodir_facebook" => 'http://facebook.com/franklinsquare',
91
+			"post_dummy" => '1'
92
+		);
93
+
94
+
95
+		break;
96
+	case 2:
97
+		$image_array = array();
98
+		$post_meta = array();
99
+
100
+		/// Attractions ////post start 2///
101
+		$image_array[] = "$dummy_image_url/a6.jpg";
102
+		$image_array[] = "$dummy_image_url/a1.jpg";
103
+		$image_array[] = "$dummy_image_url/a3.jpg";
104
+		$image_array[] = "$dummy_image_url/a4.jpg";
105
+		$image_array[] = "$dummy_image_url/a5.jpg";
106
+		$image_array[] = "$dummy_image_url/a2.jpg";
107
+		$image_array[] = "$dummy_image_url/a7.jpg";
108
+		$image_array[] = "$dummy_image_url/a8.jpg";
109
+		$image_array[] = "$dummy_image_url/a9.jpg";
110
+		$image_array[] = "$dummy_image_url/a10.jpg";
111
+		$image_array[] = "$dummy_image_url/a11.jpg";
112
+
113
+		$post_info[] = array(
114
+			"listing_type" => $post_type,
115
+			"post_title" => 'Please Touch Museum',
116
+			"post_desc" => '<h3>New Location! </h3>
117 117
 		
118 118
 		Who doesn&acute;t love the Please Touch Museum? And now, taking kids to the Museum is better than ever. The nation&acute;s premier children&acute;s museum - which has been a beloved landmark since it opened in 1976 - has a new home in Fairmount Park, opening its doors to a world of educational, hands-on fun.
119 119
 		
@@ -145,42 +145,42 @@  discard block
 block discarded – undo
145 145
 		
146 146
 		You can buy admission tickets to the Please Touch Museum online through our partners at the Independence Visitor Center. Just click the button below.',
147 147
 
148
-            "post_images" => $image_array,
149
-            "post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
150
-            "post_tags" => array('Tags', 'Sample Tags'),
151
-            "geodir_video" => '',
152
-            "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
153
-            "geodir_contact" => '(222) 777-1111',
154
-            "geodir_email" => '[email protected]',
155
-            "geodir_website" => 'http://pleasetouchmuseum.com',
156
-            "geodir_twitter" => 'http://twitter.com/pleasetouchmuseum',
157
-            "geodir_facebook" => 'http://facebook.com/pleasetouchmuseum',
158
-            "post_dummy" => '1'
159
-        );
160
-
161
-        break;
162
-    case 3:
163
-        $image_array = array();
164
-        $post_meta = array();
165
-
166
-        ////post end///
167
-        /// Attractions ////post start 3///
168
-        $image_array[] = "$dummy_image_url/a9.jpg";
169
-        $image_array[] = "$dummy_image_url/a10.jpg";
170
-        $image_array[] = "$dummy_image_url/a3.jpg";
171
-        $image_array[] = "$dummy_image_url/a4.jpg";
172
-        $image_array[] = "$dummy_image_url/a5.jpg";
173
-        $image_array[] = "$dummy_image_url/a2.jpg";
174
-        $image_array[] = "$dummy_image_url/a7.jpg";
175
-        $image_array[] = "$dummy_image_url/a8.jpg";
176
-        $image_array[] = "$dummy_image_url/a6.jpg";
177
-        $image_array[] = "$dummy_image_url/a1.jpg";
178
-        $image_array[] = "$dummy_image_url/a11.jpg";
179
-
180
-        $post_info[] = array(
181
-            "listing_type" => $post_type,
182
-            "post_title" => 'Longwood Gardens',
183
-            "post_desc" => '<h3>The Experience </h3>
148
+			"post_images" => $image_array,
149
+			"post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
150
+			"post_tags" => array('Tags', 'Sample Tags'),
151
+			"geodir_video" => '',
152
+			"geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
153
+			"geodir_contact" => '(222) 777-1111',
154
+			"geodir_email" => '[email protected]',
155
+			"geodir_website" => 'http://pleasetouchmuseum.com',
156
+			"geodir_twitter" => 'http://twitter.com/pleasetouchmuseum',
157
+			"geodir_facebook" => 'http://facebook.com/pleasetouchmuseum',
158
+			"post_dummy" => '1'
159
+		);
160
+
161
+		break;
162
+	case 3:
163
+		$image_array = array();
164
+		$post_meta = array();
165
+
166
+		////post end///
167
+		/// Attractions ////post start 3///
168
+		$image_array[] = "$dummy_image_url/a9.jpg";
169
+		$image_array[] = "$dummy_image_url/a10.jpg";
170
+		$image_array[] = "$dummy_image_url/a3.jpg";
171
+		$image_array[] = "$dummy_image_url/a4.jpg";
172
+		$image_array[] = "$dummy_image_url/a5.jpg";
173
+		$image_array[] = "$dummy_image_url/a2.jpg";
174
+		$image_array[] = "$dummy_image_url/a7.jpg";
175
+		$image_array[] = "$dummy_image_url/a8.jpg";
176
+		$image_array[] = "$dummy_image_url/a6.jpg";
177
+		$image_array[] = "$dummy_image_url/a1.jpg";
178
+		$image_array[] = "$dummy_image_url/a11.jpg";
179
+
180
+		$post_info[] = array(
181
+			"listing_type" => $post_type,
182
+			"post_title" => 'Longwood Gardens',
183
+			"post_desc" => '<h3>The Experience </h3>
184 184
 		
185 185
 		When you&acute;re at Longwood Gardens, it&acute;s easy to imagine that you&acute;re at a giant, royal garden in Europe. Stroll along the many paths through acres of exquisitely maintained grounds featuring 11,000 different types of plants.
186 186
 		
@@ -205,42 +205,42 @@  discard block
 block discarded – undo
205 205
 		<h3>Buy Tickets Online In Advance </h3>
206 206
 		
207 207
 		You can buy admission tickets to Longwood Gardens online through our partners at the Independence Visitor Center. Just click the button below.',
208
-            "post_images" => $image_array,
209
-            "post_category" => array($post_type.'category' => array('Attractions')),
210
-            "post_tags" => array('wood', 'garden'),
211
-            "geodir_video" => '',
212
-            "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
213
-            "geodir_contact" => '(111) 888-1111',
214
-            "geodir_email" => '[email protected]',
215
-            "geodir_website" => 'http://longwoodgardens.com',
216
-            "geodir_twitter" => 'http://twitter.com/longwoodgardens',
217
-            "geodir_facebook" => 'http://facebook.com/longwoodgardens',
218
-            "post_dummy" => '1'
219
-        );
220
-        break;
221
-    ////post end///
222
-    /// Attractions ////post start 4///
223
-
224
-    case 4:
225
-
226
-        $image_array = array();
227
-        $post_meta = array();
228
-        $image_array[] = "$dummy_image_url/a11.jpg";
229
-        $image_array[] = "$dummy_image_url/a10.jpg";
230
-        $image_array[] = "$dummy_image_url/a3.jpg";
231
-        $image_array[] = "$dummy_image_url/a4.jpg";
232
-        $image_array[] = "$dummy_image_url/a5.jpg";
233
-        $image_array[] = "$dummy_image_url/a2.jpg";
234
-        $image_array[] = "$dummy_image_url/a7.jpg";
235
-        $image_array[] = "$dummy_image_url/a8.jpg";
236
-        $image_array[] = "$dummy_image_url/a6.jpg";
237
-        $image_array[] = "$dummy_image_url/a1.jpg";
238
-        $image_array[] = "$dummy_image_url/a9.jpg";
239
-
240
-        $post_info[] = array(
241
-            "listing_type" => $post_type,
242
-            "post_title" => 'The Philadelphia Zoo',
243
-            "post_desc" => '<h3>The Zoo 150th Birthday</h3>
208
+			"post_images" => $image_array,
209
+			"post_category" => array($post_type.'category' => array('Attractions')),
210
+			"post_tags" => array('wood', 'garden'),
211
+			"geodir_video" => '',
212
+			"geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
213
+			"geodir_contact" => '(111) 888-1111',
214
+			"geodir_email" => '[email protected]',
215
+			"geodir_website" => 'http://longwoodgardens.com',
216
+			"geodir_twitter" => 'http://twitter.com/longwoodgardens',
217
+			"geodir_facebook" => 'http://facebook.com/longwoodgardens',
218
+			"post_dummy" => '1'
219
+		);
220
+		break;
221
+	////post end///
222
+	/// Attractions ////post start 4///
223
+
224
+	case 4:
225
+
226
+		$image_array = array();
227
+		$post_meta = array();
228
+		$image_array[] = "$dummy_image_url/a11.jpg";
229
+		$image_array[] = "$dummy_image_url/a10.jpg";
230
+		$image_array[] = "$dummy_image_url/a3.jpg";
231
+		$image_array[] = "$dummy_image_url/a4.jpg";
232
+		$image_array[] = "$dummy_image_url/a5.jpg";
233
+		$image_array[] = "$dummy_image_url/a2.jpg";
234
+		$image_array[] = "$dummy_image_url/a7.jpg";
235
+		$image_array[] = "$dummy_image_url/a8.jpg";
236
+		$image_array[] = "$dummy_image_url/a6.jpg";
237
+		$image_array[] = "$dummy_image_url/a1.jpg";
238
+		$image_array[] = "$dummy_image_url/a9.jpg";
239
+
240
+		$post_info[] = array(
241
+			"listing_type" => $post_type,
242
+			"post_title" => 'The Philadelphia Zoo',
243
+			"post_desc" => '<h3>The Zoo 150th Birthday</h3>
244 244
 		
245 245
 		The Philadelphia Zoo celebrated its 150th anniversary in 2009. So stop by and celebrate this major achievement at America&acute;s first zoo!
246 246
 		
@@ -275,45 +275,45 @@  discard block
 block discarded – undo
275 275
 		The nation&acute;s oldest zoo was chartered in 1859, but the impending Civil War delayed its opening until 1874. In addition to its animals, the zoo is known for its historic architecture, which includes the country home of William Penn&acute;s grandson; its botanical collections of over 500 plant species; its groundbreaking research and its fine veterinary facilities.
276 276
 		
277 277
 		The Primate Reserve, Carnivore Kingdom, and Rare Animal Conservation Center, with its tree kangaroos and blue-eyed lemurs, are brand new, but there&acute;s still fun to be had in the historic, old-style bird, pachyderm and carnivore houses. In the Treehouse, kids can investigate the world from an animal&acute;s perspective; outdoors, the Zoo Balloon lifts passengers 400 feet into the air for a bird&acute;s-eye view of the zoo.',
278
-            "post_images" => $image_array,
279
-            "post_category" => array($post_type.'category' => array('Attractions')),
280
-            "post_tags" => array('wood', 'garden'),
281
-            "geodir_video" => '',
282
-            "geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm',
283
-            "geodir_contact" => '(211) 143-1900',
284
-            "geodir_email" => '[email protected]',
285
-            "geodir_website" => 'http://philadelphiazoo.com',
286
-            "geodir_twitter" => 'http://twitter.com/philadelphiazoo',
287
-            "geodir_facebook" => 'http://facebook.com/philadelphiazoo',
288
-            "post_dummy" => '1'
289
-        );
290
-
291
-        ////post end///
292
-        /// Attractions ////post start 4///
293
-        break;
294
-    case 5:
295
-
296
-
297
-        $image_array = array();
298
-        $post_meta = array();
299
-
300
-        /// Attractions ////post start 5///
301
-        $image_array[] = "$dummy_image_url/a12.jpg";
302
-        $image_array[] = "$dummy_image_url/a13.jpg";
303
-        $image_array[] = "$dummy_image_url/a3.jpg";
304
-        $image_array[] = "$dummy_image_url/a4.jpg";
305
-        $image_array[] = "$dummy_image_url/a5.jpg";
306
-        $image_array[] = "$dummy_image_url/a2.jpg";
307
-        $image_array[] = "$dummy_image_url/a7.jpg";
308
-        $image_array[] = "$dummy_image_url/a8.jpg";
309
-        $image_array[] = "$dummy_image_url/a6.jpg";
310
-        $image_array[] = "$dummy_image_url/a1.jpg";
311
-        $image_array[] = "$dummy_image_url/a9.jpg";
312
-
313
-        $post_info[] = array(
314
-            "listing_type" => $post_type,
315
-            "post_title" => 'National Constitution Center',
316
-            "post_desc" => '<h3>The Experience</h3>
278
+			"post_images" => $image_array,
279
+			"post_category" => array($post_type.'category' => array('Attractions')),
280
+			"post_tags" => array('wood', 'garden'),
281
+			"geodir_video" => '',
282
+			"geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm',
283
+			"geodir_contact" => '(211) 143-1900',
284
+			"geodir_email" => '[email protected]',
285
+			"geodir_website" => 'http://philadelphiazoo.com',
286
+			"geodir_twitter" => 'http://twitter.com/philadelphiazoo',
287
+			"geodir_facebook" => 'http://facebook.com/philadelphiazoo',
288
+			"post_dummy" => '1'
289
+		);
290
+
291
+		////post end///
292
+		/// Attractions ////post start 4///
293
+		break;
294
+	case 5:
295
+
296
+
297
+		$image_array = array();
298
+		$post_meta = array();
299
+
300
+		/// Attractions ////post start 5///
301
+		$image_array[] = "$dummy_image_url/a12.jpg";
302
+		$image_array[] = "$dummy_image_url/a13.jpg";
303
+		$image_array[] = "$dummy_image_url/a3.jpg";
304
+		$image_array[] = "$dummy_image_url/a4.jpg";
305
+		$image_array[] = "$dummy_image_url/a5.jpg";
306
+		$image_array[] = "$dummy_image_url/a2.jpg";
307
+		$image_array[] = "$dummy_image_url/a7.jpg";
308
+		$image_array[] = "$dummy_image_url/a8.jpg";
309
+		$image_array[] = "$dummy_image_url/a6.jpg";
310
+		$image_array[] = "$dummy_image_url/a1.jpg";
311
+		$image_array[] = "$dummy_image_url/a9.jpg";
312
+
313
+		$post_info[] = array(
314
+			"listing_type" => $post_type,
315
+			"post_title" => 'National Constitution Center',
316
+			"post_desc" => '<h3>The Experience</h3>
317 317
 	
318 318
 	It only four pages long, but the U.S. Constitution is among the most influential and important documents in the history of the world.
319 319
 	
@@ -335,45 +335,45 @@  discard block
 block discarded – undo
335 335
 	<h3>Kids Stuff </h3>
336 336
 	
337 337
 	The Center frequently hosts special events with a focus on children that include informative and engaging hands-on activities. For specific information, check out the Center website.',
338
-            "post_images" => $image_array,
339
-            "post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
340
-            "post_tags" => array('Tag', 'Center'),
341
-            "geodir_video" => '',
342
-            "geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm',
343
-            "geodir_contact" => '(111) 111-1111',
344
-            "geodir_email" => '[email protected]',
345
-            "geodir_website" => 'http://ncc.com',
346
-            "geodir_twitter" => 'http://twitter.com/ncc',
347
-            "geodir_facebook" => 'http://facebook.com/ncc',
348
-            "post_dummy" => '1'
349
-        );
350
-
351
-        ////post end///
352
-        /// Attractions ////post start 5///
353
-        break;
354
-    case 6:
355
-
356
-
357
-        $image_array = array();
358
-        $post_meta = array();
359
-
360
-        /// Attractions ////post start 6///
361
-        $image_array[] = "$dummy_image_url/a14.jpg";
362
-        $image_array[] = "$dummy_image_url/a13.jpg";
363
-        $image_array[] = "$dummy_image_url/a3.jpg";
364
-        $image_array[] = "$dummy_image_url/a4.jpg";
365
-        $image_array[] = "$dummy_image_url/a5.jpg";
366
-        $image_array[] = "$dummy_image_url/a2.jpg";
367
-        $image_array[] = "$dummy_image_url/a7.jpg";
368
-        $image_array[] = "$dummy_image_url/a8.jpg";
369
-        $image_array[] = "$dummy_image_url/a6.jpg";
370
-        $image_array[] = "$dummy_image_url/a1.jpg";
371
-        $image_array[] = "$dummy_image_url/a9.jpg";
372
-
373
-        $post_info[] = array(
374
-            "listing_type" => $post_type,
375
-            "post_title" => 'Sadsbury Woods Preserve',
376
-            "post_desc" => 'A more than 500-acre nature preserve ideal for walking and hiking, Sadsbury Woods is also an important habitat for interior nesting birds and small mammals. An increasingly rare area of interior woodlands, defined as an area at least 300 feet from any road, lawn or meadow, provides a critical habitat for many species of birds, especially neo-tropical migrant songbirds.
338
+			"post_images" => $image_array,
339
+			"post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
340
+			"post_tags" => array('Tag', 'Center'),
341
+			"geodir_video" => '',
342
+			"geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm',
343
+			"geodir_contact" => '(111) 111-1111',
344
+			"geodir_email" => '[email protected]',
345
+			"geodir_website" => 'http://ncc.com',
346
+			"geodir_twitter" => 'http://twitter.com/ncc',
347
+			"geodir_facebook" => 'http://facebook.com/ncc',
348
+			"post_dummy" => '1'
349
+		);
350
+
351
+		////post end///
352
+		/// Attractions ////post start 5///
353
+		break;
354
+	case 6:
355
+
356
+
357
+		$image_array = array();
358
+		$post_meta = array();
359
+
360
+		/// Attractions ////post start 6///
361
+		$image_array[] = "$dummy_image_url/a14.jpg";
362
+		$image_array[] = "$dummy_image_url/a13.jpg";
363
+		$image_array[] = "$dummy_image_url/a3.jpg";
364
+		$image_array[] = "$dummy_image_url/a4.jpg";
365
+		$image_array[] = "$dummy_image_url/a5.jpg";
366
+		$image_array[] = "$dummy_image_url/a2.jpg";
367
+		$image_array[] = "$dummy_image_url/a7.jpg";
368
+		$image_array[] = "$dummy_image_url/a8.jpg";
369
+		$image_array[] = "$dummy_image_url/a6.jpg";
370
+		$image_array[] = "$dummy_image_url/a1.jpg";
371
+		$image_array[] = "$dummy_image_url/a9.jpg";
372
+
373
+		$post_info[] = array(
374
+			"listing_type" => $post_type,
375
+			"post_title" => 'Sadsbury Woods Preserve',
376
+			"post_desc" => 'A more than 500-acre nature preserve ideal for walking and hiking, Sadsbury Woods is also an important habitat for interior nesting birds and small mammals. An increasingly rare area of interior woodlands, defined as an area at least 300 feet from any road, lawn or meadow, provides a critical habitat for many species of birds, especially neo-tropical migrant songbirds.
377 377
 	
378 378
 	Situated on the western edge of Chester County, the land remains much as it did centuries ago, and now serves as a permanent refuge in an area facing dramatically increasing development pressure.
379 379
 	
@@ -389,45 +389,45 @@  discard block
 block discarded – undo
389 389
 	Outsider Tip
390 390
 	
391 391
 	The deep forest is a great place for spotting neo-tropical songbirds in the spring and summer months',
392
-            "post_images" => $image_array,
393
-            "post_category" => array($post_type.'category' => array('Attractions')),
394
-            "post_tags" => array('sample', 'tags'),
395
-            "geodir_video" => '',
396
-            "geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm',
397
-            "geodir_contact" => '(222) 999-9999',
398
-            "geodir_email" => '[email protected]',
399
-            "geodir_website" => 'http://swp.com',
400
-            "geodir_twitter" => 'http://twitter.com/swp',
401
-            "geodir_facebook" => 'http://facebook.com/swp',
402
-            "post_dummy" => '1'
403
-        );
404
-
405
-        ////post end///
406
-        /// Attractions ////post start 6///
407
-
408
-        break;
409
-    case 7:
410
-
411
-        $image_array = array();
412
-        $post_meta = array();
413
-
414
-        /// Attractions ////post start 7///
415
-        $image_array[] = "$dummy_image_url/a15.jpg";
416
-        $image_array[] = "$dummy_image_url/a16.jpg";
417
-        $image_array[] = "$dummy_image_url/a17.jpg";
418
-        $image_array[] = "$dummy_image_url/a4.jpg";
419
-        $image_array[] = "$dummy_image_url/a5.jpg";
420
-        $image_array[] = "$dummy_image_url/a2.jpg";
421
-        $image_array[] = "$dummy_image_url/a7.jpg";
422
-        $image_array[] = "$dummy_image_url/a8.jpg";
423
-        $image_array[] = "$dummy_image_url/a6.jpg";
424
-        $image_array[] = "$dummy_image_url/a1.jpg";
425
-        $image_array[] = "$dummy_image_url/a9.jpg";
426
-
427
-        $post_info[] = array(
428
-            "listing_type" => $post_type,
429
-            "post_title" => 'Museum Without Walls',
430
-            "post_desc" => '<h3>The Experience </h3>
392
+			"post_images" => $image_array,
393
+			"post_category" => array($post_type.'category' => array('Attractions')),
394
+			"post_tags" => array('sample', 'tags'),
395
+			"geodir_video" => '',
396
+			"geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm',
397
+			"geodir_contact" => '(222) 999-9999',
398
+			"geodir_email" => '[email protected]',
399
+			"geodir_website" => 'http://swp.com',
400
+			"geodir_twitter" => 'http://twitter.com/swp',
401
+			"geodir_facebook" => 'http://facebook.com/swp',
402
+			"post_dummy" => '1'
403
+		);
404
+
405
+		////post end///
406
+		/// Attractions ////post start 6///
407
+
408
+		break;
409
+	case 7:
410
+
411
+		$image_array = array();
412
+		$post_meta = array();
413
+
414
+		/// Attractions ////post start 7///
415
+		$image_array[] = "$dummy_image_url/a15.jpg";
416
+		$image_array[] = "$dummy_image_url/a16.jpg";
417
+		$image_array[] = "$dummy_image_url/a17.jpg";
418
+		$image_array[] = "$dummy_image_url/a4.jpg";
419
+		$image_array[] = "$dummy_image_url/a5.jpg";
420
+		$image_array[] = "$dummy_image_url/a2.jpg";
421
+		$image_array[] = "$dummy_image_url/a7.jpg";
422
+		$image_array[] = "$dummy_image_url/a8.jpg";
423
+		$image_array[] = "$dummy_image_url/a6.jpg";
424
+		$image_array[] = "$dummy_image_url/a1.jpg";
425
+		$image_array[] = "$dummy_image_url/a9.jpg";
426
+
427
+		$post_info[] = array(
428
+			"listing_type" => $post_type,
429
+			"post_title" => 'Museum Without Walls',
430
+			"post_desc" => '<h3>The Experience </h3>
431 431
 	
432 432
 	Museum Without Walls: AUDIO is a multi-platform, interactive audio tour, designed to allow locals and visitors alike to experience Philadelphia extensive collection of public art and outdoor sculpture along the Benjamin Franklin Parkway and Kelly Drive. This innovative program invites passersby to stop, look, listen and see this city public art in a new way. Discover the untold histories of the 51 outdoor sculptures at 35 stops through these professionally produced three-minute interpretive audio segments. The many narratives have been spoken by more than 100 individuals, all with personal connections to the pieces of art.
433 433
 	
@@ -437,45 +437,45 @@  discard block
 block discarded – undo
437 437
 	<h3>History </h3>
438 438
 	
439 439
 	Philadelphia has more outdoor sculpture than any other American city, yet this extensive collection often goes unnoticed. This program is intended to reveal the distinct stories behind each of these works, that have become visual white noise for so many of the city residents and visitors. ',
440
-            "post_images" => $image_array,
441
-            "post_category" => array($post_type.'category' => array('Attractions')),
442
-            "post_tags" => array('Museum'),
443
-            "geodir_video" => '',
444
-            "geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm',
445
-            "geodir_contact" => '(222) 999-9999',
446
-            "geodir_email" => '[email protected]',
447
-            "geodir_website" => 'http://museumwithoutwallsaudio.org/',
448
-            "geodir_twitter" => 'http://twitter.com/mwwalls',
449
-            "geodir_facebook" => 'http://facebook.com/mwwalls',
450
-            "post_dummy" => '1'
451
-        );
452
-
453
-        ////post end///
454
-        /// Attractions ////post start 7///
455
-
456
-        break;
457
-    case 8:
458
-
459
-        $image_array = array();
460
-        $post_meta = array();
461
-
462
-        /// Attractions ////post start 8///
463
-        $image_array[] = "$dummy_image_url/a18.jpg";
464
-        $image_array[] = "$dummy_image_url/a10.jpg";
465
-        $image_array[] = "$dummy_image_url/a3.jpg";
466
-        $image_array[] = "$dummy_image_url/a4.jpg";
467
-        $image_array[] = "$dummy_image_url/a5.jpg";
468
-        $image_array[] = "$dummy_image_url/a2.jpg";
469
-        $image_array[] = "$dummy_image_url/a7.jpg";
470
-        $image_array[] = "$dummy_image_url/a8.jpg";
471
-        $image_array[] = "$dummy_image_url/a6.jpg";
472
-        $image_array[] = "$dummy_image_url/a1.jpg";
473
-        $image_array[] = "$dummy_image_url/a9.jpg";
474
-
475
-        $post_info[] = array(
476
-            "listing_type" => $post_type,
477
-            "post_title" => 'Audacious Freedom',
478
-            "post_desc" => 'Audacious Freedom, the major, new exhibit at the African American Museum in Philadelphia , explores the lives of people of African descent living in Philadelphia between 1776 and 1876.
440
+			"post_images" => $image_array,
441
+			"post_category" => array($post_type.'category' => array('Attractions')),
442
+			"post_tags" => array('Museum'),
443
+			"geodir_video" => '',
444
+			"geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm',
445
+			"geodir_contact" => '(222) 999-9999',
446
+			"geodir_email" => '[email protected]',
447
+			"geodir_website" => 'http://museumwithoutwallsaudio.org/',
448
+			"geodir_twitter" => 'http://twitter.com/mwwalls',
449
+			"geodir_facebook" => 'http://facebook.com/mwwalls',
450
+			"post_dummy" => '1'
451
+		);
452
+
453
+		////post end///
454
+		/// Attractions ////post start 7///
455
+
456
+		break;
457
+	case 8:
458
+
459
+		$image_array = array();
460
+		$post_meta = array();
461
+
462
+		/// Attractions ////post start 8///
463
+		$image_array[] = "$dummy_image_url/a18.jpg";
464
+		$image_array[] = "$dummy_image_url/a10.jpg";
465
+		$image_array[] = "$dummy_image_url/a3.jpg";
466
+		$image_array[] = "$dummy_image_url/a4.jpg";
467
+		$image_array[] = "$dummy_image_url/a5.jpg";
468
+		$image_array[] = "$dummy_image_url/a2.jpg";
469
+		$image_array[] = "$dummy_image_url/a7.jpg";
470
+		$image_array[] = "$dummy_image_url/a8.jpg";
471
+		$image_array[] = "$dummy_image_url/a6.jpg";
472
+		$image_array[] = "$dummy_image_url/a1.jpg";
473
+		$image_array[] = "$dummy_image_url/a9.jpg";
474
+
475
+		$post_info[] = array(
476
+			"listing_type" => $post_type,
477
+			"post_title" => 'Audacious Freedom',
478
+			"post_desc" => 'Audacious Freedom, the major, new exhibit at the African American Museum in Philadelphia , explores the lives of people of African descent living in Philadelphia between 1776 and 1876.
479 479
 	
480 480
 	Discover how African Americans in Philadelphia lived and worked while helping to shape the young nation in its formative stages.
481 481
 	
@@ -483,45 +483,45 @@  discard block
 block discarded – undo
483 483
 	
484 484
 	The groundbreaking exhibit allows visitors to “walk the streets” of Historic Philadelphia using a large-scale map. Young children can join the action with Children&acute;s Corner, which highlights the daily lives of children during that period.
485 485
 	',
486
-            "post_images" => $image_array,
487
-            "post_category" => array($post_type.'category' => array('Attractions')),
488
-            "post_tags" => array('Tag1'),
489
-            "geodir_video" => '',
490
-            "geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm',
491
-            "geodir_contact" => '(777) 777-7777',
492
-            "geodir_email" => '[email protected]',
493
-            "geodir_website" => 'http://www.aampmuseum.org/',
494
-            "geodir_twitter" => 'http://twitter.com/aampmuseum',
495
-            "geodir_facebook" => 'http://facebook.com/aampmuseum',
496
-            "post_dummy" => '1'
497
-        );
498
-
499
-        ////post end///
500
-        /// Attractions ////post start 8///
501
-
502
-
503
-        break;
504
-    case 9:
505
-        $image_array = array();
506
-        $post_meta = array();
507
-
508
-        /// Attractions ////post start 9///
509
-        $image_array[] = "$dummy_image_url/a19.jpg";
510
-        $image_array[] = "$dummy_image_url/a20.jpg";
511
-        $image_array[] = "$dummy_image_url/a3.jpg";
512
-        $image_array[] = "$dummy_image_url/a4.jpg";
513
-        $image_array[] = "$dummy_image_url/a5.jpg";
514
-        $image_array[] = "$dummy_image_url/a2.jpg";
515
-        $image_array[] = "$dummy_image_url/a7.jpg";
516
-        $image_array[] = "$dummy_image_url/a8.jpg";
517
-        $image_array[] = "$dummy_image_url/a6.jpg";
518
-        $image_array[] = "$dummy_image_url/a1.jpg";
519
-        $image_array[] = "$dummy_image_url/a9.jpg";
520
-
521
-        $post_info[] = array(
522
-            "listing_type" => $post_type,
523
-            "post_title" => 'The Liberty Bell Center',
524
-            "post_desc" => '<h3>The Experience </h3>
486
+			"post_images" => $image_array,
487
+			"post_category" => array($post_type.'category' => array('Attractions')),
488
+			"post_tags" => array('Tag1'),
489
+			"geodir_video" => '',
490
+			"geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm',
491
+			"geodir_contact" => '(777) 777-7777',
492
+			"geodir_email" => '[email protected]',
493
+			"geodir_website" => 'http://www.aampmuseum.org/',
494
+			"geodir_twitter" => 'http://twitter.com/aampmuseum',
495
+			"geodir_facebook" => 'http://facebook.com/aampmuseum',
496
+			"post_dummy" => '1'
497
+		);
498
+
499
+		////post end///
500
+		/// Attractions ////post start 8///
501
+
502
+
503
+		break;
504
+	case 9:
505
+		$image_array = array();
506
+		$post_meta = array();
507
+
508
+		/// Attractions ////post start 9///
509
+		$image_array[] = "$dummy_image_url/a19.jpg";
510
+		$image_array[] = "$dummy_image_url/a20.jpg";
511
+		$image_array[] = "$dummy_image_url/a3.jpg";
512
+		$image_array[] = "$dummy_image_url/a4.jpg";
513
+		$image_array[] = "$dummy_image_url/a5.jpg";
514
+		$image_array[] = "$dummy_image_url/a2.jpg";
515
+		$image_array[] = "$dummy_image_url/a7.jpg";
516
+		$image_array[] = "$dummy_image_url/a8.jpg";
517
+		$image_array[] = "$dummy_image_url/a6.jpg";
518
+		$image_array[] = "$dummy_image_url/a1.jpg";
519
+		$image_array[] = "$dummy_image_url/a9.jpg";
520
+
521
+		$post_info[] = array(
522
+			"listing_type" => $post_type,
523
+			"post_title" => 'The Liberty Bell Center',
524
+			"post_desc" => '<h3>The Experience </h3>
525 525
 	
526 526
 	The Liberty Bell has a new home, and it is as powerful and dramatic as the Bell itself. Throughout the expansive, light-filled Center, larger-than-life historic documents and graphic images explore the facts and the myths surrounding the Bell.
527 527
 	
@@ -542,45 +542,45 @@  discard block
 block discarded – undo
542 542
 	The Bell is suspended from what is believed to be its original yoke, made of American elm.
543 543
 	
544 544
 	The Liberty Bell weighs 2,080 pounds. The yoke weighs about 100 pounds.',
545
-            "post_images" => $image_array,
546
-            "post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
547
-            "post_tags" => array(''),
548
-            "geodir_video" => '',
549
-            "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
550
-            "geodir_contact" => '(777) 666-6666',
551
-            "geodir_email" => '[email protected]',
552
-            "geodir_website" => 'http://www.nps.gov/inde',
553
-            "geodir_twitter" => 'http://twitter.com/nps',
554
-            "geodir_facebook" => 'http://facebook.com/nps',
555
-            "post_dummy" => '1'
556
-        );
557
-
558
-        ////post end///
559
-        /// Attractions ////post start 9///
560
-        break;
561
-    case 10:
562
-
563
-
564
-        $image_array = array();
565
-        $post_meta = array();
566
-
567
-        /// Attractions ////post start 10///
568
-        $image_array[] = "$dummy_image_url/a19.jpg";
569
-        $image_array[] = "$dummy_image_url/a20.jpg";
570
-        $image_array[] = "$dummy_image_url/a3.jpg";
571
-        $image_array[] = "$dummy_image_url/a4.jpg";
572
-        $image_array[] = "$dummy_image_url/a5.jpg";
573
-        $image_array[] = "$dummy_image_url/a2.jpg";
574
-        $image_array[] = "$dummy_image_url/a7.jpg";
575
-        $image_array[] = "$dummy_image_url/a8.jpg";
576
-        $image_array[] = "$dummy_image_url/a6.jpg";
577
-        $image_array[] = "$dummy_image_url/a1.jpg";
578
-        $image_array[] = "$dummy_image_url/a9.jpg";
579
-
580
-        $post_info[] = array(
581
-            "listing_type" => $post_type,
582
-            "post_title" => 'Rittenhouse Square',
583
-            "post_desc" => '
545
+			"post_images" => $image_array,
546
+			"post_category" => array($post_type.'category' => array('Attractions', 'Feature')),
547
+			"post_tags" => array(''),
548
+			"geodir_video" => '',
549
+			"geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
550
+			"geodir_contact" => '(777) 666-6666',
551
+			"geodir_email" => '[email protected]',
552
+			"geodir_website" => 'http://www.nps.gov/inde',
553
+			"geodir_twitter" => 'http://twitter.com/nps',
554
+			"geodir_facebook" => 'http://facebook.com/nps',
555
+			"post_dummy" => '1'
556
+		);
557
+
558
+		////post end///
559
+		/// Attractions ////post start 9///
560
+		break;
561
+	case 10:
562
+
563
+
564
+		$image_array = array();
565
+		$post_meta = array();
566
+
567
+		/// Attractions ////post start 10///
568
+		$image_array[] = "$dummy_image_url/a19.jpg";
569
+		$image_array[] = "$dummy_image_url/a20.jpg";
570
+		$image_array[] = "$dummy_image_url/a3.jpg";
571
+		$image_array[] = "$dummy_image_url/a4.jpg";
572
+		$image_array[] = "$dummy_image_url/a5.jpg";
573
+		$image_array[] = "$dummy_image_url/a2.jpg";
574
+		$image_array[] = "$dummy_image_url/a7.jpg";
575
+		$image_array[] = "$dummy_image_url/a8.jpg";
576
+		$image_array[] = "$dummy_image_url/a6.jpg";
577
+		$image_array[] = "$dummy_image_url/a1.jpg";
578
+		$image_array[] = "$dummy_image_url/a9.jpg";
579
+
580
+		$post_info[] = array(
581
+			"listing_type" => $post_type,
582
+			"post_title" => 'Rittenhouse Square',
583
+			"post_desc" => '
584 584
 	
585 585
 	Unlike the other squares, the early Southwest Square was never used as a burial ground, although it offered pasturage for local livestock and a convenient dumping spot for “night soil”.
586 586
 	<h3> History </h3>
@@ -613,45 +613,45 @@  discard block
 block discarded – undo
613 613
 	
614 614
 	Meanwhile, several more restaurants, bars and clubs have opened along the surrounding blocks in recent years, like Parc, Tria, Continental Midtown, Alfa, Walnut Room, and Twenty Manning just to name a few.
615 615
 	',
616
-            "post_images" => $image_array,
617
-            "post_category" => array($post_type.'category' => array('Attractions')),
618
-            "post_tags" => array('Museum'),
619
-            "geodir_video" => '',
620
-            "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
621
-            "geodir_contact" => '(777) 666-6666',
622
-            "geodir_email" => '[email protected]',
623
-            "geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp',
624
-            "geodir_twitter" => 'http://twitter.com/fairmountpark',
625
-            "geodir_facebook" => 'http://facebook.com/fairmountpark',
626
-            "post_dummy" => '1'
627
-        );
628
-
629
-        ////post end///
630
-        /// Attractions ////post start 10///
631
-        break;
632
-    case 11:
633
-
634
-
635
-        $image_array = array();
636
-        $post_meta = array();
637
-
638
-        /// Hotels ////post start 1///
639
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
640
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
641
-        $image_array[] = "$dummy_image_url/hotels3.jpg";
642
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
643
-        $image_array[] = "$dummy_image_url/hotels5.jpg";
644
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
645
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
646
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
647
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
648
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
649
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
650
-
651
-        $post_info[] = array(
652
-            "listing_type" => $post_type,
653
-            "post_title" => 'Loews Philadelphia Hotel',
654
-            "post_desc" => '
616
+			"post_images" => $image_array,
617
+			"post_category" => array($post_type.'category' => array('Attractions')),
618
+			"post_tags" => array('Museum'),
619
+			"geodir_video" => '',
620
+			"geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
621
+			"geodir_contact" => '(777) 666-6666',
622
+			"geodir_email" => '[email protected]',
623
+			"geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp',
624
+			"geodir_twitter" => 'http://twitter.com/fairmountpark',
625
+			"geodir_facebook" => 'http://facebook.com/fairmountpark',
626
+			"post_dummy" => '1'
627
+		);
628
+
629
+		////post end///
630
+		/// Attractions ////post start 10///
631
+		break;
632
+	case 11:
633
+
634
+
635
+		$image_array = array();
636
+		$post_meta = array();
637
+
638
+		/// Hotels ////post start 1///
639
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
640
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
641
+		$image_array[] = "$dummy_image_url/hotels3.jpg";
642
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
643
+		$image_array[] = "$dummy_image_url/hotels5.jpg";
644
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
645
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
646
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
647
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
648
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
649
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
650
+
651
+		$post_info[] = array(
652
+			"listing_type" => $post_type,
653
+			"post_title" => 'Loews Philadelphia Hotel',
654
+			"post_desc" => '
655 655
 	
656 656
 	<h3>OVERVIEW </h3>
657 657
 	
@@ -718,45 +718,45 @@  discard block
 block discarded – undo
718 718
 	
719 719
 	SoleFood Restaurant is proud to be serving Starbucks. Come in and enjoy a fresh cup of coffee during your morning rush. The Coffee Bar also offer small breakfast items for your enjoyment.
720 720
 	',
721
-            "post_images" => $image_array,
722
-            "post_category" => array($post_type.'category' => array('Hotels', 'Feature')),
723
-            "post_tags" => array(''),
724
-            "geodir_video" => '',
725
-            "geodir_timing" => 'Daily, 6:30 am – 12:00 pm',
726
-            "geodir_contact" => '(111) 111-0000',
727
-            "geodir_email" => '[email protected]',
728
-            "geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx',
729
-            "geodir_twitter" => 'http://twitter.com/loewshotels',
730
-            "geodir_facebook" => 'http://facebook.com/loewshotels',
731
-            "post_dummy" => '1'
732
-        );
733
-
734
-        ////post end///
735
-        /// Hotels ////post start 1///
736
-        break;
737
-    case 12:
738
-
739
-
740
-        $image_array = array();
741
-        $post_meta = array();
742
-
743
-        /// Hotels ////post start 2///
744
-        $image_array[] = "$dummy_image_url/hotels5.jpg";
745
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
746
-        $image_array[] = "$dummy_image_url/hotels3.jpg";
747
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
748
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
749
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
750
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
751
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
752
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
753
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
754
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
755
-
756
-        $post_info[] = array(
757
-            "listing_type" => $post_type,
758
-            "post_title" => 'Embassy Suites Philadelphia',
759
-            "post_desc" => '
721
+			"post_images" => $image_array,
722
+			"post_category" => array($post_type.'category' => array('Hotels', 'Feature')),
723
+			"post_tags" => array(''),
724
+			"geodir_video" => '',
725
+			"geodir_timing" => 'Daily, 6:30 am – 12:00 pm',
726
+			"geodir_contact" => '(111) 111-0000',
727
+			"geodir_email" => '[email protected]',
728
+			"geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx',
729
+			"geodir_twitter" => 'http://twitter.com/loewshotels',
730
+			"geodir_facebook" => 'http://facebook.com/loewshotels',
731
+			"post_dummy" => '1'
732
+		);
733
+
734
+		////post end///
735
+		/// Hotels ////post start 1///
736
+		break;
737
+	case 12:
738
+
739
+
740
+		$image_array = array();
741
+		$post_meta = array();
742
+
743
+		/// Hotels ////post start 2///
744
+		$image_array[] = "$dummy_image_url/hotels5.jpg";
745
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
746
+		$image_array[] = "$dummy_image_url/hotels3.jpg";
747
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
748
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
749
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
750
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
751
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
752
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
753
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
754
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
755
+
756
+		$post_info[] = array(
757
+			"listing_type" => $post_type,
758
+			"post_title" => 'Embassy Suites Philadelphia',
759
+			"post_desc" => '
760 760
 	The newly renovated Embassy Suites Philadelphia – Center City hotel is conveniently situated in the heart of downtown Philadelphia, Pennsylvania and Philadelphia&acute;s Center City business district. This hotel in Philadelphia is located only eight miles from Philadelphia International Airport and just minutes from top Philadelphia attractions, including:
761 761
 	
762 762
 	Philadelphia Museum of Art
@@ -772,45 +772,45 @@  discard block
 block discarded – undo
772 772
 	
773 773
 	A delicious, complimentary cooked-to-order breakfast is offered each morning, and a hotel Manager&acute;s Reception every night – featuring complimentary refreshments and great company.
774 774
 	',
775
-            "post_images" => $image_array,
776
-            "post_category" => array($post_type.'category' => array('Hotels')),
777
-            "post_tags" => array(''),
778
-            "geodir_video" => '',
779
-            "geodir_timing" => 'Daily, 10:30 am – 10 pm',
780
-            "geodir_contact" => '(111) 111-0000',
781
-            "geodir_email" => '[email protected]',
782
-            "geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do',
783
-            "geodir_twitter" => 'http://twitter.com/embassysuites1',
784
-            "geodir_facebook" => 'http://facebook.com/embassysuites1',
785
-            "post_dummy" => '1'
786
-        );
787
-
788
-        ////post end///
789
-        /// Hotels ////post start 2///
790
-
791
-        break;
792
-    case 13:
793
-
794
-        $image_array = array();
795
-        $post_meta = array();
796
-
797
-        /// Hotels ////post start 3///
798
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
799
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
800
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
801
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
802
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
803
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
804
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
805
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
806
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
807
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
808
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
809
-
810
-        $post_info[] = array(
811
-            "listing_type" => $post_type,
812
-            "post_title" => 'Doubletree Hotel Philadelphia',
813
-            "post_desc" => '
775
+			"post_images" => $image_array,
776
+			"post_category" => array($post_type.'category' => array('Hotels')),
777
+			"post_tags" => array(''),
778
+			"geodir_video" => '',
779
+			"geodir_timing" => 'Daily, 10:30 am – 10 pm',
780
+			"geodir_contact" => '(111) 111-0000',
781
+			"geodir_email" => '[email protected]',
782
+			"geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do',
783
+			"geodir_twitter" => 'http://twitter.com/embassysuites1',
784
+			"geodir_facebook" => 'http://facebook.com/embassysuites1',
785
+			"post_dummy" => '1'
786
+		);
787
+
788
+		////post end///
789
+		/// Hotels ////post start 2///
790
+
791
+		break;
792
+	case 13:
793
+
794
+		$image_array = array();
795
+		$post_meta = array();
796
+
797
+		/// Hotels ////post start 3///
798
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
799
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
800
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
801
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
802
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
803
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
804
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
805
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
806
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
807
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
808
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
809
+
810
+		$post_info[] = array(
811
+			"listing_type" => $post_type,
812
+			"post_title" => 'Doubletree Hotel Philadelphia',
813
+			"post_desc" => '
814 814
 	With 434 rooms, the Doubletree Hotel is a great option for your upcoming stay in Philadelphia.
815 815
 	
816 816
 	<h3>Location </h3>
@@ -840,47 +840,47 @@  discard block
 block discarded – undo
840 840
 	Stop in the restaurant - which serves lunch and dinner daily - for a drink and some light fare. With its location right on Broad Street, you&acute;re close to everything you could ever want in a night on the town.
841 841
 	',
842 842
 
843
-            "post_images" => $image_array,
844
-
845
-            "post_category" => array($post_type.'category' => array('Hotels')),
846
-            "post_tags" => array(''),
847
-            "geodir_video" => '',
848
-            "geodir_timing" => 'Daily, 10:30 am – 10 pm',
849
-            "geodir_contact" => '(111) 111-0000',
850
-            "geodir_email" => '[email protected]',
851
-            "geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do',
852
-            "geodir_twitter" => 'http://twitter.com/doubletree1',
853
-            "geodir_facebook" => 'http://facebook.com/doubletree1',
854
-            "post_dummy" => '1'
855
-        );
856
-
857
-        ////post end///
858
-        /// Hotels ////post start 3///
859
-
860
-        break;
861
-    case 14:
862
-
863
-
864
-        $image_array = array();
865
-        $post_meta = array();
866
-
867
-        /// Hotels ////post start 4///
868
-        $image_array[] = "$dummy_image_url/hotels15.jpg";
869
-        $image_array[] = "$dummy_image_url/hotels16.jpg";
870
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
871
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
872
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
873
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
874
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
875
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
876
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
877
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
878
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
879
-
880
-        $post_info[] = array(
881
-            "listing_type" => $post_type,
882
-            "post_title" => 'Philadelphia Marriott Downtown',
883
-            "post_desc" => '
843
+			"post_images" => $image_array,
844
+
845
+			"post_category" => array($post_type.'category' => array('Hotels')),
846
+			"post_tags" => array(''),
847
+			"geodir_video" => '',
848
+			"geodir_timing" => 'Daily, 10:30 am – 10 pm',
849
+			"geodir_contact" => '(111) 111-0000',
850
+			"geodir_email" => '[email protected]',
851
+			"geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do',
852
+			"geodir_twitter" => 'http://twitter.com/doubletree1',
853
+			"geodir_facebook" => 'http://facebook.com/doubletree1',
854
+			"post_dummy" => '1'
855
+		);
856
+
857
+		////post end///
858
+		/// Hotels ////post start 3///
859
+
860
+		break;
861
+	case 14:
862
+
863
+
864
+		$image_array = array();
865
+		$post_meta = array();
866
+
867
+		/// Hotels ////post start 4///
868
+		$image_array[] = "$dummy_image_url/hotels15.jpg";
869
+		$image_array[] = "$dummy_image_url/hotels16.jpg";
870
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
871
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
872
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
873
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
874
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
875
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
876
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
877
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
878
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
879
+
880
+		$post_info[] = array(
881
+			"listing_type" => $post_type,
882
+			"post_title" => 'Philadelphia Marriott Downtown',
883
+			"post_desc" => '
884 884
 	Get ready to stay and play at the new aloft Philadelphia Airport!
885 885
 	
886 886
 	This incredibly modern hotel is located just five minutes from Philadelphia International Airport, offering a great convenience to travelers looking for fresh and fun accommodations.
@@ -907,45 +907,45 @@  discard block
 block discarded – undo
907 907
 	
908 908
 	Aahh…breathe deep at Aloft. This hotel is smoke-free.
909 909
 	',
910
-            "post_images" => $image_array,
911
-            "post_category" => array($post_type.'category' => array('Hotels', 'Feature')),
912
-            "post_tags" => array(''),
913
-            "geodir_video" => '',
914
-            "geodir_timing" => '24 Hours',
915
-            "geodir_contact" => '(123) 111-2222',
916
-            "geodir_email" => '[email protected]',
917
-            "geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/',
918
-            "geodir_twitter" => 'http://twitter.com/marriott',
919
-            "geodir_facebook" => 'http://facebook.com/marriott',
920
-            "post_dummy" => '1'
921
-        );
922
-
923
-        ////post end///
924
-        /// Hotels ////post start 4///
925
-        break;
926
-    case 15:
927
-
928
-
929
-        $image_array = array();
930
-        $post_meta = array();
931
-
932
-        /// Hotels ////post start 5///
933
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
934
-        $image_array[] = "$dummy_image_url/hotels16.jpg";
935
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
936
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
937
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
938
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
939
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
940
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
941
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
942
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
943
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
944
-
945
-        $post_info[] = array(
946
-            "listing_type" => $post_type,
947
-            "post_title" => 'Hilton Inn at Penn',
948
-            "post_desc" => '
910
+			"post_images" => $image_array,
911
+			"post_category" => array($post_type.'category' => array('Hotels', 'Feature')),
912
+			"post_tags" => array(''),
913
+			"geodir_video" => '',
914
+			"geodir_timing" => '24 Hours',
915
+			"geodir_contact" => '(123) 111-2222',
916
+			"geodir_email" => '[email protected]',
917
+			"geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/',
918
+			"geodir_twitter" => 'http://twitter.com/marriott',
919
+			"geodir_facebook" => 'http://facebook.com/marriott',
920
+			"post_dummy" => '1'
921
+		);
922
+
923
+		////post end///
924
+		/// Hotels ////post start 4///
925
+		break;
926
+	case 15:
927
+
928
+
929
+		$image_array = array();
930
+		$post_meta = array();
931
+
932
+		/// Hotels ////post start 5///
933
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
934
+		$image_array[] = "$dummy_image_url/hotels16.jpg";
935
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
936
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
937
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
938
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
939
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
940
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
941
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
942
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
943
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
944
+
945
+		$post_info[] = array(
946
+			"listing_type" => $post_type,
947
+			"post_title" => 'Hilton Inn at Penn',
948
+			"post_desc" => '
949 949
 	Located in the heart of Penn&acute;s campus in the beautiful University City neighborhood of Philadelphia, The Hilton Inn at Penn is a great choice for accommodations during your upcoming visit to Philadelphia.
950 950
 	
951 951
 	The location puts you right in the middle of the prestigious University of Pennsylvania and its many nearby educational, medical and corporate centers. And Center City Philadelphia is only a short cab ride away. So if you want to get out and explore the city, you are set.
@@ -961,45 +961,45 @@  discard block
 block discarded – undo
961 961
 	
962 962
 	The pasta is handmade right in front of you and then dished up along side delectable entrées such as grilled veal tenderloin and honey glazed sea scallops. And the wine bar offers more than 30 varieties by the glass and more than 100 by the bottle.  
963 963
 	',
964
-            "post_images" => $image_array,
965
-            "post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
966
-            "post_tags" => array(''),
967
-            "geodir_video" => '',
968
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
969
-            "geodir_contact" => '(888) 888-8888',
970
-            "geodir_email" => '[email protected]',
971
-            "geodir_website" => 'http://www.theinnatpenn.com/',
972
-            "geodir_twitter" => 'http://twitter.com/theinnatpenn',
973
-            "geodir_facebook" => 'http://facebook.com/theinnatpenn',
974
-            "post_dummy" => '1'
975
-        );
976
-
977
-        ////post end///
978
-        /// Hotels ////post start 5///
979
-        break;
980
-    case 16:
981
-
982
-
983
-        $image_array = array();
984
-        $post_meta = array();
985
-
986
-        /// Hotels ////post start 6///
987
-        $image_array[] = "$dummy_image_url/hotels17.jpg";
988
-        $image_array[] = "$dummy_image_url/hotels18.jpg";
989
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
990
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
991
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
992
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
993
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
994
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
995
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
996
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
997
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
998
-
999
-        $post_info[] = array(
1000
-            "listing_type" => $post_type,
1001
-            "post_title" => 'Courtyard Philadelphia Downtown',
1002
-            "post_desc" => '
964
+			"post_images" => $image_array,
965
+			"post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
966
+			"post_tags" => array(''),
967
+			"geodir_video" => '',
968
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
969
+			"geodir_contact" => '(888) 888-8888',
970
+			"geodir_email" => '[email protected]',
971
+			"geodir_website" => 'http://www.theinnatpenn.com/',
972
+			"geodir_twitter" => 'http://twitter.com/theinnatpenn',
973
+			"geodir_facebook" => 'http://facebook.com/theinnatpenn',
974
+			"post_dummy" => '1'
975
+		);
976
+
977
+		////post end///
978
+		/// Hotels ////post start 5///
979
+		break;
980
+	case 16:
981
+
982
+
983
+		$image_array = array();
984
+		$post_meta = array();
985
+
986
+		/// Hotels ////post start 6///
987
+		$image_array[] = "$dummy_image_url/hotels17.jpg";
988
+		$image_array[] = "$dummy_image_url/hotels18.jpg";
989
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
990
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
991
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
992
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
993
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
994
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
995
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
996
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
997
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
998
+
999
+		$post_info[] = array(
1000
+			"listing_type" => $post_type,
1001
+			"post_title" => 'Courtyard Philadelphia Downtown',
1002
+			"post_desc" => '
1003 1003
 	<h3>Overview </h3>
1004 1004
 	
1005 1005
 	The Philadelphia Downtown Courtyard opened it&acute;s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout.
@@ -1029,45 +1029,45 @@  discard block
 block discarded – undo
1029 1029
 	
1030 1030
 	Recently featured on WE TV&acute;s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city&acute;s leading venues for corporate and social affairs with over 10,000 sq ft of flexible meeting space, including two Grand Ballrooms each with over 3,000 square feet accommodating up to 250 people. In addition, the hotel has a total of 11 meeting rooms making it an ideal home for all occasions. The hotel boasts an experienced full-service Event and Culinary Teams, ready to take care of all the details and ensure your event is not only a success, but a lasting memory. 
1031 1031
 	',
1032
-            "post_images" => $image_array,
1033
-            "post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
1034
-            "post_tags" => array(''),
1035
-            "geodir_video" => '',
1036
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
1037
-            "geodir_contact" => '(888) 888-8888',
1038
-            "geodir_email" => '[email protected]',
1039
-            "geodir_website" => 'http://www.theinnatpenn.com/',
1040
-            "geodir_twitter" => 'http://twitter.com/theinnatpenn',
1041
-            "geodir_facebook" => 'http://facebook.com/theinnatpenn',
1042
-            "post_dummy" => '1'
1043
-        );
1044
-
1045
-        ////post end///
1046
-        /// Hotels ////post start 6///
1047
-
1048
-        break;
1049
-    case 17:
1050
-
1051
-        $image_array = array();
1052
-        $post_meta = array();
1053
-
1054
-        /// Hotels ////post start 7///
1055
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
1056
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1057
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1058
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1059
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1060
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1061
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1062
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1063
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1064
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1065
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1066
-
1067
-        $post_info[] = array(
1068
-            "listing_type" => $post_type,
1069
-            "post_title" => 'Four Seasons Philadelphia',
1070
-            "post_desc" => '
1032
+			"post_images" => $image_array,
1033
+			"post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
1034
+			"post_tags" => array(''),
1035
+			"geodir_video" => '',
1036
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
1037
+			"geodir_contact" => '(888) 888-8888',
1038
+			"geodir_email" => '[email protected]',
1039
+			"geodir_website" => 'http://www.theinnatpenn.com/',
1040
+			"geodir_twitter" => 'http://twitter.com/theinnatpenn',
1041
+			"geodir_facebook" => 'http://facebook.com/theinnatpenn',
1042
+			"post_dummy" => '1'
1043
+		);
1044
+
1045
+		////post end///
1046
+		/// Hotels ////post start 6///
1047
+
1048
+		break;
1049
+	case 17:
1050
+
1051
+		$image_array = array();
1052
+		$post_meta = array();
1053
+
1054
+		/// Hotels ////post start 7///
1055
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
1056
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1057
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1058
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1059
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1060
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1061
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1062
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1063
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1064
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1065
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1066
+
1067
+		$post_info[] = array(
1068
+			"listing_type" => $post_type,
1069
+			"post_title" => 'Four Seasons Philadelphia',
1070
+			"post_desc" => '
1071 1071
 	<h3>Overview </h3>
1072 1072
 	
1073 1073
 	The Philadelphia Downtown Courtyard opened it&acute;s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout.
@@ -1097,45 +1097,45 @@  discard block
 block discarded – undo
1097 1097
 	
1098 1098
 	Recently featured on WE TV&acute;s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city&acute;s leading venues for corporate and social affairs with over 10,000 sq ft of flexible meeting space, including two Grand Ballrooms each with over 3,000 square feet accommodating up to 250 people. In addition, the hotel has a total of 11 meeting rooms making it an ideal home for all occasions. The hotel boasts an experienced full-service Event and Culinary Teams, ready to take care of all the details and ensure your event is not only a success, but a lasting memory. 
1099 1099
 	',
1100
-            "post_images" => $image_array,
1101
-            "post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
1102
-            "post_tags" => array(''),
1103
-            "geodir_video" => '',
1104
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
1105
-            "geodir_contact" => '(143) 888-8888',
1106
-            "geodir_email" => '[email protected]',
1107
-            "geodir_website" => 'http://www.fourseasons.com/philadelphia/',
1108
-            "geodir_twitter" => 'http://twitter.com/fourseasons',
1109
-            "geodir_facebook" => 'http://facebook.com/fourseasons',
1110
-            "post_dummy" => '1'
1111
-        );
1112
-
1113
-        ////post end///
1114
-        /// Hotels ////post start 7///
1115
-        break;
1116
-    case 18:
1117
-
1118
-
1119
-        $image_array = array();
1120
-        $post_meta = array();
1121
-
1122
-        /// Hotels ////post start 8///
1123
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
1124
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1125
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1126
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1127
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1128
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1129
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1130
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1131
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1132
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1133
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1134
-
1135
-        $post_info[] = array(
1136
-            "listing_type" => $post_type,
1137
-            "post_title" => 'Alexander Inn',
1138
-            "post_desc" => '
1100
+			"post_images" => $image_array,
1101
+			"post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
1102
+			"post_tags" => array(''),
1103
+			"geodir_video" => '',
1104
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
1105
+			"geodir_contact" => '(143) 888-8888',
1106
+			"geodir_email" => '[email protected]',
1107
+			"geodir_website" => 'http://www.fourseasons.com/philadelphia/',
1108
+			"geodir_twitter" => 'http://twitter.com/fourseasons',
1109
+			"geodir_facebook" => 'http://facebook.com/fourseasons',
1110
+			"post_dummy" => '1'
1111
+		);
1112
+
1113
+		////post end///
1114
+		/// Hotels ////post start 7///
1115
+		break;
1116
+	case 18:
1117
+
1118
+
1119
+		$image_array = array();
1120
+		$post_meta = array();
1121
+
1122
+		/// Hotels ////post start 8///
1123
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
1124
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1125
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1126
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1127
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1128
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1129
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1130
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1131
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1132
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1133
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1134
+
1135
+		$post_info[] = array(
1136
+			"listing_type" => $post_type,
1137
+			"post_title" => 'Alexander Inn',
1138
+			"post_desc" => '
1139 1139
 	The Alexander Inn is one of Philadelphia&acute;s most popular and reasonably priced small hotels.
1140 1140
 	
1141 1141
 	Conveniently located in the heart of the Washington Square West neighborhood in Center City Philadelphia, the Alexander Inn is a great place to base your stay in Philadelphia.
@@ -1144,45 +1144,45 @@  discard block
 block discarded – undo
1144 1144
 	
1145 1145
 	Rooms are also fitted with DirecTV (including many complimentary channels like CNN, ESPN, eight movie channels, etc.) and telephones with modem ports and direct dial. You will also have access to the hotel&acute;s free 24-hour fitness and e-mail centers.  
1146 1146
 	',
1147
-            "post_images" => $image_array,
1148
-            "post_category" => array($post_type.'category' => array('Hotels')),
1149
-            "post_tags" => array(''),
1150
-            "geodir_video" => '',
1151
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
1152
-            "geodir_contact" => '(143) 888-8888',
1153
-            "geodir_email" => '[email protected]',
1154
-            "geodir_website" => 'http://www.alexanderinn.com/',
1155
-            "geodir_twitter" => 'http://twitter.com/alexanderinn',
1156
-            "geodir_facebook" => 'http://facebook.com/alexanderinn',
1157
-            "post_dummy" => '1'
1158
-        );
1159
-
1160
-        ////post end///
1161
-        /// Hotels ////post start 8///
1162
-        break;
1163
-    case 19:
1164
-
1165
-
1166
-        $image_array = array();
1167
-        $post_meta = array();
1168
-
1169
-        /// Hotels ////post start 9///
1170
-        $image_array[] = "$dummy_image_url/hotels5.jpg";
1171
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1172
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1173
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1174
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1175
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1176
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1177
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1178
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1179
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1180
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1181
-
1182
-        $post_info[] = array(
1183
-            "listing_type" => $post_type,
1184
-            "post_title" => 'Best Western Center City Hotel',
1185
-            "post_desc" => '
1147
+			"post_images" => $image_array,
1148
+			"post_category" => array($post_type.'category' => array('Hotels')),
1149
+			"post_tags" => array(''),
1150
+			"geodir_video" => '',
1151
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
1152
+			"geodir_contact" => '(143) 888-8888',
1153
+			"geodir_email" => '[email protected]',
1154
+			"geodir_website" => 'http://www.alexanderinn.com/',
1155
+			"geodir_twitter" => 'http://twitter.com/alexanderinn',
1156
+			"geodir_facebook" => 'http://facebook.com/alexanderinn',
1157
+			"post_dummy" => '1'
1158
+		);
1159
+
1160
+		////post end///
1161
+		/// Hotels ////post start 8///
1162
+		break;
1163
+	case 19:
1164
+
1165
+
1166
+		$image_array = array();
1167
+		$post_meta = array();
1168
+
1169
+		/// Hotels ////post start 9///
1170
+		$image_array[] = "$dummy_image_url/hotels5.jpg";
1171
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1172
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1173
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1174
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1175
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1176
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1177
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1178
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1179
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1180
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1181
+
1182
+		$post_info[] = array(
1183
+			"listing_type" => $post_type,
1184
+			"post_title" => 'Best Western Center City Hotel',
1185
+			"post_desc" => '
1186 1186
 	The Alexander Inn is one of Philadelphia&acute;s most popular and reasonably priced small hotels.
1187 1187
 	
1188 1188
 	Conveniently located in the heart of the Washington Square West neighborhood in Center City Philadelphia, the Alexander Inn is a great place to base your stay in Philadelphia.
@@ -1191,91 +1191,91 @@  discard block
 block discarded – undo
1191 1191
 	
1192 1192
 	Rooms are also fitted with DirecTV (including many complimentary channels like CNN, ESPN, eight movie channels, etc.) and telephones with modem ports and direct dial. You will also have access to the hotel&acute;s free 24-hour fitness and e-mail centers.  
1193 1193
 	',
1194
-            "post_images" => $image_array,
1195
-            "post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
1196
-            "post_tags" => array(''),
1197
-            "geodir_video" => '',
1198
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1199
-            "geodir_contact" => '(243) 222-12344',
1200
-            "geodir_email" => '[email protected]',
1201
-            "geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087',
1202
-            "geodir_twitter" => 'http://twitter.com/bestwestern',
1203
-            "geodir_facebook" => 'http://facebook.com/bestwestern',
1204
-            "post_dummy" => '1'
1205
-        );
1206
-
1207
-        ////post end///
1208
-        /// Hotels ////post start 9///
1209
-        break;
1210
-    case 20:
1211
-
1212
-
1213
-        $image_array = array();
1214
-        $post_meta = array();
1215
-
1216
-        /// Hotels ////post start 10///
1217
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1218
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1219
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1220
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1221
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1222
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1223
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1224
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1225
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1226
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1227
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1228
-
1229
-        $post_info[] = array(
1230
-            "listing_type" => $post_type,
1231
-            "post_title" => 'Chestnut Hill Hotel',
1232
-            "post_desc" => '
1194
+			"post_images" => $image_array,
1195
+			"post_category" => array($post_type.'category' => array('Hotels', 'Food Nightlife')),
1196
+			"post_tags" => array(''),
1197
+			"geodir_video" => '',
1198
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1199
+			"geodir_contact" => '(243) 222-12344',
1200
+			"geodir_email" => '[email protected]',
1201
+			"geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087',
1202
+			"geodir_twitter" => 'http://twitter.com/bestwestern',
1203
+			"geodir_facebook" => 'http://facebook.com/bestwestern',
1204
+			"post_dummy" => '1'
1205
+		);
1206
+
1207
+		////post end///
1208
+		/// Hotels ////post start 9///
1209
+		break;
1210
+	case 20:
1211
+
1212
+
1213
+		$image_array = array();
1214
+		$post_meta = array();
1215
+
1216
+		/// Hotels ////post start 10///
1217
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1218
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1219
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1220
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1221
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1222
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1223
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1224
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1225
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1226
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1227
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1228
+
1229
+		$post_info[] = array(
1230
+			"listing_type" => $post_type,
1231
+			"post_title" => 'Chestnut Hill Hotel',
1232
+			"post_desc" => '
1233 1233
 	The Chestnut Hill Hotel is located in the historic community of Chestnut Hill, approximately nine miles northwest from Center City Philadelphia. Although Chestnut Hill is close to Center City by today&acute;s standards, it was originally a distant “suburb” on the outskirts of the Philadelphia countryside.
1234 1234
 	
1235 1235
 	Today, it is one of the region&acute;s most charming neighborhoods. Tree-lined streets and grand estates surround its main street, Germantown Avenue, where you can stroll and shop at more than 200 specialty shops and restaurants, along with trendy salons and other modern boutiques.
1236 1236
 	
1237 1237
 	The Chestnut Hill Hotel fits perfectly in this setting - the hotel&acute;s 36 rooms and suites, decorated in an 18th-century style, hold the hotel to its boutique roots. It&acute;s a perfect place at which to enjoy a romantic getaway in Philadelphia. 
1238 1238
 	',
1239
-            "post_images" => $image_array,
1240
-            "post_category" => array($post_type.'category' => array('Hotels', 'Feature')),
1241
-            "post_tags" => array(''),
1242
-            "geodir_video" => '',
1243
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1244
-            "geodir_contact" => '(243) 222-12344',
1245
-            "geodir_email" => '[email protected]',
1246
-            "geodir_website" => 'http://www.chestnuthillhotel.com/',
1247
-            "geodir_twitter" => 'http://twitter.com/chestnuthillhotel',
1248
-            "geodir_facebook" => 'http://facebook.com/chestnuthillhotel',
1249
-            "post_dummy" => '1'
1250
-        );
1251
-
1252
-        ////post end///
1253
-        /// Hotels ////post start 10///
1254
-
1255
-        break;
1256
-    case 21:
1257
-
1258
-
1259
-        $image_array = array();
1260
-        $post_meta = array();
1261
-
1262
-        /// Restaurants ////post start 1//
1263
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1264
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1265
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1266
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1267
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1268
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1269
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1270
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1271
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1272
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1273
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1274
-
1275
-        $post_info[] = array(
1276
-            "listing_type" => $post_type,
1277
-            "post_title" => 'Village Whiskey',
1278
-            "post_desc" => '
1239
+			"post_images" => $image_array,
1240
+			"post_category" => array($post_type.'category' => array('Hotels', 'Feature')),
1241
+			"post_tags" => array(''),
1242
+			"geodir_video" => '',
1243
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1244
+			"geodir_contact" => '(243) 222-12344',
1245
+			"geodir_email" => '[email protected]',
1246
+			"geodir_website" => 'http://www.chestnuthillhotel.com/',
1247
+			"geodir_twitter" => 'http://twitter.com/chestnuthillhotel',
1248
+			"geodir_facebook" => 'http://facebook.com/chestnuthillhotel',
1249
+			"post_dummy" => '1'
1250
+		);
1251
+
1252
+		////post end///
1253
+		/// Hotels ////post start 10///
1254
+
1255
+		break;
1256
+	case 21:
1257
+
1258
+
1259
+		$image_array = array();
1260
+		$post_meta = array();
1261
+
1262
+		/// Restaurants ////post start 1//
1263
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1264
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1265
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1266
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1267
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1268
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1269
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1270
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1271
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1272
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1273
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1274
+
1275
+		$post_info[] = array(
1276
+			"listing_type" => $post_type,
1277
+			"post_title" => 'Village Whiskey',
1278
+			"post_desc" => '
1279 1279
 	
1280 1280
 	
1281 1281
 	Located in a Rittenhouse Square space evoking the free-wheeling spirit of a speakeasy, Village Whiskey is prolific Chef Jose Garces’ intimate, 30-seat tribute to the time-honored liquor.
@@ -1301,45 +1301,45 @@  discard block
 block discarded – undo
1301 1301
 	
1302 1302
 	During the warmer months, diners can sit at large, wooden tables placed along Sansom Street for whiskey alfresco.
1303 1303
 	',
1304
-            "post_images" => $image_array,
1305
-            "post_category" => array($post_type.'category' => array('Restaurants', 'Feature')),
1306
-            "post_tags" => array('Sample Tag1'),
1307
-            "geodir_video" => '',
1308
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1309
-            "geodir_contact" => '(243) 222-12344',
1310
-            "geodir_email" => '[email protected]',
1311
-            "geodir_website" => 'http://www.villagewhiskey.com/',
1312
-            "geodir_twitter" => 'http://twitter.com/villagewhiskey',
1313
-            "geodir_facebook" => 'http://facebook.com/villagewhiskey',
1314
-            "post_dummy" => '1'
1315
-        );
1316
-
1317
-        ////post end///
1318
-        /// Restaurants ////post start 1///
1319
-        break;
1320
-    case 22:
1321
-
1322
-
1323
-        $image_array = array();
1324
-        $post_meta = array();
1325
-
1326
-        /// Restaurants ////post start 2//
1327
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1328
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1329
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1330
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1331
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1332
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1333
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1334
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1335
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1336
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1337
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1338
-
1339
-        $post_info[] = array(
1340
-            "listing_type" => $post_type,
1341
-            "post_title" => 'Zavino Pizzeria and Wine Bar',
1342
-            "post_desc" => '
1304
+			"post_images" => $image_array,
1305
+			"post_category" => array($post_type.'category' => array('Restaurants', 'Feature')),
1306
+			"post_tags" => array('Sample Tag1'),
1307
+			"geodir_video" => '',
1308
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1309
+			"geodir_contact" => '(243) 222-12344',
1310
+			"geodir_email" => '[email protected]',
1311
+			"geodir_website" => 'http://www.villagewhiskey.com/',
1312
+			"geodir_twitter" => 'http://twitter.com/villagewhiskey',
1313
+			"geodir_facebook" => 'http://facebook.com/villagewhiskey',
1314
+			"post_dummy" => '1'
1315
+		);
1316
+
1317
+		////post end///
1318
+		/// Restaurants ////post start 1///
1319
+		break;
1320
+	case 22:
1321
+
1322
+
1323
+		$image_array = array();
1324
+		$post_meta = array();
1325
+
1326
+		/// Restaurants ////post start 2//
1327
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1328
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1329
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1330
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1331
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1332
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1333
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1334
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1335
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1336
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1337
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1338
+
1339
+		$post_info[] = array(
1340
+			"listing_type" => $post_type,
1341
+			"post_title" => 'Zavino Pizzeria and Wine Bar',
1342
+			"post_desc" => '
1343 1343
 	Zavino is a new pizzeria and wine bar located at the epicenter of the city&acute;s trendy Midtown Village neighborhood. The restaurant features a seasonal menu, classic cocktails, an approachable selection of wine and beer and some of the best late night menu offerings in the area.
1344 1344
 	
1345 1345
 	The restaurant&acute;s interior looks great - it has a simple, rustic feel with an original brick wall, large picture windows, a long bar and a large outdoor cafe coming this spring.
@@ -1358,46 +1358,46 @@  discard block
 block discarded – undo
1358 1358
 	
1359 1359
 	Pizzas vary in price from $8 to $12.
1360 1360
 	',
1361
-            "post_images" => $image_array,
1362
-            "post_category" => array($post_type.'category' => array('Restaurants')),
1363
-            "post_tags" => array('Sample Tag1'),
1364
-            "geodir_video" => '',
1365
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1366
-            "geodir_contact" => '(243) 222-12344',
1367
-            "geodir_email" => '[email protected]',
1368
-            "geodir_website" => 'http://www.villagewhiskey.com/',
1369
-            "geodir_twitter" => 'http://twitter.com/villagewhiskey',
1370
-            "geodir_facebook" => 'http://facebook.com/villagewhiskey',
1371
-            "post_dummy" => '1'
1372
-        );
1373
-
1374
-        ////post end///
1375
-        /// Restaurants ////post start 2///
1376
-
1377
-        break;
1378
-    case 23:
1379
-
1380
-
1381
-        $image_array = array();
1382
-        $post_meta = array();
1383
-
1384
-        /// Restaurants ////post start 3//
1385
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1386
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1387
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1388
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1389
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1390
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1391
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1392
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1393
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1394
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1395
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1396
-
1397
-        $post_info[] = array(
1398
-            "listing_type" => $post_type,
1399
-            "post_title" => 'Parc',
1400
-            "post_desc" => '
1361
+			"post_images" => $image_array,
1362
+			"post_category" => array($post_type.'category' => array('Restaurants')),
1363
+			"post_tags" => array('Sample Tag1'),
1364
+			"geodir_video" => '',
1365
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1366
+			"geodir_contact" => '(243) 222-12344',
1367
+			"geodir_email" => '[email protected]',
1368
+			"geodir_website" => 'http://www.villagewhiskey.com/',
1369
+			"geodir_twitter" => 'http://twitter.com/villagewhiskey',
1370
+			"geodir_facebook" => 'http://facebook.com/villagewhiskey',
1371
+			"post_dummy" => '1'
1372
+		);
1373
+
1374
+		////post end///
1375
+		/// Restaurants ////post start 2///
1376
+
1377
+		break;
1378
+	case 23:
1379
+
1380
+
1381
+		$image_array = array();
1382
+		$post_meta = array();
1383
+
1384
+		/// Restaurants ////post start 3//
1385
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1386
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1387
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1388
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1389
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1390
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1391
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1392
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1393
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1394
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1395
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1396
+
1397
+		$post_info[] = array(
1398
+			"listing_type" => $post_type,
1399
+			"post_title" => 'Parc',
1400
+			"post_desc" => '
1401 1401
 	If you love Paris in the springtime, Parc is a veritable grand cru.
1402 1402
 	
1403 1403
 	With Parc, famed restaurateur Stephen Starr brings a certain je ne sais quoi to Rittenhouse Square. Parc offers an authentic French bistro experience, fully equipped with a chic Parisian ambiance and gorgeous sidewalk seating overlooking the Square.
@@ -1425,45 +1425,45 @@  discard block
 block discarded – undo
1425 1425
 	
1426 1426
 	To put it simply, Parc is nothing short of an authentic Parisian dining experience - right here in the heart of Rittenhouse Square.
1427 1427
 	',
1428
-            "post_images" => $image_array,
1429
-            "post_category" => array($post_type.'category' => array('Restaurants')),
1430
-            "post_tags" => array('Sample Tag1'),
1431
-            "geodir_video" => '',
1432
-            "geodir_timing" => 'Daily : 10 am to 12 pm',
1433
-            "geodir_contact" => '(143) 222-12344',
1434
-            "geodir_email" => '[email protected]',
1435
-            "geodir_website" => 'http://www.parc-restaurant.com/',
1436
-            "geodir_twitter" => 'http://twitter.com/parc-restaurant',
1437
-            "geodir_facebook" => 'http://facebook.com/parc-restaurant',
1438
-            "post_dummy" => '1'
1439
-        );
1440
-
1441
-        ////post end///
1442
-        /// Restaurants ////post start 3///
1443
-        break;
1444
-    case 24:
1445
-
1446
-
1447
-        $image_array = array();
1448
-        $post_meta = array();
1449
-
1450
-        /// Restaurants ////post start 4//
1451
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1452
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1453
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1454
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1455
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1456
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1457
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1458
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1459
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1460
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1461
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1462
-
1463
-        $post_info[] = array(
1464
-            "listing_type" => $post_type,
1465
-            "post_title" => 'Percy Street Barbecue',
1466
-            "post_desc" => '
1428
+			"post_images" => $image_array,
1429
+			"post_category" => array($post_type.'category' => array('Restaurants')),
1430
+			"post_tags" => array('Sample Tag1'),
1431
+			"geodir_video" => '',
1432
+			"geodir_timing" => 'Daily : 10 am to 12 pm',
1433
+			"geodir_contact" => '(143) 222-12344',
1434
+			"geodir_email" => '[email protected]',
1435
+			"geodir_website" => 'http://www.parc-restaurant.com/',
1436
+			"geodir_twitter" => 'http://twitter.com/parc-restaurant',
1437
+			"geodir_facebook" => 'http://facebook.com/parc-restaurant',
1438
+			"post_dummy" => '1'
1439
+		);
1440
+
1441
+		////post end///
1442
+		/// Restaurants ////post start 3///
1443
+		break;
1444
+	case 24:
1445
+
1446
+
1447
+		$image_array = array();
1448
+		$post_meta = array();
1449
+
1450
+		/// Restaurants ////post start 4//
1451
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1452
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1453
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1454
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1455
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1456
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1457
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1458
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1459
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1460
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1461
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1462
+
1463
+		$post_info[] = array(
1464
+			"listing_type" => $post_type,
1465
+			"post_title" => 'Percy Street Barbecue',
1466
+			"post_desc" => '
1467 1467
 	Percy Street Barbecue sees the South Street debut of restaurateurs Steven Cook and Michael Solomonov (Zahav, Xochitl).
1468 1468
 	
1469 1469
 	Serving a straightforward selection of slowly smoked meats and homey side dishes alongside craft beers and tasty cocktails, Percy Street is an ideal venue for Chef Erin OShea much-lauded Southern cooking, and is on its way to become the city top spot for barbecue.
@@ -1489,46 +1489,46 @@  discard block
 block discarded – undo
1489 1489
 	
1490 1490
 	Seating in the form of repurposed church pews, and bare light bulbs overhead in the dining room lend to the restaurant Texas-esque aesthetic.
1491 1491
 	',
1492
-            "post_images" => $image_array,
1493
-            "post_category" => array($post_type.'category' => array('Restaurants', 'Feature')),
1494
-            "post_tags" => array('Sample Tag1'),
1495
-            "geodir_video" => '',
1496
-            "geodir_timing" => 'Percy Street is closed on Mondays. The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.',
1497
-            "geodir_contact" => '(143) 222-12344',
1498
-            "geodir_email" => '[email protected]',
1499
-            "geodir_website" => 'http://www.percystreet.com/',
1500
-            "geodir_twitter" => 'http://twitter.com/percystreet',
1501
-            "geodir_facebook" => 'http://facebook.com/percystreet',
1502
-            "post_dummy" => '1'
1503
-        );
1504
-
1505
-        ////post end///
1506
-        /// Restaurants ////post start 4///
1507
-
1508
-        break;
1509
-    case 25:
1510
-
1511
-
1512
-        $image_array = array();
1513
-        $post_meta = array();
1514
-
1515
-        /// Restaurants ////post start 5//
1516
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1517
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1518
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1519
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1520
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1521
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1522
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1523
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1524
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1525
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1526
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1527
-
1528
-        $post_info[] = array(
1529
-            "listing_type" => $post_type,
1530
-            "post_title" => 'The Fountain Restaurant',
1531
-            "post_desc" => '
1492
+			"post_images" => $image_array,
1493
+			"post_category" => array($post_type.'category' => array('Restaurants', 'Feature')),
1494
+			"post_tags" => array('Sample Tag1'),
1495
+			"geodir_video" => '',
1496
+			"geodir_timing" => 'Percy Street is closed on Mondays. The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.',
1497
+			"geodir_contact" => '(143) 222-12344',
1498
+			"geodir_email" => '[email protected]',
1499
+			"geodir_website" => 'http://www.percystreet.com/',
1500
+			"geodir_twitter" => 'http://twitter.com/percystreet',
1501
+			"geodir_facebook" => 'http://facebook.com/percystreet',
1502
+			"post_dummy" => '1'
1503
+		);
1504
+
1505
+		////post end///
1506
+		/// Restaurants ////post start 4///
1507
+
1508
+		break;
1509
+	case 25:
1510
+
1511
+
1512
+		$image_array = array();
1513
+		$post_meta = array();
1514
+
1515
+		/// Restaurants ////post start 5//
1516
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1517
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1518
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1519
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1520
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1521
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1522
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1523
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1524
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1525
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1526
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1527
+
1528
+		$post_info[] = array(
1529
+			"listing_type" => $post_type,
1530
+			"post_title" => 'The Fountain Restaurant',
1531
+			"post_desc" => '
1532 1532
 	The Fountain Restaurant in the Four Seasons Hotel Philadelphia has received seemingly every type of accolade there is, from top honors in Gourmet magazine to Forbes Travel Guide&acute;s 2010 Five Star award to a perfect Five Diamond rating from AAA. It&acute;s been a Philadelphia favorite for special occasion meals for decades.
1533 1533
 	
1534 1534
 	Additionally rated as the best restaurant in Philadelphia by Zagat&acute;s, the Fountain Restaurant overlooks the majestic Swann Memorial Fountain sculpture by Alexander Stirling Calder in the center of Logan Square. You&acute;ll also enjoy sweeping views of the grand Benjamin Franklin Parkway and its gorgeous Beaux Arts architecture.
@@ -1538,45 +1538,45 @@  discard block
 block discarded – undo
1538 1538
 	You can order a la carte or select the prix fix option to enjoy the “spontaneous tastes” menu which gives the chef control of a few courses. The menu changes regularly, but you can expect to see globaly influenced items like Pan-fried Veal Sweetbreads, Braised Dover Sole Roulade, Sautéed Venison Medallions and Roasted Australian Lamb Saddle.
1539 1539
 	
1540 1540
 	',
1541
-            "post_images" => $image_array,
1542
-            "post_category" => array($post_type.'category' => array('Restaurants')),
1543
-            "post_tags" => array('food'),
1544
-            "geodir_video" => '',
1545
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.',
1546
-            "geodir_contact" => '(103) 100-12344',
1547
-            "geodir_email" => '[email protected]',
1548
-            "geodir_website" => 'http://www.fourseasons.com/philadelphia/dining',
1549
-            "geodir_twitter" => 'http://twitter.com/fourseasons',
1550
-            "geodir_facebook" => 'http://facebook.com/fourseasons',
1551
-            "post_dummy" => '1'
1552
-        );
1553
-
1554
-        ////post end///
1555
-        /// Restaurants ////post start 5///
1556
-        break;
1557
-    case 26:
1558
-
1559
-
1560
-        $image_array = array();
1561
-        $post_meta = array();
1562
-
1563
-        /// Restaurants ////post start 6//
1564
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1565
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1566
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1567
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1568
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1569
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1570
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1571
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1572
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1573
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1574
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1575
-
1576
-        $post_info[] = array(
1577
-            "listing_type" => $post_type,
1578
-            "post_title" => 'Lacroix at The Rittenhouse',
1579
-            "post_desc" => '
1541
+			"post_images" => $image_array,
1542
+			"post_category" => array($post_type.'category' => array('Restaurants')),
1543
+			"post_tags" => array('food'),
1544
+			"geodir_video" => '',
1545
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.',
1546
+			"geodir_contact" => '(103) 100-12344',
1547
+			"geodir_email" => '[email protected]',
1548
+			"geodir_website" => 'http://www.fourseasons.com/philadelphia/dining',
1549
+			"geodir_twitter" => 'http://twitter.com/fourseasons',
1550
+			"geodir_facebook" => 'http://facebook.com/fourseasons',
1551
+			"post_dummy" => '1'
1552
+		);
1553
+
1554
+		////post end///
1555
+		/// Restaurants ////post start 5///
1556
+		break;
1557
+	case 26:
1558
+
1559
+
1560
+		$image_array = array();
1561
+		$post_meta = array();
1562
+
1563
+		/// Restaurants ////post start 6//
1564
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1565
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1566
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1567
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1568
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1569
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1570
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1571
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1572
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1573
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1574
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1575
+
1576
+		$post_info[] = array(
1577
+			"listing_type" => $post_type,
1578
+			"post_title" => 'Lacroix at The Rittenhouse',
1579
+			"post_desc" => '
1580 1580
 	A deluxe hotel like The Rittenhouse deserves a deluxe restaurant, a fitting description for Lacroix, named “Restaurant of the Year” in 2003 by Esquire magazine.
1581 1581
 	
1582 1582
 	Located on the second floor of the Rittenhouse Hotel, Lacroix features elegant décor and a broad view of Rittenhouse Square, which combine to make the ambiance at Lacroix as enjoyable as the meal itself.
@@ -1587,46 +1587,46 @@  discard block
 block discarded – undo
1587 1587
 	
1588 1588
 	Sunday Brunch at Lacroix - which features such delectable dishes as baby lamb chops with garlic crust and banyuls sauce, niman ranch smoked bacon, quail eggs with artichoke, golden beet and shiitakes, and french baguette toast with apple, raspberry and rosemary jam - is also highly recommended.
1589 1589
 	',
1590
-            "post_images" => $image_array,
1591
-            "post_category" => array($post_type.'category' => array('Restaurants')),
1592
-            "post_tags" => array('food'),
1593
-            "geodir_video" => '',
1594
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1595
-            "geodir_contact" => '(113) 121-12344',
1596
-            "geodir_email" => '[email protected]',
1597
-            "geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm',
1598
-            "geodir_twitter" => 'http://twitter.com/rittenhousehotel',
1599
-            "geodir_facebook" => 'http://facebook.com/rittenhousehotel',
1600
-            "post_dummy" => '1'
1601
-        );
1602
-
1603
-        ////post end///
1604
-        /// Restaurants ////post start 6///
1605
-
1606
-        break;
1607
-    case 27:
1608
-
1609
-
1610
-        $image_array = array();
1611
-        $post_meta = array();
1612
-
1613
-        /// Restaurants ////post start 7//
1614
-        $image_array[] = "$dummy_image_url/restaurants12.jpg";
1615
-        $image_array[] = "$dummy_image_url/restaurants13.jpg";
1616
-        $image_array[] = "$dummy_image_url/restaurants14.jpg";
1617
-        $image_array[] = "$dummy_image_url/restaurants15.jpg";
1618
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1619
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1620
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1621
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1622
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1623
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1624
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1625
-
1626
-        $post_info[] = array(
1627
-            "listing_type" => $post_type,
1628
-            "post_title" => 'Lacroix at The Rittenhouse',
1629
-            "post_desc" => '
1590
+			"post_images" => $image_array,
1591
+			"post_category" => array($post_type.'category' => array('Restaurants')),
1592
+			"post_tags" => array('food'),
1593
+			"geodir_video" => '',
1594
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1595
+			"geodir_contact" => '(113) 121-12344',
1596
+			"geodir_email" => '[email protected]',
1597
+			"geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm',
1598
+			"geodir_twitter" => 'http://twitter.com/rittenhousehotel',
1599
+			"geodir_facebook" => 'http://facebook.com/rittenhousehotel',
1600
+			"post_dummy" => '1'
1601
+		);
1602
+
1603
+		////post end///
1604
+		/// Restaurants ////post start 6///
1605
+
1606
+		break;
1607
+	case 27:
1608
+
1609
+
1610
+		$image_array = array();
1611
+		$post_meta = array();
1612
+
1613
+		/// Restaurants ////post start 7//
1614
+		$image_array[] = "$dummy_image_url/restaurants12.jpg";
1615
+		$image_array[] = "$dummy_image_url/restaurants13.jpg";
1616
+		$image_array[] = "$dummy_image_url/restaurants14.jpg";
1617
+		$image_array[] = "$dummy_image_url/restaurants15.jpg";
1618
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1619
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1620
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1621
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1622
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1623
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1624
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1625
+
1626
+		$post_info[] = array(
1627
+			"listing_type" => $post_type,
1628
+			"post_title" => 'Lacroix at The Rittenhouse',
1629
+			"post_desc" => '
1630 1630
 	A deluxe hotel like The Rittenhouse deserves a deluxe restaurant, a fitting description for Lacroix, named “Restaurant of the Year” in 2003 by Esquire magazine.
1631 1631
 	
1632 1632
 	Located on the second floor of the Rittenhouse Hotel, Lacroix features elegant décor and a broad view of Rittenhouse Square, which combine to make the ambiance at Lacroix as enjoyable as the meal itself.
@@ -1637,45 +1637,45 @@  discard block
 block discarded – undo
1637 1637
 	
1638 1638
 	Sunday Brunch at Lacroix - which features such delectable dishes as baby lamb chops with garlic crust and banyuls sauce, niman ranch smoked bacon, quail eggs with artichoke, golden beet and shiitakes, and french baguette toast with apple, raspberry and rosemary jam - is also highly recommended.
1639 1639
 	',
1640
-            "post_images" => $image_array,
1641
-            "post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife')),
1642
-            "post_tags" => array('food'),
1643
-            "geodir_video" => '',
1644
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1645
-            "geodir_contact" => '(113) 121-12344',
1646
-            "geodir_email" => '[email protected]',
1647
-            "geodir_website" => 'http://www.zamarestaurant.com/',
1648
-            "geodir_twitter" => 'http://twitter.com/zamarestaurant',
1649
-            "geodir_facebook" => 'http://facebook.com/zamarestaurant',
1650
-            "post_dummy" => '1'
1651
-        );
1652
-
1653
-        ////post end///
1654
-        /// Restaurants ////post start 7///
1655
-
1656
-        break;
1657
-    case 28:
1658
-
1659
-        $image_array = array();
1660
-        $post_meta = array();
1661
-
1662
-        /// Restaurants ////post start 8//
1663
-        $image_array[] = "$dummy_image_url/restaurants16.jpg";
1664
-        $image_array[] = "$dummy_image_url/restaurants17.jpg";
1665
-        $image_array[] = "$dummy_image_url/restaurants18.jpg";
1666
-        $image_array[] = "$dummy_image_url/restaurants19.jpg";
1667
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1668
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1669
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1670
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1671
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1672
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1673
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1674
-
1675
-        $post_info[] = array(
1676
-            "listing_type" => $post_type,
1677
-            "post_title" => 'Sampan',
1678
-            "post_desc" => '
1640
+			"post_images" => $image_array,
1641
+			"post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife')),
1642
+			"post_tags" => array('food'),
1643
+			"geodir_video" => '',
1644
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1645
+			"geodir_contact" => '(113) 121-12344',
1646
+			"geodir_email" => '[email protected]',
1647
+			"geodir_website" => 'http://www.zamarestaurant.com/',
1648
+			"geodir_twitter" => 'http://twitter.com/zamarestaurant',
1649
+			"geodir_facebook" => 'http://facebook.com/zamarestaurant',
1650
+			"post_dummy" => '1'
1651
+		);
1652
+
1653
+		////post end///
1654
+		/// Restaurants ////post start 7///
1655
+
1656
+		break;
1657
+	case 28:
1658
+
1659
+		$image_array = array();
1660
+		$post_meta = array();
1661
+
1662
+		/// Restaurants ////post start 8//
1663
+		$image_array[] = "$dummy_image_url/restaurants16.jpg";
1664
+		$image_array[] = "$dummy_image_url/restaurants17.jpg";
1665
+		$image_array[] = "$dummy_image_url/restaurants18.jpg";
1666
+		$image_array[] = "$dummy_image_url/restaurants19.jpg";
1667
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1668
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1669
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1670
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1671
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1672
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1673
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1674
+
1675
+		$post_info[] = array(
1676
+			"listing_type" => $post_type,
1677
+			"post_title" => 'Sampan',
1678
+			"post_desc" => '
1679 1679
 	Chef and charismatic television star Michael Schulson returns to Philadelphia with the opening of Sampan, a modern Asian restaurant where he serves the acclaimed cuisine that has made him one of the country&acute;s highly sought-after culinary talents.
1680 1680
 	
1681 1681
 	Schulson returns to Philadelphia after having opened Buddakan in New York City for Stephen Starr and Izakaya at the Borgata in Atlantic City and then having gone on to star in Style network&acute;s popular series Pantry Raid and TLC Ultimate Cake Off.
@@ -1694,45 +1694,45 @@  discard block
 block discarded – undo
1694 1694
 	
1695 1695
 	Prices range from $5 to $19.
1696 1696
 	',
1697
-            "post_images" => $image_array,
1698
-            "post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife')),
1699
-            "post_tags" => array('restaurant'),
1700
-            "geodir_video" => '',
1701
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1702
-            "geodir_contact" => '(000) 111-2222',
1703
-            "geodir_email" => '[email protected]',
1704
-            "geodir_website" => 'http://www.sampanphilly.com/',
1705
-            "geodir_twitter" => 'http://twitter.com/sampanphilly',
1706
-            "geodir_facebook" => 'http://facebook.com/sampanphilly',
1707
-            "post_dummy" => '1'
1708
-        );
1709
-
1710
-        ////post end///
1711
-        /// Restaurants ////post start 8///
1712
-
1713
-        break;
1714
-    case 29:
1715
-
1716
-        $image_array = array();
1717
-        $post_meta = array();
1718
-
1719
-        /// Restaurants ////post start 9//
1720
-        $image_array[] = "$dummy_image_url/restaurants17.jpg";
1721
-        $image_array[] = "$dummy_image_url/restaurants16.jpg";
1722
-        $image_array[] = "$dummy_image_url/restaurants18.jpg";
1723
-        $image_array[] = "$dummy_image_url/restaurants19.jpg";
1724
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1725
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1726
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1727
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1728
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1729
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1730
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1731
-
1732
-        $post_info[] = array(
1733
-            "listing_type" => $post_type,
1734
-            "post_title" => 'Morimoto',
1735
-            "post_desc" => '
1697
+			"post_images" => $image_array,
1698
+			"post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife')),
1699
+			"post_tags" => array('restaurant'),
1700
+			"geodir_video" => '',
1701
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1702
+			"geodir_contact" => '(000) 111-2222',
1703
+			"geodir_email" => '[email protected]',
1704
+			"geodir_website" => 'http://www.sampanphilly.com/',
1705
+			"geodir_twitter" => 'http://twitter.com/sampanphilly',
1706
+			"geodir_facebook" => 'http://facebook.com/sampanphilly',
1707
+			"post_dummy" => '1'
1708
+		);
1709
+
1710
+		////post end///
1711
+		/// Restaurants ////post start 8///
1712
+
1713
+		break;
1714
+	case 29:
1715
+
1716
+		$image_array = array();
1717
+		$post_meta = array();
1718
+
1719
+		/// Restaurants ////post start 9//
1720
+		$image_array[] = "$dummy_image_url/restaurants17.jpg";
1721
+		$image_array[] = "$dummy_image_url/restaurants16.jpg";
1722
+		$image_array[] = "$dummy_image_url/restaurants18.jpg";
1723
+		$image_array[] = "$dummy_image_url/restaurants19.jpg";
1724
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1725
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1726
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1727
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1728
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1729
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1730
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1731
+
1732
+		$post_info[] = array(
1733
+			"listing_type" => $post_type,
1734
+			"post_title" => 'Morimoto',
1735
+			"post_desc" => '
1736 1736
 	Stephen Starr creative Japanese restaurant has garnered all kinds of national and international attention since opening a few years back. Located a block from Independence Hall on Chestnut Street, Morimoto has an interior - awash in glass and colors - that is both striking and serene in its design.
1737 1737
 	
1738 1738
 	The restaurant&acute;s namesake and head chef, Morimoto (of Food Network&acute;s Iron Chef fame), has created a menu offering the very best in contemporary Japanese cusine. While regulars flock here for the exquisitely prepared sushi, Morimoto offers diners a broad spectrum of flavors that delve beyond nigiri and sashimi.
@@ -1745,45 +1745,45 @@  discard block
 block discarded – undo
1745 1745
 	
1746 1746
 	The mezzanine level lounge is a great spot to have a pre-meal cocktail while waiting for your table. You can enjoy a sake or try a “Sakura” - a cosmo made with Sake - in the sleek space that overlooks the brilliant restaurant below.
1747 1747
 	',
1748
-            "post_images" => $image_array,
1749
-            "post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife', 'Feature')),
1750
-            "post_tags" => array('America'),
1751
-            "geodir_video" => '',
1752
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1753
-            "geodir_contact" => '(000) 111-2222',
1754
-            "geodir_email" => '[email protected]',
1755
-            "geodir_website" => 'http://www.morimotorestaurant.com/',
1756
-            "geodir_twitter" => 'http://twitter.com/morimotorestaurant',
1757
-            "geodir_facebook" => 'http://facebook.com/morimotorestaurant',
1758
-            "post_dummy" => '1'
1759
-        );
1760
-
1761
-        ////post end///
1762
-        /// Restaurants ////post start 9///
1763
-        break;
1764
-    case 30:
1765
-
1766
-
1767
-        $image_array = array();
1768
-        $post_meta = array();
1769
-
1770
-        /// Restaurants ////post start 10//
1771
-        $image_array[] = "$dummy_image_url/restaurants19.jpg";
1772
-        $image_array[] = "$dummy_image_url/restaurants17.jpg";
1773
-        $image_array[] = "$dummy_image_url/restaurants18.jpg";
1774
-        $image_array[] = "$dummy_image_url/restaurants16.jpg";
1775
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1776
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1777
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1778
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1779
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1780
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1781
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1782
-
1783
-        $post_info[] = array(
1784
-            "listing_type" => $post_type,
1785
-            "post_title" => 'Buddakan',
1786
-            "post_desc" => '
1748
+			"post_images" => $image_array,
1749
+			"post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife', 'Feature')),
1750
+			"post_tags" => array('America'),
1751
+			"geodir_video" => '',
1752
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1753
+			"geodir_contact" => '(000) 111-2222',
1754
+			"geodir_email" => '[email protected]',
1755
+			"geodir_website" => 'http://www.morimotorestaurant.com/',
1756
+			"geodir_twitter" => 'http://twitter.com/morimotorestaurant',
1757
+			"geodir_facebook" => 'http://facebook.com/morimotorestaurant',
1758
+			"post_dummy" => '1'
1759
+		);
1760
+
1761
+		////post end///
1762
+		/// Restaurants ////post start 9///
1763
+		break;
1764
+	case 30:
1765
+
1766
+
1767
+		$image_array = array();
1768
+		$post_meta = array();
1769
+
1770
+		/// Restaurants ////post start 10//
1771
+		$image_array[] = "$dummy_image_url/restaurants19.jpg";
1772
+		$image_array[] = "$dummy_image_url/restaurants17.jpg";
1773
+		$image_array[] = "$dummy_image_url/restaurants18.jpg";
1774
+		$image_array[] = "$dummy_image_url/restaurants16.jpg";
1775
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1776
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1777
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1778
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1779
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1780
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1781
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1782
+
1783
+		$post_info[] = array(
1784
+			"listing_type" => $post_type,
1785
+			"post_title" => 'Buddakan',
1786
+			"post_desc" => '
1787 1787
 	<h3>The Experience </h3>
1788 1788
 	
1789 1789
 	A towering gilded statue of the Buddha generates elegant calm in this 175-seat, Pan Asian restaurant with sleek, modern decor. Immensely popular, Buddakan is a restaurant that is great for both large parties and intimate dinners.
@@ -1794,87 +1794,87 @@  discard block
 block discarded – undo
1794 1794
 	
1795 1795
 	Be sure to make your reservation before coming to town as Buddakan fills up quickly especially on weekends. Better yet, make your reservation right now .
1796 1796
 	',
1797
-            "post_images" => $image_array,
1798
-            "post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife')),
1799
-            "post_tags" => array('America'),
1800
-            "geodir_video" => '',
1801
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1802
-            "geodir_contact" => '(000) 111-2222',
1803
-            "geodir_email" => '[email protected]',
1804
-            "geodir_website" => 'http://www.buddakan.com/',
1805
-            "geodir_twitter" => 'http://twitter.com/buddakan',
1806
-            "geodir_facebook" => 'http://facebook.com/buddakan',
1807
-            "post_dummy" => '1'
1808
-        );
1809
-        break;
1810
-
1811
-    ////post end///
1812
-    /// Restaurants ////post start 10///
1797
+			"post_images" => $image_array,
1798
+			"post_category" => array($post_type.'category' => array('Restaurants', 'Food Nightlife')),
1799
+			"post_tags" => array('America'),
1800
+			"geodir_video" => '',
1801
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1802
+			"geodir_contact" => '(000) 111-2222',
1803
+			"geodir_email" => '[email protected]',
1804
+			"geodir_website" => 'http://www.buddakan.com/',
1805
+			"geodir_twitter" => 'http://twitter.com/buddakan',
1806
+			"geodir_facebook" => 'http://facebook.com/buddakan',
1807
+			"post_dummy" => '1'
1808
+		);
1809
+		break;
1810
+
1811
+	////post end///
1812
+	/// Restaurants ////post start 10///
1813 1813
 } // end of switch
1814 1814
 
1815 1815
 echo '###4.1';
1816 1816
 foreach ($post_info as $post_info) {echo '###5';
1817
-    $default_location = geodir_get_default_location();
1818
-    if ($city_bound_lat1 > $city_bound_lat2)
1819
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1820
-    else
1821
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1817
+	$default_location = geodir_get_default_location();
1818
+	if ($city_bound_lat1 > $city_bound_lat2)
1819
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1820
+	else
1821
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1822 1822
 
1823 1823
 
1824
-    if ($city_bound_lng1 > $city_bound_lng2)
1825
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1826
-    else
1827
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1824
+	if ($city_bound_lng1 > $city_bound_lng2)
1825
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1826
+	else
1827
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1828 1828
 
1829
-    $load_map = get_option('geodir_load_map');
1829
+	$load_map = get_option('geodir_load_map');
1830 1830
     
1831
-    if ($load_map == 'osm') {
1832
-        $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
1833
-    } else {
1834
-        $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
1835
-    }
1836
-
1837
-    $postal_code = '';
1838
-    if (!empty($post_address)) {
1839
-        if ($load_map == 'osm') {
1840
-            $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : '';
1841
-            $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : '';
1842
-        } else {
1843
-            $addresses = array();
1844
-            $addresses_default = array();
1831
+	if ($load_map == 'osm') {
1832
+		$post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
1833
+	} else {
1834
+		$post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
1835
+	}
1836
+
1837
+	$postal_code = '';
1838
+	if (!empty($post_address)) {
1839
+		if ($load_map == 'osm') {
1840
+			$address = !empty($post_address->formatted_address) ? $post_address->formatted_address : '';
1841
+			$postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : '';
1842
+		} else {
1843
+			$addresses = array();
1844
+			$addresses_default = array();
1845 1845
             
1846
-            foreach ($post_address as $add_key => $add_value) {
1847
-                if ($add_key < 2 && !empty($add_value->long_name)) {
1848
-                    $addresses_default[] = $add_value->long_name;
1849
-                }
1850
-                if ($add_value->types[0] == 'postal_code') {
1851
-                    $postal_code = $add_value->long_name;
1852
-                }
1853
-                if ($add_value->types[0] == 'street_number') {
1854
-                    $addresses[] = $add_value->long_name;
1855
-                }
1856
-                if ($add_value->types[0] == 'route') {
1857
-                    $addresses[] = $add_value->long_name;
1858
-                }
1859
-                if ($add_value->types[0] == 'neighborhood') {
1860
-                    $addresses[] = $add_value->long_name;
1861
-                }
1862
-                if ($add_value->types[0] == 'sublocality') {
1863
-                    $addresses[] = $add_value->long_name;
1864
-                }
1865
-            }
1866
-            $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
1867
-        }
1868
-
1869
-        $post_info['post_address'] = !empty($address) ? $address : $default_location->city;
1870
-        $post_info['post_city'] = $default_location->city;
1871
-        $post_info['post_region'] = $default_location->region;
1872
-        $post_info['post_country'] = $default_location->country;
1873
-        $post_info['post_zip'] = $postal_code;
1874
-        $post_info['post_latitude'] = $dummy_post_latitude;
1875
-        $post_info['post_longitude'] = $dummy_post_longitude;
1876
-    }
1846
+			foreach ($post_address as $add_key => $add_value) {
1847
+				if ($add_key < 2 && !empty($add_value->long_name)) {
1848
+					$addresses_default[] = $add_value->long_name;
1849
+				}
1850
+				if ($add_value->types[0] == 'postal_code') {
1851
+					$postal_code = $add_value->long_name;
1852
+				}
1853
+				if ($add_value->types[0] == 'street_number') {
1854
+					$addresses[] = $add_value->long_name;
1855
+				}
1856
+				if ($add_value->types[0] == 'route') {
1857
+					$addresses[] = $add_value->long_name;
1858
+				}
1859
+				if ($add_value->types[0] == 'neighborhood') {
1860
+					$addresses[] = $add_value->long_name;
1861
+				}
1862
+				if ($add_value->types[0] == 'sublocality') {
1863
+					$addresses[] = $add_value->long_name;
1864
+				}
1865
+			}
1866
+			$address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
1867
+		}
1868
+
1869
+		$post_info['post_address'] = !empty($address) ? $address : $default_location->city;
1870
+		$post_info['post_city'] = $default_location->city;
1871
+		$post_info['post_region'] = $default_location->region;
1872
+		$post_info['post_country'] = $default_location->country;
1873
+		$post_info['post_zip'] = $postal_code;
1874
+		$post_info['post_latitude'] = $dummy_post_latitude;
1875
+		$post_info['post_longitude'] = $dummy_post_longitude;
1876
+	}
1877 1877
     
1878
-    geodir_save_listing($post_info, true);
1879
-    echo '###6';
1878
+	geodir_save_listing($post_info, true);
1879
+	echo '###6';
1880 1880
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
  * @package GeoDirectory
7 7
  */
8 8
 
9
-global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index;
9
+global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2, $wpdb, $current_user, $dummy_post_index;
10 10
 $post_info = array();
11 11
 $image_array = array();
12 12
 $post_meta = array();
13 13
 
14
-if($dummy_post_index==1){
14
+if ($dummy_post_index == 1) {
15 15
     $category_array = array('Attractions', 'Hotels', 'Restaurants', 'Food Nightlife', 'Festival', 'Videos', 'Feature');
16
-    geodir_dummy_data_taxonomies($post_type,$category_array );
17
-    update_option($post_type.'_dummy_data_type','standard_places');
16
+    geodir_dummy_data_taxonomies($post_type, $category_array);
17
+    update_option($post_type.'_dummy_data_type', 'standard_places');
18 18
 }
19 19
 
20 20
 if (geodir_dummy_folder_exists())
21
-    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
21
+    $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy";
22 22
 else
23 23
     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
24 24
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,10 +17,11 @@  discard block
 block discarded – undo
17 17
     update_option($post_type.'_dummy_data_type','standard_places');
18 18
 }
19 19
 
20
-if (geodir_dummy_folder_exists())
20
+if (geodir_dummy_folder_exists()) {
21 21
     $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
22
-else
22
+} else {
23 23
     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
24
+}
24 25
 
25 26
 $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
26 27
 
@@ -1815,16 +1816,18 @@  discard block
 block discarded – undo
1815 1816
 echo '###4.1';
1816 1817
 foreach ($post_info as $post_info) {echo '###5';
1817 1818
     $default_location = geodir_get_default_location();
1818
-    if ($city_bound_lat1 > $city_bound_lat2)
1819
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1820
-    else
1821
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1819
+    if ($city_bound_lat1 > $city_bound_lat2) {
1820
+            $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1821
+    } else {
1822
+            $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1823
+    }
1822 1824
 
1823 1825
 
1824
-    if ($city_bound_lng1 > $city_bound_lng2)
1825
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1826
-    else
1827
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1826
+    if ($city_bound_lng1 > $city_bound_lng2) {
1827
+            $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1828
+    } else {
1829
+            $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1830
+    }
1828 1831
 
1829 1832
     $load_map = get_option('geodir_load_map');
1830 1833
     
Please login to merge, or discard this patch.
geodirectory-admin/admin_dummy_data_functions.php 3 patches
Braces   +13 added lines, -11 removed lines patch added patch discarded remove patch
@@ -42,10 +42,11 @@  discard block
 block discarded – undo
42 42
                     }
43 43
 
44 44
 
45
-                    if (geodir_dummy_folder_exists())
46
-                        $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
47
-                    else
48
-                        $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
45
+                    if (geodir_dummy_folder_exists()) {
46
+                                            $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
47
+                    } else {
48
+                                            $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
49
+                    }
49 50
 
50 51
                     $dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
51 52
 
@@ -86,10 +87,11 @@  discard block
 block discarded – undo
86 87
             if (!term_exists($catname, $post_type.'category')) {
87 88
                 $last_catid = wp_insert_term($catname, $post_type.'category');
88 89
 
89
-                if (geodir_dummy_folder_exists())
90
-                    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
91
-                else
92
-                    $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
90
+                if (geodir_dummy_folder_exists()) {
91
+                                    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
92
+                } else {
93
+                                    $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
94
+                }
93 95
 
94 96
                 $dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
95 97
 
@@ -218,7 +220,7 @@  discard block
 block discarded – undo
218 220
                  * @package GeoDirectory
219 221
                  */
220 222
                 include_once( 'dummy-data/standard_places.php' );
221
-            }elseif($key=='property_sale'){
223
+            } elseif($key=='property_sale'){
222 224
                 /**
223 225
                  * Contains dummy property for sale post content.
224 226
                  *
@@ -226,7 +228,7 @@  discard block
 block discarded – undo
226 228
                  * @package GeoDirectory
227 229
                  */
228 230
                 include_once( 'dummy-data/property_sale.php' );
229
-            }elseif($key=='property_rent'){
231
+            } elseif($key=='property_rent'){
230 232
                 /**
231 233
                  * Contains dummy property for sale post content.
232 234
                  *
@@ -330,7 +332,7 @@  discard block
 block discarded – undo
330 332
 
331 333
                     if($post_counts > 0){
332 334
                         echo '<td><input type="button" value="'.__('Remove data','geodirectory').'" class="button-primary geodir_dummy_button gd-remove-data" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
333
-                    }else{
335
+                    } else{
334 336
                         echo '<td><input type="button" value="'.__('Insert data','geodirectory').'" class="button-primary geodir_dummy_button" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
335 337
                     }
336 338
 
Please login to merge, or discard this patch.
Indentation   +230 added lines, -230 removed lines patch added patch discarded remove patch
@@ -19,149 +19,149 @@  discard block
 block discarded – undo
19 19
  * @global string $dummy_image_path The dummy image path.
20 20
  */
21 21
 function geodir_dummy_data_taxonomies($post_type,$category_array) {
22
-    global $wpdb, $dummy_image_path;
22
+	global $wpdb, $dummy_image_path;
23 23
 
24 24
 
25 25
 
26
-    $last_catid = '';
26
+	$last_catid = '';
27 27
 
28
-    $uploads = wp_upload_dir(); // Array of key => value pairs
28
+	$uploads = wp_upload_dir(); // Array of key => value pairs
29 29
 
30
-    for ($i = 0; $i < count($category_array); $i++) {
31
-        $parent_catid = 0;
32
-        if (is_array($category_array[$i])) {
33
-            $cat_name_arr = $category_array[$i];
34
-            for ($j = 0; $j < count($cat_name_arr); $j++) {
35
-                $catname = $cat_name_arr[$j];
30
+	for ($i = 0; $i < count($category_array); $i++) {
31
+		$parent_catid = 0;
32
+		if (is_array($category_array[$i])) {
33
+			$cat_name_arr = $category_array[$i];
34
+			for ($j = 0; $j < count($cat_name_arr); $j++) {
35
+				$catname = $cat_name_arr[$j];
36 36
 
37
-                if (!term_exists($catname, $post_type.'category')) {
38
-                    $last_catid = wp_insert_term($catname, $post_type.'category', $args = array('parent' => $parent_catid));
37
+				if (!term_exists($catname, $post_type.'category')) {
38
+					$last_catid = wp_insert_term($catname, $post_type.'category', $args = array('parent' => $parent_catid));
39 39
 
40
-                    if ($j == 0) {
41
-                        $parent_catid = $last_catid;
42
-                    }
40
+					if ($j == 0) {
41
+						$parent_catid = $last_catid;
42
+					}
43 43
 
44 44
 
45
-                    if (geodir_dummy_folder_exists())
46
-                        $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
47
-                    else
48
-                        $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
45
+					if (geodir_dummy_folder_exists())
46
+						$dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
47
+					else
48
+						$dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
49 49
 
50
-                    $dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
50
+					$dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
51 51
 
52
-                    $catname = str_replace(' ', '_', $catname);
53
-                    $uploaded = (array)fetch_remote_file("$dummy_image_url/" . $catname . ".png");
52
+					$catname = str_replace(' ', '_', $catname);
53
+					$uploaded = (array)fetch_remote_file("$dummy_image_url/" . $catname . ".png");
54 54
 
55
-                    if (empty($uploaded['error'])) {
56
-                        $new_path = $uploaded['file'];
57
-                        $new_url = $uploaded['url'];
58
-                    }
55
+					if (empty($uploaded['error'])) {
56
+						$new_path = $uploaded['file'];
57
+						$new_url = $uploaded['url'];
58
+					}
59 59
 
60
-                    $wp_filetype = wp_check_filetype(basename($new_path), null);
61
-
62
-                    $attachment = array(
63
-                        'guid' => $uploads['baseurl'] . '/' . basename($new_path),
64
-                        'post_mime_type' => $wp_filetype['type'],
65
-                        'post_title' => preg_replace('/\.[^.]+$/', '', basename($new_path)),
66
-                        'post_content' => '',
67
-                        'post_status' => 'inherit'
68
-                    );
69
-                    $attach_id = wp_insert_attachment($attachment, $new_path);
70
-
71
-                    // you must first include the image.php file
72
-                    // for the function wp_generate_attachment_metadata() to work
73
-                    require_once(ABSPATH . 'wp-admin/includes/image.php');
74
-                    $attach_data = wp_generate_attachment_metadata($attach_id, $new_path);
75
-                    wp_update_attachment_metadata($attach_id, $attach_data);
76
-
77
-                    if (!get_tax_meta($last_catid['term_id'], 'ct_cat_icon', false, $post_type)) {
78
-                        update_tax_meta($last_catid['term_id'], 'ct_cat_icon', array('id' => 'icon', 'src' => $new_url), $post_type);
79
-                    }
80
-                }
81
-            }
60
+					$wp_filetype = wp_check_filetype(basename($new_path), null);
82 61
 
83
-        } else {
84
-            $catname = $category_array[$i];
62
+					$attachment = array(
63
+						'guid' => $uploads['baseurl'] . '/' . basename($new_path),
64
+						'post_mime_type' => $wp_filetype['type'],
65
+						'post_title' => preg_replace('/\.[^.]+$/', '', basename($new_path)),
66
+						'post_content' => '',
67
+						'post_status' => 'inherit'
68
+					);
69
+					$attach_id = wp_insert_attachment($attachment, $new_path);
85 70
 
86
-            if (!term_exists($catname, $post_type.'category')) {
87
-                $last_catid = wp_insert_term($catname, $post_type.'category');
71
+					// you must first include the image.php file
72
+					// for the function wp_generate_attachment_metadata() to work
73
+					require_once(ABSPATH . 'wp-admin/includes/image.php');
74
+					$attach_data = wp_generate_attachment_metadata($attach_id, $new_path);
75
+					wp_update_attachment_metadata($attach_id, $attach_data);
88 76
 
89
-                if (geodir_dummy_folder_exists())
90
-                    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
91
-                else
92
-                    $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
77
+					if (!get_tax_meta($last_catid['term_id'], 'ct_cat_icon', false, $post_type)) {
78
+						update_tax_meta($last_catid['term_id'], 'ct_cat_icon', array('id' => 'icon', 'src' => $new_url), $post_type);
79
+					}
80
+				}
81
+			}
93 82
 
94
-                $dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
83
+		} else {
84
+			$catname = $category_array[$i];
95 85
 
96
-                $catname = str_replace(' ', '_', $catname);
97
-                $uploaded = (array)fetch_remote_file("$dummy_image_url/" . $catname . ".png");
86
+			if (!term_exists($catname, $post_type.'category')) {
87
+				$last_catid = wp_insert_term($catname, $post_type.'category');
98 88
 
99
-                if (empty($uploaded['error'])) {
100
-                    $new_path = $uploaded['file'];
101
-                    $new_url = $uploaded['url'];
102
-                }
89
+				if (geodir_dummy_folder_exists())
90
+					$dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
91
+				else
92
+					$dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
103 93
 
104
-                $wp_filetype = wp_check_filetype(basename($new_path), null);
94
+				$dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
105 95
 
106
-                $attachment = array(
107
-                    'guid' => $uploads['baseurl'] . '/' . basename($new_path),
108
-                    'post_mime_type' => $wp_filetype['type'],
109
-                    'post_title' => preg_replace('/\.[^.]+$/', '', basename($new_path)),
110
-                    'post_content' => '',
111
-                    'post_status' => 'inherit'
112
-                );
96
+				$catname = str_replace(' ', '_', $catname);
97
+				$uploaded = (array)fetch_remote_file("$dummy_image_url/" . $catname . ".png");
113 98
 
114
-                $attach_id = wp_insert_attachment($attachment, $new_path);
99
+				if (empty($uploaded['error'])) {
100
+					$new_path = $uploaded['file'];
101
+					$new_url = $uploaded['url'];
102
+				}
115 103
 
104
+				$wp_filetype = wp_check_filetype(basename($new_path), null);
116 105
 
117
-                // you must first include the image.php file
118
-                // for the function wp_generate_attachment_metadata() to work
119
-                require_once(ABSPATH . 'wp-admin/includes/image.php');
120
-                $attach_data = wp_generate_attachment_metadata($attach_id, $new_path);
121
-                wp_update_attachment_metadata($attach_id, $attach_data);
106
+				$attachment = array(
107
+					'guid' => $uploads['baseurl'] . '/' . basename($new_path),
108
+					'post_mime_type' => $wp_filetype['type'],
109
+					'post_title' => preg_replace('/\.[^.]+$/', '', basename($new_path)),
110
+					'post_content' => '',
111
+					'post_status' => 'inherit'
112
+				);
113
+
114
+				$attach_id = wp_insert_attachment($attachment, $new_path);
122 115
 
123
-                if (!get_tax_meta($last_catid['term_id'], 'ct_cat_icon', false, $post_type)) {
124
-                    update_tax_meta($last_catid['term_id'], 'ct_cat_icon', array('id' => $attach_id, 'src' => $new_url), $post_type);
125
-                }
126
-            }
127
-        }
128 116
 
129
-    }
117
+				// you must first include the image.php file
118
+				// for the function wp_generate_attachment_metadata() to work
119
+				require_once(ABSPATH . 'wp-admin/includes/image.php');
120
+				$attach_data = wp_generate_attachment_metadata($attach_id, $new_path);
121
+				wp_update_attachment_metadata($attach_id, $attach_data);
122
+
123
+				if (!get_tax_meta($last_catid['term_id'], 'ct_cat_icon', false, $post_type)) {
124
+					update_tax_meta($last_catid['term_id'], 'ct_cat_icon', array('id' => $attach_id, 'src' => $new_url), $post_type);
125
+				}
126
+			}
127
+		}
128
+
129
+	}
130 130
 }
131 131
 
132 132
 
133 133
 function geodir_dummy_data_types(){
134
-    return array(
135
-        'standard_places' => array(
136
-            'name'=>__('Default','geodirectory'),
137
-            'count'=> 30
138
-        ),
139
-        'property_sale' => array(
140
-            'name'=>__('Property for sale','geodirectory'),
141
-            'count'=> 10
142
-        ),
143
-        'property_rent' => array(
144
-            'name'=>__('Property for rent','geodirectory'),
145
-            'count'=> 10
146
-        )
147
-    );
134
+	return array(
135
+		'standard_places' => array(
136
+			'name'=>__('Default','geodirectory'),
137
+			'count'=> 30
138
+		),
139
+		'property_sale' => array(
140
+			'name'=>__('Property for sale','geodirectory'),
141
+			'count'=> 10
142
+		),
143
+		'property_rent' => array(
144
+			'name'=>__('Property for rent','geodirectory'),
145
+			'count'=> 10
146
+		)
147
+	);
148 148
 }
149 149
 
150 150
 
151 151
 function geodir_create_dummy_fields($fields)
152 152
 {
153 153
     
154
-    /**
155
-     * Filter the array of default custom fields DB table data.
156
-     *
157
-     * @since 1.0.0
158
-     * @param string $fields The default custom fields as an array.
159
-     */
160
-    $fields = apply_filters('geodir_before_dummy_custom_fields_saved', $fields);
161
-    foreach ($fields as $field_index => $field) {
162
-        geodir_custom_field_save($field);
163
-
164
-    }
154
+	/**
155
+	 * Filter the array of default custom fields DB table data.
156
+	 *
157
+	 * @since 1.0.0
158
+	 * @param string $fields The default custom fields as an array.
159
+	 */
160
+	$fields = apply_filters('geodir_before_dummy_custom_fields_saved', $fields);
161
+	foreach ($fields as $field_index => $field) {
162
+		geodir_custom_field_save($field);
163
+
164
+	}
165 165
 }
166 166
 
167 167
 /**
@@ -174,20 +174,20 @@  discard block
 block discarded – undo
174 174
  */
175 175
 function geodir_delete_dummy_posts($post_type,$data_type)
176 176
 {
177
-    global $wpdb, $plugin_prefix;
177
+	global $wpdb, $plugin_prefix;
178 178
 
179 179
 
180
-    $post_ids = $wpdb->get_results("SELECT post_id FROM " . $plugin_prefix . $post_type."_detail WHERE post_dummy='1'");
180
+	$post_ids = $wpdb->get_results("SELECT post_id FROM " . $plugin_prefix . $post_type."_detail WHERE post_dummy='1'");
181 181
 
182 182
 
183
-    foreach ($post_ids as $post_ids_obj) {
184
-        wp_delete_post($post_ids_obj->post_id);
185
-    }
183
+	foreach ($post_ids as $post_ids_obj) {
184
+		wp_delete_post($post_ids_obj->post_id);
185
+	}
186 186
 
187
-    //double check posts are deleted
188
-    $wpdb->get_results("DELETE FROM " . $plugin_prefix . $post_type. "_detail WHERE post_dummy='1'");
187
+	//double check posts are deleted
188
+	$wpdb->get_results("DELETE FROM " . $plugin_prefix . $post_type. "_detail WHERE post_dummy='1'");
189 189
 
190
-    update_option($post_type.'_dummy_data_type','');
190
+	update_option($post_type.'_dummy_data_type','');
191 191
 }
192 192
 
193 193
 /**
@@ -201,78 +201,78 @@  discard block
 block discarded – undo
201 201
 function geodir_insert_dummy_posts($post_type,$data_type,$item_index)
202 202
 {
203 203
 
204
-    ini_set('max_execution_time', 999999); //300 seconds = 5 minutes
205
-    $data_types = geodir_dummy_data_types();
206
-
207
-    $total_count = 0;
208
-    global $dummy_post_index;
209
-    $dummy_post_index = $item_index;
210
-    foreach( $data_types as $key=>$val){
211
-        if($key==$data_type){
212
-            $total_count = $val['count'];
213
-            if($key=='standard_places'){
214
-                /**
215
-                 * Contains dummy post content.
216
-                 *
217
-                 * @since 1.0.0
218
-                 * @package GeoDirectory
219
-                 */
220
-                include_once( 'dummy-data/standard_places.php' );
221
-            }elseif($key=='property_sale'){
222
-                /**
223
-                 * Contains dummy property for sale post content.
224
-                 *
225
-                 * @since 1.6.11
226
-                 * @package GeoDirectory
227
-                 */
228
-                include_once( 'dummy-data/property_sale.php' );
229
-            }elseif($key=='property_rent'){
230
-                /**
231
-                 * Contains dummy property for sale post content.
232
-                 *
233
-                 * @since 1.6.11
234
-                 * @package GeoDirectory
235
-                 */
236
-                include_once( 'dummy-data/property_rent.php' );
237
-            }
238
-
239
-        }
240
-
241
-        do_action('geodir_insert_dummy_data_loop',$post_type,$data_type,$item_index);
242
-    }
243
-
244
-
245
-
246
-    // delete image cache on last entry
247
-    if($total_count == $item_index){
248
-        delete_transient( 'cached_dummy_images' );
249
-        flush_rewrite_rules();
250
-    }
204
+	ini_set('max_execution_time', 999999); //300 seconds = 5 minutes
205
+	$data_types = geodir_dummy_data_types();
206
+
207
+	$total_count = 0;
208
+	global $dummy_post_index;
209
+	$dummy_post_index = $item_index;
210
+	foreach( $data_types as $key=>$val){
211
+		if($key==$data_type){
212
+			$total_count = $val['count'];
213
+			if($key=='standard_places'){
214
+				/**
215
+				 * Contains dummy post content.
216
+				 *
217
+				 * @since 1.0.0
218
+				 * @package GeoDirectory
219
+				 */
220
+				include_once( 'dummy-data/standard_places.php' );
221
+			}elseif($key=='property_sale'){
222
+				/**
223
+				 * Contains dummy property for sale post content.
224
+				 *
225
+				 * @since 1.6.11
226
+				 * @package GeoDirectory
227
+				 */
228
+				include_once( 'dummy-data/property_sale.php' );
229
+			}elseif($key=='property_rent'){
230
+				/**
231
+				 * Contains dummy property for sale post content.
232
+				 *
233
+				 * @since 1.6.11
234
+				 * @package GeoDirectory
235
+				 */
236
+				include_once( 'dummy-data/property_rent.php' );
237
+			}
238
+
239
+		}
240
+
241
+		do_action('geodir_insert_dummy_data_loop',$post_type,$data_type,$item_index);
242
+	}
243
+
244
+
245
+
246
+	// delete image cache on last entry
247
+	if($total_count == $item_index){
248
+		delete_transient( 'cached_dummy_images' );
249
+		flush_rewrite_rules();
250
+	}
251 251
 
252 252
 
253 253
 }
254 254
 
255 255
 
256 256
 if (!function_exists('geodir_autoinstall_admin_header') && (get_option('geodir_installed') || defined( 'GD_TESTING_MODE' ))) {
257
-    /**
258
-     * GeoDirectory dummy data installation.
259
-     *
260
-     * @since 1.0.0
261
-     * @package GeoDirectory
262
-     * @global object $wpdb WordPress Database object.
263
-     * @global string $plugin_prefix Geodirectory plugin table prefix.
264
-     * @param string $post_type The post type.
265
-     */
266
-    function geodir_autoinstall_admin_header($post_type = 'gd_place')
267
-    {
268
-
269
-        global $wpdb, $plugin_prefix;
270
-
271
-        if (!geodir_is_default_location_set()) {
272
-            echo '<div class="updated fade"><p><strong>' . sprintf(__('Please %sclick here%s to set a default location, this will help to set location of all dummy data.', 'geodirectory'), '<a href=\'' . admin_url('admin.php?page=geodirectory&tab=default_location_settings') . '\'>', '</a>') . '</strong></p></div>';
273
-        } else {
274
-
275
-            ?>
257
+	/**
258
+	 * GeoDirectory dummy data installation.
259
+	 *
260
+	 * @since 1.0.0
261
+	 * @package GeoDirectory
262
+	 * @global object $wpdb WordPress Database object.
263
+	 * @global string $plugin_prefix Geodirectory plugin table prefix.
264
+	 * @param string $post_type The post type.
265
+	 */
266
+	function geodir_autoinstall_admin_header($post_type = 'gd_place')
267
+	{
268
+
269
+		global $wpdb, $plugin_prefix;
270
+
271
+		if (!geodir_is_default_location_set()) {
272
+			echo '<div class="updated fade"><p><strong>' . sprintf(__('Please %sclick here%s to set a default location, this will help to set location of all dummy data.', 'geodirectory'), '<a href=\'' . admin_url('admin.php?page=geodirectory&tab=default_location_settings') . '\'>', '</a>') . '</strong></p></div>';
273
+		} else {
274
+
275
+			?>
276 276
             <table class="form-table gd-dummy-table">
277 277
                 <tbody>
278 278
                 <tr>
@@ -283,77 +283,77 @@  discard block
 block discarded – undo
283 283
 
284 284
                 <?php
285 285
 
286
-                $cpts = geodir_get_posttypes('array');
286
+				$cpts = geodir_get_posttypes('array');
287 287
 
288
-                $data_types = geodir_dummy_data_types();
288
+				$data_types = geodir_dummy_data_types();
289 289
 
290
-                $nonce = wp_create_nonce('geodir_dummy_posts_insert_noncename');
290
+				$nonce = wp_create_nonce('geodir_dummy_posts_insert_noncename');
291 291
 
292
-                foreach($cpts as $post_type=>$cpt){
292
+				foreach($cpts as $post_type=>$cpt){
293 293
 
294
-                    $data_types_for = apply_filters('geodir_dummy_date_types_for',$data_types,$post_type);
294
+					$data_types_for = apply_filters('geodir_dummy_date_types_for',$data_types,$post_type);
295 295
 
296 296
 
297
-                    $set_dt = get_option($post_type.'_dummy_data_type');
297
+					$set_dt = get_option($post_type.'_dummy_data_type');
298 298
 
299
-                    $count = 30;
299
+					$count = 30;
300 300
 
301
-                    geodir_add_column_if_not_exist($plugin_prefix . $post_type. "_detail", 'post_dummy', "enum( '1', '0' ) NULL DEFAULT '0'");
301
+					geodir_add_column_if_not_exist($plugin_prefix . $post_type. "_detail", 'post_dummy', "enum( '1', '0' ) NULL DEFAULT '0'");
302 302
 
303
-                    $post_counts = $wpdb->get_var("SELECT count(post_id) FROM " . $plugin_prefix . $post_type . "_detail WHERE post_dummy='1'");
303
+					$post_counts = $wpdb->get_var("SELECT count(post_id) FROM " . $plugin_prefix . $post_type . "_detail WHERE post_dummy='1'");
304 304
 
305
-                    echo "<tr>";
306
-                    echo "<td><strong>".$cpt['labels']['name']."</strong></td>";
305
+					echo "<tr>";
306
+					echo "<td><strong>".$cpt['labels']['name']."</strong></td>";
307 307
 
308 308
 
309
-                    $select_disabled = $post_counts > 0 ? 'disabled' : '';
310
-                    echo "<td>";
311
-                    echo "<select id='".$post_type."_data_type' onchange='geodir_dummy_set_count(this,\"$post_type\");' $select_disabled>";
312
-                    foreach($data_types_for as $key=>$val){
313
-                        $selected = ($key==$set_dt) ? "selected='selected'" : '';
314
-                        if($selected){$count = $val['count'];}
315
-                        echo "<option $selected value='$key' data-count='".$val['count']."'>".$val['name']."</option>";
316
-                    }
317
-                    echo "</select>";
318
-
319
-                    $select_display = $post_counts > 0 ? 'display:none;' : '';
320
-                    echo "<select id='".$post_type."_data_type_count' style='$select_display' >";
321
-                    $x = 1;
322
-                    while($x <= $count){
323
-                        $selected = ($x==$count) ? "selected='selected'" : '';
324
-                        echo "<option $selected value='$x'>".$x."</option>";
325
-                        $x++;
326
-                    }
327
-                    echo "</select>";
328
-                    echo "</td>";
309
+					$select_disabled = $post_counts > 0 ? 'disabled' : '';
310
+					echo "<td>";
311
+					echo "<select id='".$post_type."_data_type' onchange='geodir_dummy_set_count(this,\"$post_type\");' $select_disabled>";
312
+					foreach($data_types_for as $key=>$val){
313
+						$selected = ($key==$set_dt) ? "selected='selected'" : '';
314
+						if($selected){$count = $val['count'];}
315
+						echo "<option $selected value='$key' data-count='".$val['count']."'>".$val['name']."</option>";
316
+					}
317
+					echo "</select>";
329 318
 
319
+					$select_display = $post_counts > 0 ? 'display:none;' : '';
320
+					echo "<select id='".$post_type."_data_type_count' style='$select_display' >";
321
+					$x = 1;
322
+					while($x <= $count){
323
+						$selected = ($x==$count) ? "selected='selected'" : '';
324
+						echo "<option $selected value='$x'>".$x."</option>";
325
+						$x++;
326
+					}
327
+					echo "</select>";
328
+					echo "</td>";
330 329
 
331 330
 
332 331
 
333 332
 
334
-                    if($post_counts > 0){
335
-                        echo '<td><input type="button" value="'.__('Remove data','geodirectory').'" class="button-primary geodir_dummy_button gd-remove-data" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
336
-                    }else{
337
-                        echo '<td><input type="button" value="'.__('Insert data','geodirectory').'" class="button-primary geodir_dummy_button" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
338
-                    }
339 333
 
340
-                    echo "</tr>";
341
-                    //print_r($cpt);
342
-                }
334
+					if($post_counts > 0){
335
+						echo '<td><input type="button" value="'.__('Remove data','geodirectory').'" class="button-primary geodir_dummy_button gd-remove-data" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
336
+					}else{
337
+						echo '<td><input type="button" value="'.__('Insert data','geodirectory').'" class="button-primary geodir_dummy_button" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
338
+					}
339
+
340
+					echo "</tr>";
341
+					//print_r($cpt);
342
+				}
343 343
 
344
-                ?>
344
+				?>
345 345
                 </tbody>
346 346
             </table>
347 347
             <?php
348 348
 
349 349
 
350
-            $default_location = geodir_get_default_location();
351
-            $city = isset($default_location->city) ? $default_location->city : '';
352
-            $region = isset($default_location->region) ? $default_location->region : '';
353
-            $country = isset($default_location->country) ? $default_location->country : '';
354
-            $city_latitude = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
355
-            $city_longitude = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
356
-            ?>
350
+			$default_location = geodir_get_default_location();
351
+			$city = isset($default_location->city) ? $default_location->city : '';
352
+			$region = isset($default_location->region) ? $default_location->region : '';
353
+			$country = isset($default_location->country) ? $default_location->country : '';
354
+			$city_latitude = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
355
+			$city_longitude = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
356
+			?>
357 357
             <script type="text/javascript">
358 358
 
359 359
                 function geodir_dummy_set_count(data,cpt){
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
                 }
564 564
             </script>
565 565
             <?php
566
-        }
567
-    }
566
+		}
567
+	}
568 568
 }
569 569
 
Please login to merge, or discard this patch.
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @global object $wpdb WordPress Database object.
19 19
  * @global string $dummy_image_path The dummy image path.
20 20
  */
21
-function geodir_dummy_data_taxonomies($post_type,$category_array) {
21
+function geodir_dummy_data_taxonomies($post_type, $category_array) {
22 22
     global $wpdb, $dummy_image_path;
23 23
 
24 24
 
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 
44 44
 
45 45
                     if (geodir_dummy_folder_exists())
46
-                        $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
46
+                        $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy/cat_icon";
47 47
                     else
48 48
                         $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
49 49
 
50 50
                     $dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
51 51
 
52 52
                     $catname = str_replace(' ', '_', $catname);
53
-                    $uploaded = (array)fetch_remote_file("$dummy_image_url/" . $catname . ".png");
53
+                    $uploaded = (array) fetch_remote_file("$dummy_image_url/".$catname.".png");
54 54
 
55 55
                     if (empty($uploaded['error'])) {
56 56
                         $new_path = $uploaded['file'];
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                     $wp_filetype = wp_check_filetype(basename($new_path), null);
61 61
 
62 62
                     $attachment = array(
63
-                        'guid' => $uploads['baseurl'] . '/' . basename($new_path),
63
+                        'guid' => $uploads['baseurl'].'/'.basename($new_path),
64 64
                         'post_mime_type' => $wp_filetype['type'],
65 65
                         'post_title' => preg_replace('/\.[^.]+$/', '', basename($new_path)),
66 66
                         'post_content' => '',
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
                     // you must first include the image.php file
72 72
                     // for the function wp_generate_attachment_metadata() to work
73
-                    require_once(ABSPATH . 'wp-admin/includes/image.php');
73
+                    require_once(ABSPATH.'wp-admin/includes/image.php');
74 74
                     $attach_data = wp_generate_attachment_metadata($attach_id, $new_path);
75 75
                     wp_update_attachment_metadata($attach_id, $attach_data);
76 76
 
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
                 $last_catid = wp_insert_term($catname, $post_type.'category');
88 88
 
89 89
                 if (geodir_dummy_folder_exists())
90
-                    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy/cat_icon";
90
+                    $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy/cat_icon";
91 91
                 else
92 92
                     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy/cat_icon';
93 93
 
94 94
                 $dummy_image_url = apply_filters('place_dummy_cat_image_url', $dummy_image_url);
95 95
 
96 96
                 $catname = str_replace(' ', '_', $catname);
97
-                $uploaded = (array)fetch_remote_file("$dummy_image_url/" . $catname . ".png");
97
+                $uploaded = (array) fetch_remote_file("$dummy_image_url/".$catname.".png");
98 98
 
99 99
                 if (empty($uploaded['error'])) {
100 100
                     $new_path = $uploaded['file'];
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 $wp_filetype = wp_check_filetype(basename($new_path), null);
105 105
 
106 106
                 $attachment = array(
107
-                    'guid' => $uploads['baseurl'] . '/' . basename($new_path),
107
+                    'guid' => $uploads['baseurl'].'/'.basename($new_path),
108 108
                     'post_mime_type' => $wp_filetype['type'],
109 109
                     'post_title' => preg_replace('/\.[^.]+$/', '', basename($new_path)),
110 110
                     'post_content' => '',
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
                 // you must first include the image.php file
118 118
                 // for the function wp_generate_attachment_metadata() to work
119
-                require_once(ABSPATH . 'wp-admin/includes/image.php');
119
+                require_once(ABSPATH.'wp-admin/includes/image.php');
120 120
                 $attach_data = wp_generate_attachment_metadata($attach_id, $new_path);
121 121
                 wp_update_attachment_metadata($attach_id, $attach_data);
122 122
 
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
 }
131 131
 
132 132
 
133
-function geodir_dummy_data_types(){
133
+function geodir_dummy_data_types() {
134 134
     return array(
135 135
         'standard_places' => array(
136
-            'name'=>__('Default','geodirectory'),
136
+            'name'=>__('Default', 'geodirectory'),
137 137
             'count'=> 30
138 138
         ),
139 139
         'property_sale' => array(
140
-            'name'=>__('Property for sale','geodirectory'),
140
+            'name'=>__('Property for sale', 'geodirectory'),
141 141
             'count'=> 10
142 142
         ),
143 143
         'property_rent' => array(
144
-            'name'=>__('Property for rent','geodirectory'),
144
+            'name'=>__('Property for rent', 'geodirectory'),
145 145
             'count'=> 10
146 146
         )
147 147
     );
@@ -172,12 +172,12 @@  discard block
 block discarded – undo
172 172
  * @global object $wpdb WordPress Database object.
173 173
  * @global string $plugin_prefix Geodirectory plugin table prefix.
174 174
  */
175
-function geodir_delete_dummy_posts($post_type,$data_type)
175
+function geodir_delete_dummy_posts($post_type, $data_type)
176 176
 {
177 177
     global $wpdb, $plugin_prefix;
178 178
 
179 179
 
180
-    $post_ids = $wpdb->get_results("SELECT post_id FROM " . $plugin_prefix . $post_type."_detail WHERE post_dummy='1'");
180
+    $post_ids = $wpdb->get_results("SELECT post_id FROM ".$plugin_prefix.$post_type."_detail WHERE post_dummy='1'");
181 181
 
182 182
 
183 183
     foreach ($post_ids as $post_ids_obj) {
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
     }
186 186
 
187 187
     //double check posts are deleted
188
-    $wpdb->get_results("DELETE FROM " . $plugin_prefix . $post_type. "_detail WHERE post_dummy='1'");
188
+    $wpdb->get_results("DELETE FROM ".$plugin_prefix.$post_type."_detail WHERE post_dummy='1'");
189 189
 
190
-    update_option($post_type.'_dummy_data_type','');
190
+    update_option($post_type.'_dummy_data_type', '');
191 191
 }
192 192
 
193 193
 /**
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
  * @global object $wpdb WordPress Database object.
199 199
  * @global object $current_user Current user object.
200 200
  */
201
-function geodir_insert_dummy_posts($post_type,$data_type,$item_index)
201
+function geodir_insert_dummy_posts($post_type, $data_type, $item_index)
202 202
 {
203 203
 
204 204
     ini_set('max_execution_time', 999999); //300 seconds = 5 minutes
@@ -207,45 +207,45 @@  discard block
 block discarded – undo
207 207
     $total_count = 0;
208 208
     global $dummy_post_index;
209 209
     $dummy_post_index = $item_index;
210
-    foreach( $data_types as $key=>$val){
211
-        if($key==$data_type){
210
+    foreach ($data_types as $key=>$val) {
211
+        if ($key == $data_type) {
212 212
             $total_count = $val['count'];
213
-            if($key=='standard_places'){
213
+            if ($key == 'standard_places') {
214 214
                 /**
215 215
                  * Contains dummy post content.
216 216
                  *
217 217
                  * @since 1.0.0
218 218
                  * @package GeoDirectory
219 219
                  */
220
-                include_once( 'dummy-data/standard_places.php' );
221
-            }elseif($key=='property_sale'){
220
+                include_once('dummy-data/standard_places.php');
221
+            }elseif ($key == 'property_sale') {
222 222
                 /**
223 223
                  * Contains dummy property for sale post content.
224 224
                  *
225 225
                  * @since 1.6.11
226 226
                  * @package GeoDirectory
227 227
                  */
228
-                include_once( 'dummy-data/property_sale.php' );
229
-            }elseif($key=='property_rent'){
228
+                include_once('dummy-data/property_sale.php');
229
+            }elseif ($key == 'property_rent') {
230 230
                 /**
231 231
                  * Contains dummy property for sale post content.
232 232
                  *
233 233
                  * @since 1.6.11
234 234
                  * @package GeoDirectory
235 235
                  */
236
-                include_once( 'dummy-data/property_rent.php' );
236
+                include_once('dummy-data/property_rent.php');
237 237
             }
238 238
 
239 239
         }
240 240
 
241
-        do_action('geodir_insert_dummy_data_loop',$post_type,$data_type,$item_index);
241
+        do_action('geodir_insert_dummy_data_loop', $post_type, $data_type, $item_index);
242 242
     }
243 243
 
244 244
 
245 245
 
246 246
     // delete image cache on last entry
247
-    if($total_count == $item_index){
248
-        delete_transient( 'cached_dummy_images' );
247
+    if ($total_count == $item_index) {
248
+        delete_transient('cached_dummy_images');
249 249
         flush_rewrite_rules();
250 250
     }
251 251
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 }
254 254
 
255 255
 
256
-if (!function_exists('geodir_autoinstall_admin_header') && (get_option('geodir_installed') || defined( 'GD_TESTING_MODE' ))) {
256
+if (!function_exists('geodir_autoinstall_admin_header') && (get_option('geodir_installed') || defined('GD_TESTING_MODE'))) {
257 257
     /**
258 258
      * GeoDirectory dummy data installation.
259 259
      *
@@ -269,16 +269,16 @@  discard block
 block discarded – undo
269 269
         global $wpdb, $plugin_prefix;
270 270
 
271 271
         if (!geodir_is_default_location_set()) {
272
-            echo '<div class="updated fade"><p><strong>' . sprintf(__('Please %sclick here%s to set a default location, this will help to set location of all dummy data.', 'geodirectory'), '<a href=\'' . admin_url('admin.php?page=geodirectory&tab=default_location_settings') . '\'>', '</a>') . '</strong></p></div>';
272
+            echo '<div class="updated fade"><p><strong>'.sprintf(__('Please %sclick here%s to set a default location, this will help to set location of all dummy data.', 'geodirectory'), '<a href=\''.admin_url('admin.php?page=geodirectory&tab=default_location_settings').'\'>', '</a>').'</strong></p></div>';
273 273
         } else {
274 274
 
275 275
             ?>
276 276
             <table class="form-table gd-dummy-table">
277 277
                 <tbody>
278 278
                 <tr>
279
-                    <td><strong><?php _e('CPT','geodirectory');?></strong></td>
280
-                    <td><strong><?php _e('Data Type','geodirectory');?></strong></td>
281
-                    <td><strong><?php _e('Action','geodirectory');?></strong></td>
279
+                    <td><strong><?php _e('CPT', 'geodirectory'); ?></strong></td>
280
+                    <td><strong><?php _e('Data Type', 'geodirectory'); ?></strong></td>
281
+                    <td><strong><?php _e('Action', 'geodirectory'); ?></strong></td>
282 282
                 </tr>
283 283
 
284 284
                 <?php
@@ -289,18 +289,18 @@  discard block
 block discarded – undo
289 289
 
290 290
                 $nonce = wp_create_nonce('geodir_dummy_posts_insert_noncename');
291 291
 
292
-                foreach($cpts as $post_type=>$cpt){
292
+                foreach ($cpts as $post_type=>$cpt) {
293 293
 
294
-                    $data_types_for = apply_filters('geodir_dummy_date_types_for',$data_types,$post_type);
294
+                    $data_types_for = apply_filters('geodir_dummy_date_types_for', $data_types, $post_type);
295 295
 
296 296
 
297 297
                     $set_dt = get_option($post_type.'_dummy_data_type');
298 298
 
299 299
                     $count = 30;
300 300
 
301
-                    geodir_add_column_if_not_exist($plugin_prefix . $post_type. "_detail", 'post_dummy', "enum( '1', '0' ) NULL DEFAULT '0'");
301
+                    geodir_add_column_if_not_exist($plugin_prefix.$post_type."_detail", 'post_dummy', "enum( '1', '0' ) NULL DEFAULT '0'");
302 302
 
303
-                    $post_counts = $wpdb->get_var("SELECT count(post_id) FROM " . $plugin_prefix . $post_type . "_detail WHERE post_dummy='1'");
303
+                    $post_counts = $wpdb->get_var("SELECT count(post_id) FROM ".$plugin_prefix.$post_type."_detail WHERE post_dummy='1'");
304 304
 
305 305
                     echo "<tr>";
306 306
                     echo "<td><strong>".$cpt['labels']['name']."</strong></td>";
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
                     $select_disabled = $post_counts > 0 ? 'disabled' : '';
310 310
                     echo "<td>";
311 311
                     echo "<select id='".$post_type."_data_type' onchange='geodir_dummy_set_count(this,\"$post_type\");' $select_disabled>";
312
-                    foreach($data_types_for as $key=>$val){
313
-                        $selected = ($key==$set_dt) ? "selected='selected'" : '';
314
-                        if($selected){$count = $val['count'];}
312
+                    foreach ($data_types_for as $key=>$val) {
313
+                        $selected = ($key == $set_dt) ? "selected='selected'" : '';
314
+                        if ($selected) {$count = $val['count']; }
315 315
                         echo "<option $selected value='$key' data-count='".$val['count']."'>".$val['name']."</option>";
316 316
                     }
317 317
                     echo "</select>";
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
                     $select_display = $post_counts > 0 ? 'display:none;' : '';
320 320
                     echo "<select id='".$post_type."_data_type_count' style='$select_display' >";
321 321
                     $x = 1;
322
-                    while($x <= $count){
323
-                        $selected = ($x==$count) ? "selected='selected'" : '';
322
+                    while ($x <= $count) {
323
+                        $selected = ($x == $count) ? "selected='selected'" : '';
324 324
                         echo "<option $selected value='$x'>".$x."</option>";
325 325
                         $x++;
326 326
                     }
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
 
332 332
 
333 333
 
334
-                    if($post_counts > 0){
335
-                        echo '<td><input type="button" value="'.__('Remove data','geodirectory').'" class="button-primary geodir_dummy_button gd-remove-data" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
336
-                    }else{
337
-                        echo '<td><input type="button" value="'.__('Insert data','geodirectory').'" class="button-primary geodir_dummy_button" onclick="gdInstallDummyData(this,\'' . $nonce . '\',\'' . $post_type . '\'); return false;" ></td>';
334
+                    if ($post_counts > 0) {
335
+                        echo '<td><input type="button" value="'.__('Remove data', 'geodirectory').'" class="button-primary geodir_dummy_button gd-remove-data" onclick="gdInstallDummyData(this,\''.$nonce.'\',\''.$post_type.'\'); return false;" ></td>';
336
+                    } else {
337
+                        echo '<td><input type="button" value="'.__('Insert data', 'geodirectory').'" class="button-primary geodir_dummy_button" onclick="gdInstallDummyData(this,\''.$nonce.'\',\''.$post_type.'\'); return false;" ></td>';
338 338
                     }
339 339
 
340 340
                     echo "</tr>";
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 
371 371
                 }
372 372
                 var geocoder = window.gdMaps == 'google' ? new google.maps.Geocoder() : null;
373
-                var CITY_ADDRESS = '<?php echo addslashes( $city . ',' . $region . ',' . $country );?>';
373
+                var CITY_ADDRESS = '<?php echo addslashes($city.','.$region.','.$country); ?>';
374 374
                 var bound_lat_lng;
375 375
                 var latlng = ['<?php echo $city_latitude; ?>', <?php echo $city_longitude; ?>];
376 376
                 var lat = <?php echo $city_latitude; ?>;
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
                                     return x.replace(" ", '');
401 401
                                 }); // remove spaces from lat/lon
402 402
                             } else {
403
-                                alert("<?php _e('Geocode was not successful for the following reason:','geodirectory');?> " + status);
403
+                                alert("<?php _e('Geocode was not successful for the following reason:', 'geodirectory'); ?> " + status);
404 404
                             }
405 405
                         });
406 406
                 } else if (window.gdMaps == 'osm') {
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
                     var total_dummy_post_count = jQuery('#sub_' + active_tab).find('.selected_sample_data').val();
426 426
 
427 427
                     if (id == 'geodir_dummy_delete') {
428
-                        if (confirm('<?php _e('Are you sure you want to delete dummy data?' , 'geodirectory'); ?>')) {
428
+                        if (confirm('<?php _e('Are you sure you want to delete dummy data?', 'geodirectory'); ?>')) {
429 429
                             jQuery('#sub_' + active_tab).find('.geodir_auto_install').hide();
430 430
                             jQuery('#sub_' + active_tab).find('.geodir_show_progress').show();
431 431
                             jQuery.post('<?php echo geodir_get_ajax_url(); ?>&geodir_autofill=' + id + '&posttype=' + posttype + '&_wpnonce=' + nonce,
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                         var post_url = '<?php echo geodir_get_ajax_url(); ?>&geodir_autofill=' + id + '&posttype=' + posttype + '&insert_dummy_post_index=' + dummy_post_index + '&city_bound_lat1=' + bound_lat_lng[0] + '&city_bound_lng1=' + bound_lat_lng[1] + '&city_bound_lat2=' + bound_lat_lng[2] + '&city_bound_lng2=' + bound_lat_lng[3] + '&_wpnonce=' + nonce;
447 447
 
448 448
                         jQuery.post( post_url, function (data) {
449
-                            jQuery(obj).closest('form').find('.dummy_post_inserted').html('<?php _e('Dummy post(s) inserted:','geodirectory');?> ' + dummy_post_index + ' <?php _e('of' ,'geodirectory'); ?> ' + total_dummy_post_count + '');
449
+                            jQuery(obj).closest('form').find('.dummy_post_inserted').html('<?php _e('Dummy post(s) inserted:', 'geodirectory'); ?> ' + dummy_post_index + ' <?php _e('of', 'geodirectory'); ?> ' + total_dummy_post_count + '');
450 450
 
451 451
                             dummy_post_index++;
452 452
 
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 
462 462
 
463 463
                 function gdRemoveDummyData(obj, nonce, posttype){
464
-                    if (confirm('<?php _e('Are you sure you want to delete dummy data?' , 'geodirectory'); ?>')) {
464
+                    if (confirm('<?php _e('Are you sure you want to delete dummy data?', 'geodirectory'); ?>')) {
465 465
                         jQuery(obj).prop('disabled', true);
466 466
                         jQuery('.gd-dummy-data-results-' + posttype).remove();
467 467
                         jQuery('<tr class="gd-dummy-data-results gd-dummy-data-results-' + posttype + '" >'+
@@ -476,14 +476,14 @@  discard block
 block discarded – undo
476 476
 
477 477
                         jQuery('.gd_progressbar_'+posttype).progressbar({value: 0});
478 478
 
479
-                        gd_progressbar('.gd_progressbar_container_'+posttype, 0, '<i class="fa fa-refresh fa-spin"></i><?php echo esc_attr(__('Removing data...', 'geodirlocation'));?>');
479
+                        gd_progressbar('.gd_progressbar_container_'+posttype, 0, '<i class="fa fa-refresh fa-spin"></i><?php echo esc_attr(__('Removing data...', 'geodirlocation')); ?>');
480 480
 
481 481
 
482 482
                         jQuery.post('<?php echo geodir_get_ajax_url(); ?>&geodir_autofill=geodir_dummy_delete&posttype=' + posttype + '&_wpnonce=' + nonce,
483 483
                             function (data) {
484
-                                gd_progressbar('.gd_progressbar_container_'+posttype, 100, '<i class="fa fa-check"></i><?php echo esc_attr(__('Complete!', 'geodirlocation'));?>');
484
+                                gd_progressbar('.gd_progressbar_container_'+posttype, 100, '<i class="fa fa-check"></i><?php echo esc_attr(__('Complete!', 'geodirlocation')); ?>');
485 485
                                 jQuery(obj).removeClass('gd-remove-data');
486
-                                jQuery(obj).val('<?php _e('Insert data','geodirectory');?>');
486
+                                jQuery(obj).val('<?php _e('Insert data', 'geodirectory'); ?>');
487 487
                                 jQuery(obj).prop('disabled', false);
488 488
                                 jQuery('#'+posttype+'_data_type_count').show();
489 489
                                 jQuery('#'+posttype+'_data_type').prop('disabled', false);
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 
527 527
                         jQuery('.gd_progressbar_'+posttype).progressbar({value: 0});
528 528
 
529
-                        gd_progressbar('.gd_progressbar_container_'+posttype, 0, '0% (0 / ' + dateTypeCount + ') <i class="fa fa-refresh fa-spin"></i><?php echo esc_attr(__('Creating categories and custom fields...', 'geodirlocation'));?>');
529
+                        gd_progressbar('.gd_progressbar_container_'+posttype, 0, '0% (0 / ' + dateTypeCount + ') <i class="fa fa-refresh fa-spin"></i><?php echo esc_attr(__('Creating categories and custom fields...', 'geodirlocation')); ?>');
530 530
                     }
531 531
 
532 532
                     if (!(typeof bound_lat_lng == 'object' && bound_lat_lng.length == 4)) {
@@ -546,15 +546,15 @@  discard block
 block discarded – undo
546 546
                             percentage = percentage > 100 ? 100 : percentage;
547 547
 
548 548
 
549
-                            gd_progressbar('.gd_progressbar_container_'+posttype, percentage, percentage + '% ('+insertedCount+' / ' + dateTypeCount + ') <i class="fa fa-refresh fa-spin"></i><?php echo esc_attr(__('Inserting data...', 'geodirlocation'));?>');
549
+                            gd_progressbar('.gd_progressbar_container_'+posttype, percentage, percentage + '% ('+insertedCount+' / ' + dateTypeCount + ') <i class="fa fa-refresh fa-spin"></i><?php echo esc_attr(__('Inserting data...', 'geodirlocation')); ?>');
550 550
 
551 551
                             gdInstallDummyData(obj, nonce, posttype,insertedCount);
552 552
                         }
553 553
                         else {
554 554
                             percentage = 100;
555
-                            gd_progressbar('.gd_progressbar_container_'+posttype, percentage, percentage + '% ('+insertedCount+' / ' + dateTypeCount + ') <i class="fa fa-check"></i><?php echo esc_attr(__('Complete!', 'geodirlocation'));?>');
555
+                            gd_progressbar('.gd_progressbar_container_'+posttype, percentage, percentage + '% ('+insertedCount+' / ' + dateTypeCount + ') <i class="fa fa-check"></i><?php echo esc_attr(__('Complete!', 'geodirlocation')); ?>');
556 556
                             jQuery(obj).addClass('gd-remove-data');
557
-                            jQuery(obj).val('<?php _e('Remove data','geodirectory');?>');
557
+                            jQuery(obj).val('<?php _e('Remove data', 'geodirectory'); ?>');
558 558
                             jQuery(obj).prop('disabled', false);
559 559
 
560 560
                         }
Please login to merge, or discard this patch.
geodirectory-functions/taxonomy_functions.php 3 patches
Indentation   +1218 added lines, -1218 removed lines patch added patch discarded remove patch
@@ -33,265 +33,265 @@  discard block
 block discarded – undo
33 33
  */
34 34
 function geodir_add_nav_menu_items()
35 35
 {
36
-    $items = '';
37
-    // apply filter to add more navigations // -Filter-Location-Manager
38
-
39
-    if (get_option('geodir_show_listing_nav')) {
40
-
41
-        $menu_class = '';
42
-        if (geodir_is_page('listing'))
43
-            $menu_class = 'current-menu-item';
44
-
45
-
46
-        //SHOW LISTING OF POST TYPE IN MAIN NAVIGATION
47
-        $post_types = geodir_get_posttypes('object');
48
-        $show_post_type_main_nav = get_option('geodir_add_posttype_in_main_nav');
49
-        if (!empty($post_types)) {
50
-            foreach ($post_types as $post_type => $args) {
51
-                if (!empty($show_post_type_main_nav)) {
52
-                    if (in_array($post_type, $show_post_type_main_nav)) {
53
-                        if (get_post_type_archive_link($post_type)) {
54
-                            $menu_class = '';
55
-                            if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
56
-                                $menu_class = 'current-menu-item';
57
-                            /**
58
-                             * Filter the menu li class.
59
-                             *
60
-                             * @since 1.0.0
61
-                             * @param string $menu_class The menu HTML class.
62
-                             */
63
-                            $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
64
-                            /**
65
-                             * Filter the menu a class.
66
-                             *
67
-                             * @since 1.0.0
68
-                             */
69
-                            $a_class = apply_filters('geodir_menu_a_class', '');
70
-                            $items .= '<li class="' . $li_class . '">
36
+	$items = '';
37
+	// apply filter to add more navigations // -Filter-Location-Manager
38
+
39
+	if (get_option('geodir_show_listing_nav')) {
40
+
41
+		$menu_class = '';
42
+		if (geodir_is_page('listing'))
43
+			$menu_class = 'current-menu-item';
44
+
45
+
46
+		//SHOW LISTING OF POST TYPE IN MAIN NAVIGATION
47
+		$post_types = geodir_get_posttypes('object');
48
+		$show_post_type_main_nav = get_option('geodir_add_posttype_in_main_nav');
49
+		if (!empty($post_types)) {
50
+			foreach ($post_types as $post_type => $args) {
51
+				if (!empty($show_post_type_main_nav)) {
52
+					if (in_array($post_type, $show_post_type_main_nav)) {
53
+						if (get_post_type_archive_link($post_type)) {
54
+							$menu_class = '';
55
+							if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
56
+								$menu_class = 'current-menu-item';
57
+							/**
58
+							 * Filter the menu li class.
59
+							 *
60
+							 * @since 1.0.0
61
+							 * @param string $menu_class The menu HTML class.
62
+							 */
63
+							$li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
64
+							/**
65
+							 * Filter the menu a class.
66
+							 *
67
+							 * @since 1.0.0
68
+							 */
69
+							$a_class = apply_filters('geodir_menu_a_class', '');
70
+							$items .= '<li class="' . $li_class . '">
71 71
 									<a href="' . get_post_type_archive_link($post_type) . '" class="' . $a_class . '">
72 72
 										' . __(ucfirst($args->labels->name),'geodirectory') . '
73 73
 									</a>
74 74
 								</li>';
75
-                        }
76
-                    }
77
-                }
78
-            }
79
-        }
80
-        //END LISTING OF POST TYPE IN MAIN NAVIGATION
81
-
82
-        $view_posttype_listing = get_option('geodir_add_posttype_in_listing_nav');
83
-        $is_listing_sub_meny_exists = (!empty($view_posttype_listing)) ? true : false;
84
-        if ($is_listing_sub_meny_exists) {
85
-            /**
86
-             * Filter the menu li class.
87
-             *
88
-             * @since 1.0.0
89
-             * @param string $menu_class The menu HTML class.
90
-             */
91
-            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-listings ' . $menu_class);
92
-            /**
93
-             * Filter the sub menu li class.
94
-             *
95
-             * @since 1.0.0
96
-             * @param string $menu_class The menu HTML class.
97
-             */
98
-            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
99
-            /**
100
-             * Filter the sub menu ul class.
101
-             *
102
-             * @since 1.0.0
103
-             */
104
-            $sub_ul_class = apply_filters('geodir_sub_menu_ul_class', 'sub-menu');
105
-            /**
106
-             * Filter the menu a class.
107
-             *
108
-             * @since 1.0.0
109
-             */
110
-            $a_class = apply_filters('geodir_menu_a_class', '');
111
-            /**
112
-             * Filter the sub menu a class.
113
-             *
114
-             * @since 1.0.0
115
-             */
116
-            $sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
117
-            $items .= '<li class="' . $li_class . '">
75
+						}
76
+					}
77
+				}
78
+			}
79
+		}
80
+		//END LISTING OF POST TYPE IN MAIN NAVIGATION
81
+
82
+		$view_posttype_listing = get_option('geodir_add_posttype_in_listing_nav');
83
+		$is_listing_sub_meny_exists = (!empty($view_posttype_listing)) ? true : false;
84
+		if ($is_listing_sub_meny_exists) {
85
+			/**
86
+			 * Filter the menu li class.
87
+			 *
88
+			 * @since 1.0.0
89
+			 * @param string $menu_class The menu HTML class.
90
+			 */
91
+			$li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-listings ' . $menu_class);
92
+			/**
93
+			 * Filter the sub menu li class.
94
+			 *
95
+			 * @since 1.0.0
96
+			 * @param string $menu_class The menu HTML class.
97
+			 */
98
+			$sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
99
+			/**
100
+			 * Filter the sub menu ul class.
101
+			 *
102
+			 * @since 1.0.0
103
+			 */
104
+			$sub_ul_class = apply_filters('geodir_sub_menu_ul_class', 'sub-menu');
105
+			/**
106
+			 * Filter the menu a class.
107
+			 *
108
+			 * @since 1.0.0
109
+			 */
110
+			$a_class = apply_filters('geodir_menu_a_class', '');
111
+			/**
112
+			 * Filter the sub menu a class.
113
+			 *
114
+			 * @since 1.0.0
115
+			 */
116
+			$sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
117
+			$items .= '<li class="' . $li_class . '">
118 118
 					<a href="#" class="' . $a_class . '">' . __('Listing', 'geodirectory') . '</a>
119 119
 					<ul class="' . $sub_ul_class . '">';
120
-            $post_types = geodir_get_posttypes('object');
120
+			$post_types = geodir_get_posttypes('object');
121 121
 
122
-            $show_listing_post_types = get_option('geodir_add_posttype_in_listing_nav');
122
+			$show_listing_post_types = get_option('geodir_add_posttype_in_listing_nav');
123 123
 
124
-            if (!empty($post_types)) {
125
-                global $geodir_add_location_url;
126
-                $geodir_add_location_url = true;
127
-                foreach ($post_types as $post_type => $args) {
128
-                    if (!empty($show_listing_post_types)) {
129
-                        if (in_array($post_type, $show_listing_post_types)) {
130
-                            if (get_post_type_archive_link($post_type)) {
124
+			if (!empty($post_types)) {
125
+				global $geodir_add_location_url;
126
+				$geodir_add_location_url = true;
127
+				foreach ($post_types as $post_type => $args) {
128
+					if (!empty($show_listing_post_types)) {
129
+						if (in_array($post_type, $show_listing_post_types)) {
130
+							if (get_post_type_archive_link($post_type)) {
131 131
 
132
-                                $menu_class = '';
133
-                                if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
134
-                                    $menu_class = 'current-menu-item';
132
+								$menu_class = '';
133
+								if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
134
+									$menu_class = 'current-menu-item';
135 135
 
136
-                                $items .= '<li class="' . $sub_li_class . '">
136
+								$items .= '<li class="' . $sub_li_class . '">
137 137
 														<a href="' . get_post_type_archive_link($post_type) . '" class="' . $sub_a_class . '">
138 138
 															' . __(ucfirst($args->labels->name),'geodirectory') . '
139 139
 														</a>
140 140
 													</li>';
141
-                            }
142
-                        }
143
-                    }
144
-                }
145
-                $geodir_add_location_url = NULL;
146
-            }
141
+							}
142
+						}
143
+					}
144
+				}
145
+				$geodir_add_location_url = NULL;
146
+			}
147 147
 
148
-            $items .= '	</ul> ';
149
-            /**
150
-             * Filter called after the sub menu closing ul tag for dynamic added menu items.
151
-             *
152
-             * @since 1.5.9
153
-             */
154
-            $items .= apply_filters('geodir_menu_after_sub_ul','');
155
-            $items .= '</li>';
156
-        }
157
-    }
158
-
159
-    if (get_option('geodir_show_addlisting_nav')) {
160
-
161
-        $menu_class = '';
162
-        if (geodir_is_page('add-listing'))
163
-            $menu_class = 'current-menu-item';
164
-
165
-        //SHOW ADD LISTING POST TYPE IN MAIN NAVIGATION
166
-        $post_types = geodir_get_posttypes('object');
167
-        $show_add_listing_post_types_main_nav = get_option('geodir_add_listing_link_main_nav');
168
-        $geodir_allow_posttype_frontend = get_option('geodir_allow_posttype_frontend');
169
-
170
-        if (!empty($post_types)) {
171
-            foreach ($post_types as $post_type => $args) {
172
-                if (!empty($geodir_allow_posttype_frontend)) {
173
-                    if (in_array($post_type, $geodir_allow_posttype_frontend)) {
174
-                        if (!empty($show_add_listing_post_types_main_nav)) {
175
-                            if (in_array($post_type, $show_add_listing_post_types_main_nav)) {
176
-                                if (geodir_get_addlisting_link($post_type)) {
177
-
178
-                                    $menu_class = '';
179
-                                    if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing'))
180
-                                        $menu_class = 'current-menu-item';
181
-                                    /**
182
-                                     * Filter the menu li class.
183
-                                     *
184
-                                     * @since 1.0.0
185
-                                     * @param string $menu_class The menu HTML class.
186
-                                     */
187
-                                    $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
188
-                                    /**
189
-                                     * Filter the menu a class.
190
-                                     *
191
-                                     * @since 1.0.0
192
-                                     */
193
-                                    $a_class = apply_filters('geodir_menu_a_class', '');
194
-                                    $cpt_name = __($args->labels->singular_name, 'geodirectory');
195
-                                    $items .= '<li class="' . $li_class . '">
148
+			$items .= '	</ul> ';
149
+			/**
150
+			 * Filter called after the sub menu closing ul tag for dynamic added menu items.
151
+			 *
152
+			 * @since 1.5.9
153
+			 */
154
+			$items .= apply_filters('geodir_menu_after_sub_ul','');
155
+			$items .= '</li>';
156
+		}
157
+	}
158
+
159
+	if (get_option('geodir_show_addlisting_nav')) {
160
+
161
+		$menu_class = '';
162
+		if (geodir_is_page('add-listing'))
163
+			$menu_class = 'current-menu-item';
164
+
165
+		//SHOW ADD LISTING POST TYPE IN MAIN NAVIGATION
166
+		$post_types = geodir_get_posttypes('object');
167
+		$show_add_listing_post_types_main_nav = get_option('geodir_add_listing_link_main_nav');
168
+		$geodir_allow_posttype_frontend = get_option('geodir_allow_posttype_frontend');
169
+
170
+		if (!empty($post_types)) {
171
+			foreach ($post_types as $post_type => $args) {
172
+				if (!empty($geodir_allow_posttype_frontend)) {
173
+					if (in_array($post_type, $geodir_allow_posttype_frontend)) {
174
+						if (!empty($show_add_listing_post_types_main_nav)) {
175
+							if (in_array($post_type, $show_add_listing_post_types_main_nav)) {
176
+								if (geodir_get_addlisting_link($post_type)) {
177
+
178
+									$menu_class = '';
179
+									if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing'))
180
+										$menu_class = 'current-menu-item';
181
+									/**
182
+									 * Filter the menu li class.
183
+									 *
184
+									 * @since 1.0.0
185
+									 * @param string $menu_class The menu HTML class.
186
+									 */
187
+									$li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
188
+									/**
189
+									 * Filter the menu a class.
190
+									 *
191
+									 * @since 1.0.0
192
+									 */
193
+									$a_class = apply_filters('geodir_menu_a_class', '');
194
+									$cpt_name = __($args->labels->singular_name, 'geodirectory');
195
+									$items .= '<li class="' . $li_class . '">
196 196
 											<a href="' . geodir_get_addlisting_link($post_type) . '" class="' . $a_class . '">
197 197
 												' . sprintf( __('Add %s', 'geodirectory'), $cpt_name ) . '
198 198
 											</a>
199 199
 										</li>';
200
-                                }
201
-                            }
202
-                        }
203
-                    }
204
-                }
205
-            }
206
-        }
207
-        //END SHOW ADD LISTING POST TYPE IN MAIN NAVIGATION
208
-    }
209
-
210
-    $view_add_posttype_listing = get_option('geodir_add_listing_link_add_listing_nav');
211
-    $is_add_listing_sub_meny_exists = (!empty($view_add_posttype_listing)) ? true : false;
212
-    if ($is_add_listing_sub_meny_exists) {
213
-
214
-        if (get_option('geodir_show_addlisting_nav')) {
215
-            /**
216
-             * Filter the menu li class.
217
-             *
218
-             * @since 1.0.0
219
-             * @param string $menu_class The menu HTML class.
220
-             */
221
-            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-add-listing ' . $menu_class);
222
-            /**
223
-             * Filter the sub menu li class.
224
-             *
225
-             * @since 1.0.0
226
-             * @param string $menu_class The menu HTML class.
227
-             */
228
-            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
229
-            /**
230
-             * Filter the sub menu ul class.
231
-             *
232
-             * @since 1.0.0
233
-             */
234
-            $sub_ul_class = apply_filters('geodir_sub_menu_ul_class', 'sub-menu');
235
-            /**
236
-             * Filter the menu a class.
237
-             *
238
-             * @since 1.0.0
239
-             */
240
-            $a_class = apply_filters('geodir_menu_a_class', '');
241
-            /**
242
-             * Filter the sub menu a class.
243
-             *
244
-             * @since 1.0.0
245
-             */
246
-            $sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
247
-            $items .= '<li  class="' . $li_class . '">
200
+								}
201
+							}
202
+						}
203
+					}
204
+				}
205
+			}
206
+		}
207
+		//END SHOW ADD LISTING POST TYPE IN MAIN NAVIGATION
208
+	}
209
+
210
+	$view_add_posttype_listing = get_option('geodir_add_listing_link_add_listing_nav');
211
+	$is_add_listing_sub_meny_exists = (!empty($view_add_posttype_listing)) ? true : false;
212
+	if ($is_add_listing_sub_meny_exists) {
213
+
214
+		if (get_option('geodir_show_addlisting_nav')) {
215
+			/**
216
+			 * Filter the menu li class.
217
+			 *
218
+			 * @since 1.0.0
219
+			 * @param string $menu_class The menu HTML class.
220
+			 */
221
+			$li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-add-listing ' . $menu_class);
222
+			/**
223
+			 * Filter the sub menu li class.
224
+			 *
225
+			 * @since 1.0.0
226
+			 * @param string $menu_class The menu HTML class.
227
+			 */
228
+			$sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
229
+			/**
230
+			 * Filter the sub menu ul class.
231
+			 *
232
+			 * @since 1.0.0
233
+			 */
234
+			$sub_ul_class = apply_filters('geodir_sub_menu_ul_class', 'sub-menu');
235
+			/**
236
+			 * Filter the menu a class.
237
+			 *
238
+			 * @since 1.0.0
239
+			 */
240
+			$a_class = apply_filters('geodir_menu_a_class', '');
241
+			/**
242
+			 * Filter the sub menu a class.
243
+			 *
244
+			 * @since 1.0.0
245
+			 */
246
+			$sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
247
+			$items .= '<li  class="' . $li_class . '">
248 248
 					<a href="#" class="' . $a_class . '">' . __('Add Listing', 'geodirectory') . '</a>
249 249
 					<ul class="' . $sub_ul_class . '">';
250 250
 
251
-            $post_types = geodir_get_posttypes('object');
252
-
253
-            $show_add_listing_post_types = get_option('geodir_add_listing_link_add_listing_nav');
254
-
255
-            if (!empty($post_types)) {
256
-                foreach ($post_types as $post_type => $args) {
257
-                    if (!empty($geodir_allow_posttype_frontend)) {
258
-                        if (in_array($post_type, $geodir_allow_posttype_frontend)) {
259
-                            if (!empty($show_add_listing_post_types)) {
260
-                                if (in_array($post_type, $show_add_listing_post_types)) {
261
-                                    if (geodir_get_addlisting_link($post_type)) {
262
-
263
-                                        $menu_class = '';
264
-                                        if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing'))
265
-                                            $menu_class = 'current-menu-item';
266
-                                        /**
267
-                                         * Filter the menu li class.
268
-                                         *
269
-                                         * @since 1.0.0
270
-                                         * @param string $menu_class The menu HTML class.
271
-                                         */
272
-                                        $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
273
-                                        $cpt_name = __($args->labels->singular_name, 'geodirectory');
274
-                                        $items .= '<li class="' . $li_class . '">
251
+			$post_types = geodir_get_posttypes('object');
252
+
253
+			$show_add_listing_post_types = get_option('geodir_add_listing_link_add_listing_nav');
254
+
255
+			if (!empty($post_types)) {
256
+				foreach ($post_types as $post_type => $args) {
257
+					if (!empty($geodir_allow_posttype_frontend)) {
258
+						if (in_array($post_type, $geodir_allow_posttype_frontend)) {
259
+							if (!empty($show_add_listing_post_types)) {
260
+								if (in_array($post_type, $show_add_listing_post_types)) {
261
+									if (geodir_get_addlisting_link($post_type)) {
262
+
263
+										$menu_class = '';
264
+										if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing'))
265
+											$menu_class = 'current-menu-item';
266
+										/**
267
+										 * Filter the menu li class.
268
+										 *
269
+										 * @since 1.0.0
270
+										 * @param string $menu_class The menu HTML class.
271
+										 */
272
+										$li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
273
+										$cpt_name = __($args->labels->singular_name, 'geodirectory');
274
+										$items .= '<li class="' . $li_class . '">
275 275
 														<a href="' . geodir_get_addlisting_link($post_type) . '" class="' . $sub_a_class . '">
276 276
 															' . sprintf( __('Add %s', 'geodirectory'), $cpt_name ) . '
277 277
 														</a>
278 278
 													</li>';
279
-                                    }
280
-                                }
281
-                            }
282
-                        }
283
-                    }
284
-                }
285
-            }
279
+									}
280
+								}
281
+							}
282
+						}
283
+					}
284
+				}
285
+			}
286 286
 
287
-            $items .= '	</ul> ';
288
-            $items .= apply_filters('geodir_menu_after_sub_ul','');
289
-            $items .= '</li>';
287
+			$items .= '	</ul> ';
288
+			$items .= apply_filters('geodir_menu_after_sub_ul','');
289
+			$items .= '</li>';
290 290
 
291
-        }
292
-    }
293
-    // apply filter to add more navigations // -Filter-Location-Manager
294
-    return $items;
291
+		}
292
+	}
293
+	// apply filter to add more navigations // -Filter-Location-Manager
294
+	return $items;
295 295
 }
296 296
 
297 297
 
@@ -309,20 +309,20 @@  discard block
 block discarded – undo
309 309
  */
310 310
 function geodir_pagemenu_items($menu, $args)
311 311
 {
312
-    $locations = get_nav_menu_locations();
313
-    $geodir_theme_location = get_option('geodir_theme_location_nav');
314
-    $geodir_theme_location_nav = array();
315
-    if (empty($locations) && empty($geodir_theme_location)) {
316
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
317
-        $geodir_theme_location_nav[] = $args['theme_location'];
318
-        update_option('geodir_theme_location_nav', $geodir_theme_location_nav);
319
-    }
320
-    //else if(empty($geodir_theme_location)) // It means 'Show geodirectory navigation in selected menu locations' is not set yet.
312
+	$locations = get_nav_menu_locations();
313
+	$geodir_theme_location = get_option('geodir_theme_location_nav');
314
+	$geodir_theme_location_nav = array();
315
+	if (empty($locations) && empty($geodir_theme_location)) {
316
+		$menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
317
+		$geodir_theme_location_nav[] = $args['theme_location'];
318
+		update_option('geodir_theme_location_nav', $geodir_theme_location_nav);
319
+	}
320
+	//else if(empty($geodir_theme_location)) // It means 'Show geodirectory navigation in selected menu locations' is not set yet.
321 321
 //		$menu = str_replace("</ul></div>",geodir_add_nav_menu_items()."</ul></div>",$menu);
322
-    else if (is_array($geodir_theme_location) && isset($args['theme_location']) && in_array($args['theme_location'], $geodir_theme_location))
323
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
322
+	else if (is_array($geodir_theme_location) && isset($args['theme_location']) && in_array($args['theme_location'], $geodir_theme_location))
323
+		$menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
324 324
 
325
-    return $menu;
325
+	return $menu;
326 326
 
327 327
 }
328 328
 
@@ -342,18 +342,18 @@  discard block
 block discarded – undo
342 342
 function geodir_menu_items($items, $args)
343 343
 {
344 344
 
345
-    $location = $args->theme_location;
345
+	$location = $args->theme_location;
346 346
 
347
-    $geodir_theme_location = get_option('geodir_theme_location_nav');
347
+	$geodir_theme_location = get_option('geodir_theme_location_nav');
348 348
 
349
-    if (has_nav_menu($location) == '1' && is_array($geodir_theme_location) && in_array($location, $geodir_theme_location)) {
349
+	if (has_nav_menu($location) == '1' && is_array($geodir_theme_location) && in_array($location, $geodir_theme_location)) {
350 350
 
351
-        $items = $items . geodir_add_nav_menu_items();
352
-        return $items;
351
+		$items = $items . geodir_add_nav_menu_items();
352
+		return $items;
353 353
 
354
-    } else {
355
-        return $items;
356
-    }
354
+	} else {
355
+		return $items;
356
+	}
357 357
 }
358 358
 
359 359
 /**
@@ -368,25 +368,25 @@  discard block
 block discarded – undo
368 368
  */
369 369
 function geodir_get_category_all_array()
370 370
 {
371
-    global $wpdb;
372
-    $return_array = array();
373
-
374
-    $taxonomies = geodir_get_taxonomies();
375
-    $taxonomies = implode("','", $taxonomies);
376
-    $taxonomies = "'" . $taxonomies . "'";
377
-
378
-    $pn_categories = $wpdb->get_results(
379
-        $wpdb->prepare(
380
-            "SELECT $wpdb->terms.name as name, $wpdb->term_taxonomy.count as count, $wpdb->terms.term_id as cat_ID FROM $wpdb->term_taxonomy,  $wpdb->terms WHERE $wpdb->term_taxonomy.term_id = %d AND $wpdb->term_taxonomy.taxonomy in ( $taxonomies ) ORDER BY name",
381
-            array($wpdb->terms . term_id)
382
-        )
383
-    );
384
-
385
-    foreach ($pn_categories as $pn_categories_obj) {
386
-        $return_array[] = array("id" => $pn_categories_obj->cat_ID,
387
-            "title" => $pn_categories_obj->name,);
388
-    }
389
-    return $return_array;
371
+	global $wpdb;
372
+	$return_array = array();
373
+
374
+	$taxonomies = geodir_get_taxonomies();
375
+	$taxonomies = implode("','", $taxonomies);
376
+	$taxonomies = "'" . $taxonomies . "'";
377
+
378
+	$pn_categories = $wpdb->get_results(
379
+		$wpdb->prepare(
380
+			"SELECT $wpdb->terms.name as name, $wpdb->term_taxonomy.count as count, $wpdb->terms.term_id as cat_ID FROM $wpdb->term_taxonomy,  $wpdb->terms WHERE $wpdb->term_taxonomy.term_id = %d AND $wpdb->term_taxonomy.taxonomy in ( $taxonomies ) ORDER BY name",
381
+			array($wpdb->terms . term_id)
382
+		)
383
+	);
384
+
385
+	foreach ($pn_categories as $pn_categories_obj) {
386
+		$return_array[] = array("id" => $pn_categories_obj->cat_ID,
387
+			"title" => $pn_categories_obj->name,);
388
+	}
389
+	return $return_array;
390 390
 }
391 391
 
392 392
 
@@ -401,41 +401,41 @@  discard block
 block discarded – undo
401 401
  */
402 402
 function geodir_get_current_posttype()
403 403
 {
404
-    global $wp_query, $geodir_post_type;
404
+	global $wp_query, $geodir_post_type;
405 405
 
406
-    $geodir_post_type = get_query_var('post_type');
406
+	$geodir_post_type = get_query_var('post_type');
407 407
 
408
-    if (geodir_is_page('add-listing') || geodir_is_page('preview')) {
409
-        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
410
-            $geodir_post_type = get_post_type((int)$_REQUEST['pid']);
411
-        elseif (isset($_REQUEST['listing_type']))
412
-            $geodir_post_type = sanitize_text_field($_REQUEST['listing_type']);
413
-    }
408
+	if (geodir_is_page('add-listing') || geodir_is_page('preview')) {
409
+		if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
410
+			$geodir_post_type = get_post_type((int)$_REQUEST['pid']);
411
+		elseif (isset($_REQUEST['listing_type']))
412
+			$geodir_post_type = sanitize_text_field($_REQUEST['listing_type']);
413
+	}
414 414
 
415
-    if ((geodir_is_page('search') || geodir_is_page('author')) && isset($_REQUEST['stype']))
416
-        $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
415
+	if ((geodir_is_page('search') || geodir_is_page('author')) && isset($_REQUEST['stype']))
416
+		$geodir_post_type = sanitize_text_field($_REQUEST['stype']);
417 417
 
418
-    if (is_tax())
419
-        $geodir_post_type = geodir_get_taxonomy_posttype();
418
+	if (is_tax())
419
+		$geodir_post_type = geodir_get_taxonomy_posttype();
420 420
 
421 421
 
422
-    $all_postypes = geodir_get_posttypes();
423
-    $all_postypes = stripslashes_deep($all_postypes);
422
+	$all_postypes = geodir_get_posttypes();
423
+	$all_postypes = stripslashes_deep($all_postypes);
424 424
 
425
-    if (is_array($all_postypes) && !in_array($geodir_post_type, $all_postypes))
426
-        $geodir_post_type = '';
425
+	if (is_array($all_postypes) && !in_array($geodir_post_type, $all_postypes))
426
+		$geodir_post_type = '';
427 427
 
428
-    if( defined( 'DOING_AJAX' ) && isset($_REQUEST['stype'])){
429
-        $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
430
-    }
428
+	if( defined( 'DOING_AJAX' ) && isset($_REQUEST['stype'])){
429
+		$geodir_post_type = sanitize_text_field($_REQUEST['stype']);
430
+	}
431 431
 
432 432
 
433
-    /**
434
-     * Filter the default CPT return.
435
-     *
436
-     * @since 1.6.9
437
-     */
438
-    return apply_filters('geodir_get_current_posttype',$geodir_post_type);
433
+	/**
434
+	 * Filter the default CPT return.
435
+	 *
436
+	 * @since 1.6.9
437
+	 */
438
+	return apply_filters('geodir_get_current_posttype',$geodir_post_type);
439 439
 }
440 440
 
441 441
 /**
@@ -449,21 +449,21 @@  discard block
 block discarded – undo
449 449
  */
450 450
 function geodir_get_default_posttype()
451 451
 {
452
-    $post_types = apply_filters( 'geodir_get_default_posttype', geodir_get_posttypes( 'object' ) );
452
+	$post_types = apply_filters( 'geodir_get_default_posttype', geodir_get_posttypes( 'object' ) );
453 453
 
454
-    foreach ( $post_types as $post_type => $info ) {
455
-        global $wpdb;
456
-        $has_posts = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type ) );
457
-        if ( $has_posts ) {
458
-            $stype = $post_type; break;
459
-        }
460
-    }
454
+	foreach ( $post_types as $post_type => $info ) {
455
+		global $wpdb;
456
+		$has_posts = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type ) );
457
+		if ( $has_posts ) {
458
+			$stype = $post_type; break;
459
+		}
460
+	}
461 461
 
462
-    if(!$stype){
463
-        $stype = 'gd_place';
464
-    }
462
+	if(!$stype){
463
+		$stype = 'gd_place';
464
+	}
465 465
 
466
-    return $stype;
466
+	return $stype;
467 467
 }
468 468
 
469 469
 /**
@@ -477,21 +477,21 @@  discard block
 block discarded – undo
477 477
  */
478 478
 function geodir_get_posttypes($output = 'names')
479 479
 {
480
-    $post_types = array();
481
-    $post_types = get_option('geodir_post_types');
482
-    $post_types = stripslashes_deep($post_types);
483
-    if (!empty($post_types)) {
484
-        switch ($output):
485
-            case 'object':
486
-            case 'Object':
487
-                $post_types = json_decode(json_encode($post_types), FALSE);//(object)$post_types;
488
-                break;
489
-            case 'array':
490
-            case 'Array':
491
-                $post_types = (array)$post_types;
492
-                break;
480
+	$post_types = array();
481
+	$post_types = get_option('geodir_post_types');
482
+	$post_types = stripslashes_deep($post_types);
483
+	if (!empty($post_types)) {
484
+		switch ($output):
485
+			case 'object':
486
+			case 'Object':
487
+				$post_types = json_decode(json_encode($post_types), FALSE);//(object)$post_types;
488
+				break;
489
+			case 'array':
490
+			case 'Array':
491
+				$post_types = (array)$post_types;
492
+				break;
493 493
 			case 'options':
494
-                $post_types = (array)$post_types;
494
+				$post_types = (array)$post_types;
495 495
 				
496 496
 				$options = array();
497 497
 				if (!empty($post_types)) {
@@ -500,17 +500,17 @@  discard block
 block discarded – undo
500 500
 					}
501 501
 				}
502 502
 				$post_types = $options;
503
-                break;
504
-            default:
505
-                $post_types = array_keys($post_types);
506
-                break;
507
-        endswitch;
508
-    }
509
-
510
-    if (!empty($post_types))
511
-        return $post_types;
512
-    else
513
-        return array();
503
+				break;
504
+			default:
505
+				$post_types = array_keys($post_types);
506
+				break;
507
+		endswitch;
508
+	}
509
+
510
+	if (!empty($post_types))
511
+		return $post_types;
512
+	else
513
+		return array();
514 514
 }
515 515
 
516 516
 /**
@@ -523,108 +523,108 @@  discard block
 block discarded – undo
523 523
  */
524 524
 function geodir_get_posttype_info($post_type = '')
525 525
 {
526
-    $post_types = array();
527
-    $post_types = get_option('geodir_post_types');
528
-    $post_types = stripslashes_deep($post_types);
529
-    if (!empty($post_types) && $post_type != '') {
530
-        return $post_types[$post_type];
531
-    } else
532
-        return false;
526
+	$post_types = array();
527
+	$post_types = get_option('geodir_post_types');
528
+	$post_types = stripslashes_deep($post_types);
529
+	if (!empty($post_types) && $post_type != '') {
530
+		return $post_types[$post_type];
531
+	} else
532
+		return false;
533 533
 }
534 534
 
535 535
 if (!function_exists('geodir_get_taxonomies')) {
536
-    /**
537
-     * Get all custom taxonomies.
538
-     *
539
-     * @since 1.0.0
540
-     * @package GeoDirectory
541
-     * @param string $post_type The post type.
542
-     * @param bool $tages_taxonomies Is this a tag taxonomy?. Default: false.
543
-     * @return array|bool Taxonomies on success. false on failure.
544
-     */
545
-    function geodir_get_taxonomies($post_type = '', $tages_taxonomies = false)
546
-    {
536
+	/**
537
+	 * Get all custom taxonomies.
538
+	 *
539
+	 * @since 1.0.0
540
+	 * @package GeoDirectory
541
+	 * @param string $post_type The post type.
542
+	 * @param bool $tages_taxonomies Is this a tag taxonomy?. Default: false.
543
+	 * @return array|bool Taxonomies on success. false on failure.
544
+	 */
545
+	function geodir_get_taxonomies($post_type = '', $tages_taxonomies = false)
546
+	{
547 547
 
548
-        $taxonomies = array();
549
-        $gd_taxonomies = array();
548
+		$taxonomies = array();
549
+		$gd_taxonomies = array();
550 550
 
551
-        if ($taxonomies = get_option('geodir_taxonomies')) {
551
+		if ($taxonomies = get_option('geodir_taxonomies')) {
552 552
 
553 553
 
554
-            $gd_taxonomies = array_keys($taxonomies);
554
+			$gd_taxonomies = array_keys($taxonomies);
555 555
 
556 556
 
557
-            if ($post_type != '')
558
-                $gd_taxonomies = array();
557
+			if ($post_type != '')
558
+				$gd_taxonomies = array();
559 559
 
560
-            $i = 0;
561
-            foreach ($taxonomies as $taxonomy => $args) {
560
+			$i = 0;
561
+			foreach ($taxonomies as $taxonomy => $args) {
562 562
 
563
-                if ($post_type != '' && $args['object_type'] == $post_type)
564
-                    $gd_taxonomies[] = $taxonomy;
563
+				if ($post_type != '' && $args['object_type'] == $post_type)
564
+					$gd_taxonomies[] = $taxonomy;
565 565
 
566
-                if ($tages_taxonomies === false && strpos($taxonomy, '_tag') !== false) {
567
-                    if (array_search($taxonomy, $gd_taxonomies) !== false)
568
-                        unset($gd_taxonomies[array_search($taxonomy, $gd_taxonomies)]);
569
-                }
566
+				if ($tages_taxonomies === false && strpos($taxonomy, '_tag') !== false) {
567
+					if (array_search($taxonomy, $gd_taxonomies) !== false)
568
+						unset($gd_taxonomies[array_search($taxonomy, $gd_taxonomies)]);
569
+				}
570 570
 
571
-            }
571
+			}
572
+
573
+			$gd_taxonomies = array_values($gd_taxonomies);
574
+		}
572 575
 
573
-            $gd_taxonomies = array_values($gd_taxonomies);
574
-        }
575
-
576
-        /**
577
-         * Filter the taxonomies.
578
-         *
579
-         * @since 1.0.0
580
-         * @param array $gd_taxonomies The taxonomy array.
581
-         */
582
-        $taxonomies = apply_filters('geodir_taxonomy', $gd_taxonomies);
583
-
584
-        if (!empty($taxonomies)) {
585
-            return $taxonomies;
586
-        } else {
587
-            return false;
588
-        }
589
-    }
576
+		/**
577
+		 * Filter the taxonomies.
578
+		 *
579
+		 * @since 1.0.0
580
+		 * @param array $gd_taxonomies The taxonomy array.
581
+		 */
582
+		$taxonomies = apply_filters('geodir_taxonomy', $gd_taxonomies);
583
+
584
+		if (!empty($taxonomies)) {
585
+			return $taxonomies;
586
+		} else {
587
+			return false;
588
+		}
589
+	}
590 590
 }
591 591
 
592 592
 if (!function_exists(' geodir_get_categories_dl')) {
593
-    /**
594
-     * Get categories dropdown HTML.
595
-     *
596
-     * @since 1.0.0
597
-     * @package GeoDirectory
598
-     * @param string $post_type The post type.
599
-     * @param string $selected The selected value.
600
-     * @param bool $tages_taxonomies Is this a tag taxonomy?. Default: false.
601
-     * @param bool $echo Prints the HTML when set to true. Default: true.
602
-     * @return void|string Dropdown HTML.
603
-     */
604
-    function  geodir_get_categories_dl($post_type = '', $selected = '', $tages_taxonomies = false, $echo = true)
605
-    {
606
-
607
-        $html = '';
608
-        $taxonomies = geodir_get_taxonomies($post_type, $tages_taxonomies);
609
-
610
-        $categories = get_terms($taxonomies);
611
-
612
-        $html .= '<option value="0">' . __('All', 'geodirectory') . '</option>';
613
-
614
-        foreach ($categories as $category_obj) {
615
-            $select_opt = '';
616
-            if ($selected == $category_obj->term_id) {
617
-                $select_opt = 'selected="selected"';
618
-            }
619
-            $html .= '<option ' . $select_opt . ' value="' . $category_obj->term_id . '">'
620
-                . ucfirst($category_obj->name) . '</option>';
621
-        }
622
-
623
-        if ($echo)
624
-            echo $html;
625
-        else
626
-            return $html;
627
-    }
593
+	/**
594
+	 * Get categories dropdown HTML.
595
+	 *
596
+	 * @since 1.0.0
597
+	 * @package GeoDirectory
598
+	 * @param string $post_type The post type.
599
+	 * @param string $selected The selected value.
600
+	 * @param bool $tages_taxonomies Is this a tag taxonomy?. Default: false.
601
+	 * @param bool $echo Prints the HTML when set to true. Default: true.
602
+	 * @return void|string Dropdown HTML.
603
+	 */
604
+	function  geodir_get_categories_dl($post_type = '', $selected = '', $tages_taxonomies = false, $echo = true)
605
+	{
606
+
607
+		$html = '';
608
+		$taxonomies = geodir_get_taxonomies($post_type, $tages_taxonomies);
609
+
610
+		$categories = get_terms($taxonomies);
611
+
612
+		$html .= '<option value="0">' . __('All', 'geodirectory') . '</option>';
613
+
614
+		foreach ($categories as $category_obj) {
615
+			$select_opt = '';
616
+			if ($selected == $category_obj->term_id) {
617
+				$select_opt = 'selected="selected"';
618
+			}
619
+			$html .= '<option ' . $select_opt . ' value="' . $category_obj->term_id . '">'
620
+				. ucfirst($category_obj->name) . '</option>';
621
+		}
622
+
623
+		if ($echo)
624
+			echo $html;
625
+		else
626
+			return $html;
627
+	}
628 628
 }
629 629
 
630 630
 
@@ -639,28 +639,28 @@  discard block
 block discarded – undo
639 639
 function geodir_get_listing_slug($object_type = '')
640 640
 {
641 641
 
642
-    $listing_slug = '';
642
+	$listing_slug = '';
643 643
 
644
-    $post_types = get_option('geodir_post_types');
645
-    $taxonomies = get_option('geodir_taxonomies');
644
+	$post_types = get_option('geodir_post_types');
645
+	$taxonomies = get_option('geodir_taxonomies');
646 646
 
647 647
 
648
-    if ($object_type != '') {
649
-        if (!empty($post_types) && array_key_exists($object_type, $post_types)) {
648
+	if ($object_type != '') {
649
+		if (!empty($post_types) && array_key_exists($object_type, $post_types)) {
650 650
 
651
-            $object_info = $post_types[$object_type];
652
-            $listing_slug = $object_info['listing_slug'];
653
-        } elseif (!empty($taxonomies) && array_key_exists($object_type, $taxonomies)) {
654
-            $object_info = $taxonomies[$object_type];
655
-            $listing_slug = $object_info['listing_slug'];
656
-        }
651
+			$object_info = $post_types[$object_type];
652
+			$listing_slug = $object_info['listing_slug'];
653
+		} elseif (!empty($taxonomies) && array_key_exists($object_type, $taxonomies)) {
654
+			$object_info = $taxonomies[$object_type];
655
+			$listing_slug = $object_info['listing_slug'];
656
+		}
657 657
 
658
-    }
658
+	}
659 659
 
660
-    if (!empty($listing_slug))
661
-        return $listing_slug;
662
-    else
663
-        return false;
660
+	if (!empty($listing_slug))
661
+		return $listing_slug;
662
+	else
663
+		return false;
664 664
 }
665 665
 
666 666
 
@@ -675,212 +675,212 @@  discard block
 block discarded – undo
675 675
  */
676 676
 function geodir_get_taxonomy_posttype($taxonomy = '')
677 677
 {
678
-    global $wp_query;
679
-
680
-    $post_type = array();
681
-    $taxonomies = array();
682
-
683
-    if (!empty($taxonomy)) {
684
-        $taxonomies[] = $taxonomy;
685
-    } elseif (isset($wp_query->tax_query->queries)) {
686
-        $tax_arr = $wp_query->tax_query->queries;
687
-        //if tax query has 'relation' set then it will break wp_list_pluck so we remove it
688
-        if(isset( $tax_arr['relation'])){unset( $tax_arr['relation']);}
689
-        $taxonomies = wp_list_pluck($tax_arr, 'taxonomy');
690
-    }
691
-
692
-    if (!empty($taxonomies)) {
693
-        foreach (geodir_get_posttypes() as $pt) {
694
-            $object_taxonomies = $pt === 'attachment' ? get_taxonomies_for_attachments() : get_object_taxonomies($pt);
695
-            if (array_intersect($taxonomies, $object_taxonomies))
696
-                $post_type[] = $pt;
697
-        }
698
-    }
699
-
700
-    if (!empty($post_type))
701
-        return $post_type[0];
702
-    else
703
-        return false;
678
+	global $wp_query;
679
+
680
+	$post_type = array();
681
+	$taxonomies = array();
682
+
683
+	if (!empty($taxonomy)) {
684
+		$taxonomies[] = $taxonomy;
685
+	} elseif (isset($wp_query->tax_query->queries)) {
686
+		$tax_arr = $wp_query->tax_query->queries;
687
+		//if tax query has 'relation' set then it will break wp_list_pluck so we remove it
688
+		if(isset( $tax_arr['relation'])){unset( $tax_arr['relation']);}
689
+		$taxonomies = wp_list_pluck($tax_arr, 'taxonomy');
690
+	}
691
+
692
+	if (!empty($taxonomies)) {
693
+		foreach (geodir_get_posttypes() as $pt) {
694
+			$object_taxonomies = $pt === 'attachment' ? get_taxonomies_for_attachments() : get_object_taxonomies($pt);
695
+			if (array_intersect($taxonomies, $object_taxonomies))
696
+				$post_type[] = $pt;
697
+		}
698
+	}
699
+
700
+	if (!empty($post_type))
701
+		return $post_type[0];
702
+	else
703
+		return false;
704 704
 }
705 705
 
706 706
 if (!function_exists('geodir_custom_taxonomy_walker')) {
707
-    /**
708
-     * Custom taxonomy walker function.
709
-     *
710
-     * @since 1.0.0
711
-     * @package GeoDirectory
712
-     * @param string $cat_taxonomy The taxonomy name.
713
-     * @param int $cat_parent The parent term ID.
714
-     * @param bool $hide_empty Hide empty taxonomies? Default: false.
715
-     * @param int $pading CSS padding in pixels.
716
-     * @return string|void taxonomy HTML.
717
-     */
718
-    function geodir_custom_taxonomy_walker($cat_taxonomy, $cat_parent = 0, $hide_empty = false, $pading = 0)
719
-    {
720
-        global $cat_display, $post_cat, $exclude_cats;
721
-
722
-        $search_terms = trim($post_cat, ",");
723
-
724
-        $search_terms = explode(",", $search_terms);
725
-
726
-        $cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'hide_empty' => $hide_empty, 'exclude' => $exclude_cats));
727
-
728
-        $display = '';
729
-        $onchange = '';
730
-        $term_check = '';
731
-        $main_list_class = '';
732
-        $out = '';
733
-        //If there are terms, start displaying
734
-        if (count($cat_terms) > 0) {
735
-            //Displaying as a list
736
-            $p = $pading * 20;
737
-            $pading++;
738
-
739
-
740
-            if ((!geodir_is_page('listing')) || (is_search() && $_REQUEST['search_taxonomy'] == '')) {
741
-                if ($cat_parent == 0) {
742
-                    $list_class = 'main_list gd-parent-cats-list gd-cats-display-' . $cat_display;
743
-                    $main_list_class = 'class="main_list_selecter"';
744
-                } else {
745
-                    //$display = 'display:none';
746
-                    $list_class = 'sub_list gd-sub-cats-list';
747
-                }
748
-            }
707
+	/**
708
+	 * Custom taxonomy walker function.
709
+	 *
710
+	 * @since 1.0.0
711
+	 * @package GeoDirectory
712
+	 * @param string $cat_taxonomy The taxonomy name.
713
+	 * @param int $cat_parent The parent term ID.
714
+	 * @param bool $hide_empty Hide empty taxonomies? Default: false.
715
+	 * @param int $pading CSS padding in pixels.
716
+	 * @return string|void taxonomy HTML.
717
+	 */
718
+	function geodir_custom_taxonomy_walker($cat_taxonomy, $cat_parent = 0, $hide_empty = false, $pading = 0)
719
+	{
720
+		global $cat_display, $post_cat, $exclude_cats;
721
+
722
+		$search_terms = trim($post_cat, ",");
723
+
724
+		$search_terms = explode(",", $search_terms);
725
+
726
+		$cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'hide_empty' => $hide_empty, 'exclude' => $exclude_cats));
727
+
728
+		$display = '';
729
+		$onchange = '';
730
+		$term_check = '';
731
+		$main_list_class = '';
732
+		$out = '';
733
+		//If there are terms, start displaying
734
+		if (count($cat_terms) > 0) {
735
+			//Displaying as a list
736
+			$p = $pading * 20;
737
+			$pading++;
738
+
739
+
740
+			if ((!geodir_is_page('listing')) || (is_search() && $_REQUEST['search_taxonomy'] == '')) {
741
+				if ($cat_parent == 0) {
742
+					$list_class = 'main_list gd-parent-cats-list gd-cats-display-' . $cat_display;
743
+					$main_list_class = 'class="main_list_selecter"';
744
+				} else {
745
+					//$display = 'display:none';
746
+					$list_class = 'sub_list gd-sub-cats-list';
747
+				}
748
+			}
749 749
 
750
-            if ($cat_display == 'checkbox' || $cat_display == 'radio') {
751
-                $p = 0;
752
-                $out = '<div class="' . $list_class . ' gd-cat-row-' . $cat_parent . '" style="margin-left:' . $p . 'px;' . $display . ';">';
753
-            }
750
+			if ($cat_display == 'checkbox' || $cat_display == 'radio') {
751
+				$p = 0;
752
+				$out = '<div class="' . $list_class . ' gd-cat-row-' . $cat_parent . '" style="margin-left:' . $p . 'px;' . $display . ';">';
753
+			}
754 754
 
755
-            foreach ($cat_terms as $cat_term) {
755
+			foreach ($cat_terms as $cat_term) {
756 756
 
757
-                $checked = '';
757
+				$checked = '';
758 758
 
759
-                if (in_array($cat_term->term_id, $search_terms)) {
760
-                    if ($cat_display == 'select' || $cat_display == 'multiselect')
761
-                        $checked = 'selected="selected"';
762
-                    else
763
-                        $checked = 'checked="checked"';
764
-                }
759
+				if (in_array($cat_term->term_id, $search_terms)) {
760
+					if ($cat_display == 'select' || $cat_display == 'multiselect')
761
+						$checked = 'selected="selected"';
762
+					else
763
+						$checked = 'checked="checked"';
764
+				}
765 765
 
766
-                if ($cat_display == 'radio')
767
-                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
768
-                elseif ($cat_display == 'select' || $cat_display == 'multiselect')
769
-                    $out .= '<option ' . $main_list_class . ' style="margin-left:' . $p . 'px;" alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' >' . $term_check . ucfirst($cat_term->name) . '</option>';
766
+				if ($cat_display == 'radio')
767
+					$out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
768
+				elseif ($cat_display == 'select' || $cat_display == 'multiselect')
769
+					$out .= '<option ' . $main_list_class . ' style="margin-left:' . $p . 'px;" alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' >' . $term_check . ucfirst($cat_term->name) . '</option>';
770 770
 
771
-                else {
772
-                    $out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
773
-                }
771
+				else {
772
+					$out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
773
+				}
774 774
 
775
-                // Call recurson to print sub cats
776
-                $out .= geodir_custom_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading);
775
+				// Call recurson to print sub cats
776
+				$out .= geodir_custom_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading);
777 777
 
778
-            }
778
+			}
779 779
 
780
-            if ($cat_display == 'checkbox' || $cat_display == 'radio')
781
-                $out .= '</div>';
780
+			if ($cat_display == 'checkbox' || $cat_display == 'radio')
781
+				$out .= '</div>';
782 782
 
783
-            return $out;
784
-        }
785
-        return;
786
-    }
783
+			return $out;
784
+		}
785
+		return;
786
+	}
787 787
 }
788 788
 
789 789
 if (!function_exists('geodir_custom_taxonomy_walker2')) {
790
-    /**
791
-     * Custom taxonomy walker function.
792
-     *
793
-     * @since 1.0.0
794
-     * @package GeoDirectory
795
-     * @global object $post WordPress Post object.
796
-     * @global object $gd_session GeoDirectory Session object.
797
-     * @param string $cat_taxonomy The taxonomy name.
798
-     * @param string $cat_limit Number of categories to display.
799
-     */
800
-    function geodir_custom_taxonomy_walker2($cat_taxonomy, $cat_limit = '')
801
-    {
802
-        $post_category = '';
803
-        $post_category_str = '';
804
-        global $exclude_cats, $gd_session;
805
-
806
-        $cat_exclude = '';
807
-        if (is_array($exclude_cats) && !empty($exclude_cats))
808
-            $cat_exclude = serialize($exclude_cats);
809
-
810
-        if (isset($_REQUEST['backandedit'])) {
811
-            $post = (object)$gd_session->get('listing');
812
-
813
-            if (!is_array($post->post_category[$cat_taxonomy]))
814
-                $post_category = $post->post_category[$cat_taxonomy];
815
-
816
-            $post_categories = $post->post_category_str;
817
-            if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories))
818
-                $post_category_str = $post_categories[$cat_taxonomy];
819
-
820
-        } elseif ((geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') || (is_admin())) {
821
-            global $post;
822
-
823
-            $post_category = geodir_get_post_meta($post->ID, $cat_taxonomy, true);
824
-            if (empty($post_category) && isset($post->{$cat_taxonomy})) {
825
-                $post_category = $post->{$cat_taxonomy};
826
-            }
790
+	/**
791
+	 * Custom taxonomy walker function.
792
+	 *
793
+	 * @since 1.0.0
794
+	 * @package GeoDirectory
795
+	 * @global object $post WordPress Post object.
796
+	 * @global object $gd_session GeoDirectory Session object.
797
+	 * @param string $cat_taxonomy The taxonomy name.
798
+	 * @param string $cat_limit Number of categories to display.
799
+	 */
800
+	function geodir_custom_taxonomy_walker2($cat_taxonomy, $cat_limit = '')
801
+	{
802
+		$post_category = '';
803
+		$post_category_str = '';
804
+		global $exclude_cats, $gd_session;
805
+
806
+		$cat_exclude = '';
807
+		if (is_array($exclude_cats) && !empty($exclude_cats))
808
+			$cat_exclude = serialize($exclude_cats);
809
+
810
+		if (isset($_REQUEST['backandedit'])) {
811
+			$post = (object)$gd_session->get('listing');
812
+
813
+			if (!is_array($post->post_category[$cat_taxonomy]))
814
+				$post_category = $post->post_category[$cat_taxonomy];
815
+
816
+			$post_categories = $post->post_category_str;
817
+			if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories))
818
+				$post_category_str = $post_categories[$cat_taxonomy];
819
+
820
+		} elseif ((geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') || (is_admin())) {
821
+			global $post;
822
+
823
+			$post_category = geodir_get_post_meta($post->ID, $cat_taxonomy, true);
824
+			if (empty($post_category) && isset($post->{$cat_taxonomy})) {
825
+				$post_category = $post->{$cat_taxonomy};
826
+			}
827 827
 
828
-            $post_categories = get_post_meta($post->ID, 'post_categories', true);
828
+			$post_categories = get_post_meta($post->ID, 'post_categories', true);
829 829
 
830
-            if (empty($post_category) && !empty($post_categories) && !empty($post_categories[$cat_taxonomy])) {
831
-                foreach (explode(",", $post_categories[$cat_taxonomy]) as $cat_part) {
832
-                    if (is_numeric($cat_part)) {
833
-                        $cat_part_arr[] = $cat_part;
834
-                    }
835
-                }
836
-                if (is_array($cat_part_arr)) {
837
-                    $post_category = implode(',', $cat_part_arr);
838
-                }
839
-            }
830
+			if (empty($post_category) && !empty($post_categories) && !empty($post_categories[$cat_taxonomy])) {
831
+				foreach (explode(",", $post_categories[$cat_taxonomy]) as $cat_part) {
832
+					if (is_numeric($cat_part)) {
833
+						$cat_part_arr[] = $cat_part;
834
+					}
835
+				}
836
+				if (is_array($cat_part_arr)) {
837
+					$post_category = implode(',', $cat_part_arr);
838
+				}
839
+			}
840 840
 
841
-            if (!empty($post_category)) {
842
-                $cat1 = array_filter(explode(',', $post_category));
843
-                $post_category = ',' . implode(',', $cat1) . ',';
841
+			if (!empty($post_category)) {
842
+				$cat1 = array_filter(explode(',', $post_category));
843
+				$post_category = ',' . implode(',', $cat1) . ',';
844 844
 
845
-            }
845
+			}
846 846
 
847
-            if ($post_category != '' && is_array($exclude_cats) && !empty($exclude_cats)) {
847
+			if ($post_category != '' && is_array($exclude_cats) && !empty($exclude_cats)) {
848 848
 
849
-                $post_category_upd = explode(',', $post_category);
850
-                $post_category_change = '';
851
-                foreach ($post_category_upd as $cat) {
849
+				$post_category_upd = explode(',', $post_category);
850
+				$post_category_change = '';
851
+				foreach ($post_category_upd as $cat) {
852 852
 
853
-                    if (!in_array($cat, $exclude_cats) && $cat != '') {
854
-                        $post_category_change .= ',' . $cat;
855
-                    }
856
-                }
857
-                $post_category = $post_category_change;
858
-            }
853
+					if (!in_array($cat, $exclude_cats) && $cat != '') {
854
+						$post_category_change .= ',' . $cat;
855
+					}
856
+				}
857
+				$post_category = $post_category_change;
858
+			}
859 859
 
860 860
 
861
-            if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
862
-                $post_category_str = $post_categories[$cat_taxonomy];
863
-            }
864
-        }
861
+			if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
862
+				$post_category_str = $post_categories[$cat_taxonomy];
863
+			}
864
+		}
865 865
 
866
-        echo '<input type="hidden" id="cat_limit" value="' . $cat_limit . '" name="cat_limit[' . $cat_taxonomy . ']"  />';
866
+		echo '<input type="hidden" id="cat_limit" value="' . $cat_limit . '" name="cat_limit[' . $cat_taxonomy . ']"  />';
867 867
 
868
-        echo '<input type="hidden" id="post_category" value="' . $post_category . '" name="post_category[' . $cat_taxonomy . ']"  />';
868
+		echo '<input type="hidden" id="post_category" value="' . $post_category . '" name="post_category[' . $cat_taxonomy . ']"  />';
869 869
 
870
-        echo '<input type="hidden" id="post_category_str" value="' . $post_category_str . '" name="post_category_str[' . $cat_taxonomy . ']"  />';
870
+		echo '<input type="hidden" id="post_category_str" value="' . $post_category_str . '" name="post_category_str[' . $cat_taxonomy . ']"  />';
871 871
 
872 872
 
873
-        ?>
873
+		?>
874 874
         <div class="cat_sublist">
875 875
             <?php
876 876
 
877
-            $post_id = isset($post->ID) ? $post->ID : '';
877
+			$post_id = isset($post->ID) ? $post->ID : '';
878 878
 
879
-            if ((geodir_is_page('add-listing') || is_admin()) && !empty($post_categories[$cat_taxonomy])) {
879
+			if ((geodir_is_page('add-listing') || is_admin()) && !empty($post_categories[$cat_taxonomy])) {
880 880
 
881
-                geodir_editpost_categories_html($cat_taxonomy, $post_id, $post_categories);
882
-            }
883
-            ?>
881
+				geodir_editpost_categories_html($cat_taxonomy, $post_id, $post_categories);
882
+			}
883
+			?>
884 884
         </div>
885 885
         <script type="text/javascript">
886 886
 
@@ -1003,22 +1003,22 @@  discard block
 block discarded – undo
1003 1003
 
1004 1004
         </script>
1005 1005
         <?php
1006
-        if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
1007
-            $post_cat_str = $post_categories[$cat_taxonomy];
1008
-            $post_cat_array = explode("#", $post_cat_str);
1009
-            if (count($post_cat_array) >= $cat_limit && $cat_limit != 0)
1010
-                $style = "display:none;";
1011
-        }
1012
-        ?>
1006
+		if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
1007
+			$post_cat_str = $post_categories[$cat_taxonomy];
1008
+			$post_cat_array = explode("#", $post_cat_str);
1009
+			if (count($post_cat_array) >= $cat_limit && $cat_limit != 0)
1010
+				$style = "display:none;";
1011
+		}
1012
+		?>
1013 1013
         <div class="main_cat_list" style=" <?php if (isset($style)) {
1014
-            echo $style;
1015
-        }?> ">
1014
+			echo $style;
1015
+		}?> ">
1016 1016
             <?php geodir_get_catlist($cat_taxonomy, 0);  // print main categories list
1017
-            ?>
1017
+			?>
1018 1018
         </div>
1019 1019
     <?php
1020 1020
 
1021
-    }
1021
+	}
1022 1022
 }
1023 1023
 
1024 1024
 /**
@@ -1035,23 +1035,23 @@  discard block
 block discarded – undo
1035 1035
  */
1036 1036
 function geodir_addpost_categories_html($request_taxonomy, $parrent, $selected = false, $main_selected = true, $default = false, $exclude = '')
1037 1037
 {
1038
-    global $exclude_cats;
1038
+	global $exclude_cats;
1039 1039
 
1040
-    if ($exclude != '') {
1041
-        $exclude_cats = maybe_unserialize(base64_decode($exclude));
1040
+	if ($exclude != '') {
1041
+		$exclude_cats = maybe_unserialize(base64_decode($exclude));
1042 1042
 
1043
-        if(is_array( $exclude_cats)){
1044
-            $exclude_cats = array_map( 'intval', $exclude_cats );
1045
-        }else{
1046
-            $exclude_cats = intval($exclude_cats);
1047
-        }
1043
+		if(is_array( $exclude_cats)){
1044
+			$exclude_cats = array_map( 'intval', $exclude_cats );
1045
+		}else{
1046
+			$exclude_cats = intval($exclude_cats);
1047
+		}
1048 1048
 
1049
-    }
1049
+	}
1050 1050
 
1051
-    if ((is_array($exclude_cats) && !empty($exclude_cats) && !in_array($parrent, $exclude_cats)) ||
1052
-        (!is_array($exclude_cats) || empty($exclude_cats))
1053
-    ) {
1054
-        ?>
1051
+	if ((is_array($exclude_cats) && !empty($exclude_cats) && !in_array($parrent, $exclude_cats)) ||
1052
+		(!is_array($exclude_cats) || empty($exclude_cats))
1053
+	) {
1054
+		?>
1055 1055
 
1056 1056
         <?php $main_cat = get_term($parrent, $request_taxonomy); ?>
1057 1057
 
@@ -1080,8 +1080,8 @@  discard block
 block discarded – undo
1080 1080
 
1081 1081
             <br/>
1082 1082
             <?php
1083
-            $cat_terms = get_terms($request_taxonomy, array('parent' => $main_cat->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats));
1084
-            if (!empty($cat_terms)) { ?>
1083
+			$cat_terms = get_terms($request_taxonomy, array('parent' => $main_cat->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats));
1084
+			if (!empty($cat_terms)) { ?>
1085 1085
                 <span> <?php printf(__('Add listing in category', 'geodirectory')); ?></span>
1086 1086
                 <?php geodir_get_catlist($request_taxonomy, $parrent, $selected) ?>
1087 1087
             <?php } ?>
@@ -1103,53 +1103,53 @@  discard block
 block discarded – undo
1103 1103
 function geodir_editpost_categories_html($request_taxonomy, $request_postid, $post_categories)
1104 1104
 {
1105 1105
 
1106
-    if (!empty($post_categories) && array_key_exists($request_taxonomy, $post_categories)) {
1107
-        $post_cat_str = $post_categories[$request_taxonomy];
1108
-        $post_cat_array = explode("#", $post_cat_str);
1109
-        if (is_array($post_cat_array)) {
1110
-            $post_cat_array = array_unique( $post_cat_array );
1106
+	if (!empty($post_categories) && array_key_exists($request_taxonomy, $post_categories)) {
1107
+		$post_cat_str = $post_categories[$request_taxonomy];
1108
+		$post_cat_array = explode("#", $post_cat_str);
1109
+		if (is_array($post_cat_array)) {
1110
+			$post_cat_array = array_unique( $post_cat_array );
1111 1111
 
1112 1112
 			foreach ($post_cat_array as $post_cat_html) {
1113 1113
 
1114
-                $post_cat_info = explode(":", $post_cat_html);
1115
-                $post_maincat_str = $post_cat_info[0];
1114
+				$post_cat_info = explode(":", $post_cat_html);
1115
+				$post_maincat_str = $post_cat_info[0];
1116 1116
 
1117
-                if (!empty($post_maincat_str)) {
1118
-                    $post_maincat_info = explode(",", $post_maincat_str);
1119
-                    $post_maincat_id = $post_maincat_info[0];
1120
-                    ($post_maincat_info[1] == 'y') ? $post_maincat_selected = true : $post_maincat_selected = false;
1121
-                    (end($post_maincat_info) == 'd') ? $post_maincat_default = true : $post_maincat_default = false;
1122
-                }
1123
-                $post_sub_catid = '';
1124
-                if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1125
-                    $post_sub_catid = (int)$post_cat_info[1];
1126
-                }
1117
+				if (!empty($post_maincat_str)) {
1118
+					$post_maincat_info = explode(",", $post_maincat_str);
1119
+					$post_maincat_id = $post_maincat_info[0];
1120
+					($post_maincat_info[1] == 'y') ? $post_maincat_selected = true : $post_maincat_selected = false;
1121
+					(end($post_maincat_info) == 'd') ? $post_maincat_default = true : $post_maincat_default = false;
1122
+				}
1123
+				$post_sub_catid = '';
1124
+				if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1125
+					$post_sub_catid = (int)$post_cat_info[1];
1126
+				}
1127 1127
 
1128
-                geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
1128
+				geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
1129 1129
 
1130
-            }
1131
-        } else {
1130
+			}
1131
+		} else {
1132 1132
 
1133
-            $post_cat_info = explode(":", $post_cat_str);
1134
-            $post_maincat_str = $post_cat_info[0];
1133
+			$post_cat_info = explode(":", $post_cat_str);
1134
+			$post_maincat_str = $post_cat_info[0];
1135 1135
 
1136
-            $post_sub_catid = '';
1136
+			$post_sub_catid = '';
1137 1137
 
1138
-            if (!empty($post_maincat_str)) {
1139
-                $post_maincat_info = explode(",", $post_maincat_str);
1140
-                $post_maincat_id = $post_maincat_info[0];
1141
-                ($post_maincat_info[1] == 'y') ? $post_maincat_selected = true : $post_maincat_selected = false;
1142
-                (end($post_maincat_info) == 'd') ? $post_maincat_default = true : $post_maincat_default = false;
1143
-            }
1138
+			if (!empty($post_maincat_str)) {
1139
+				$post_maincat_info = explode(",", $post_maincat_str);
1140
+				$post_maincat_id = $post_maincat_info[0];
1141
+				($post_maincat_info[1] == 'y') ? $post_maincat_selected = true : $post_maincat_selected = false;
1142
+				(end($post_maincat_info) == 'd') ? $post_maincat_default = true : $post_maincat_default = false;
1143
+			}
1144 1144
 
1145
-            if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1146
-                $post_sub_catid = (int)$post_cat_info[1];
1147
-            }
1145
+			if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1146
+				$post_sub_catid = (int)$post_cat_info[1];
1147
+			}
1148 1148
 
1149
-            geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
1149
+			geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
1150 1150
 
1151
-        }
1152
-    }
1151
+		}
1152
+	}
1153 1153
 }
1154 1154
 
1155 1155
 /**
@@ -1163,35 +1163,35 @@  discard block
 block discarded – undo
1163 1163
  */
1164 1164
 function geodir_get_catlist($cat_taxonomy, $parrent = 0, $selected = false)
1165 1165
 {
1166
-    global $exclude_cats;
1166
+	global $exclude_cats;
1167 1167
 
1168
-    $cat_terms = get_terms($cat_taxonomy, array('parent' => $parrent, 'hide_empty' => false, 'exclude' => $exclude_cats));
1168
+	$cat_terms = get_terms($cat_taxonomy, array('parent' => $parrent, 'hide_empty' => false, 'exclude' => $exclude_cats));
1169 1169
 
1170
-    if (!empty($cat_terms)) {
1171
-        $onchange = '';
1172
-        $onchange = ' onchange="show_subcatlist(this.value, this)" ';
1170
+	if (!empty($cat_terms)) {
1171
+		$onchange = '';
1172
+		$onchange = ' onchange="show_subcatlist(this.value, this)" ';
1173 1173
 
1174
-        $option_selected = '';
1175
-        if (!$selected)
1176
-            $option_slected = ' selected="selected" ';
1174
+		$option_selected = '';
1175
+		if (!$selected)
1176
+			$option_slected = ' selected="selected" ';
1177 1177
 
1178
-        echo '<select field_type="select" id="' . sanitize_text_field($cat_taxonomy) . '" class="chosen_select" ' . $onchange . ' option-ajaxChosen="false" >';
1178
+		echo '<select field_type="select" id="' . sanitize_text_field($cat_taxonomy) . '" class="chosen_select" ' . $onchange . ' option-ajaxChosen="false" >';
1179 1179
 
1180
-        echo '<option value="" ' . $option_selected . ' >' . __('Select Category', 'geodirectory') . '</option>';
1180
+		echo '<option value="" ' . $option_selected . ' >' . __('Select Category', 'geodirectory') . '</option>';
1181 1181
 
1182
-        foreach ($cat_terms as $cat_term) {
1183
-            $option_selected = '';
1184
-            if ($selected == $cat_term->term_id)
1185
-                $option_selected = ' selected="selected" ';
1182
+		foreach ($cat_terms as $cat_term) {
1183
+			$option_selected = '';
1184
+			if ($selected == $cat_term->term_id)
1185
+				$option_selected = ' selected="selected" ';
1186 1186
 
1187
-            // Count child terms
1188
-            $child_terms = get_terms( $cat_taxonomy, array( 'parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1 ) );
1189
-            $has_child = !empty( $child_terms ) ? 't' : 'f';
1187
+			// Count child terms
1188
+			$child_terms = get_terms( $cat_taxonomy, array( 'parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1 ) );
1189
+			$has_child = !empty( $child_terms ) ? 't' : 'f';
1190 1190
 
1191
-            echo '<option  ' . $option_selected . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" _hc="' . $has_child . '" >' . ucfirst($cat_term->name) . '</option>';
1192
-        }
1193
-        echo '</select>';
1194
-    }
1191
+			echo '<option  ' . $option_selected . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" _hc="' . $has_child . '" >' . ucfirst($cat_term->name) . '</option>';
1192
+		}
1193
+		echo '</select>';
1194
+	}
1195 1195
 }
1196 1196
 
1197 1197
 /**
@@ -1207,28 +1207,28 @@  discard block
 block discarded – undo
1207 1207
  */
1208 1208
 function geodir_custom_update_messages($messages)
1209 1209
 {
1210
-    global $post, $post_ID;
1211
-
1212
-    $post_types = get_post_types(array('show_ui' => true, '_builtin' => false), 'objects');
1213
-
1214
-    foreach ($post_types as $post_type => $post_object) {
1215
-
1216
-        $messages[$post_type] = array(
1217
-            0 => '', // Unused. Messages start at index 1.
1218
-            1 => sprintf(__('%s updated. <a href="%s">View %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1219
-            2 => __('Custom field updated.', 'geodirectory'),
1220
-            3 => __('Custom field deleted.', 'geodirectory'),
1221
-            4 => sprintf(__('%s updated.', 'geodirectory'), $post_object->labels->singular_name),
1222
-            5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'geodirectory'), $post_object->labels->singular_name, wp_post_revision_title((int)$_GET['revision'], false)) : false,
1223
-            6 => sprintf(__('%s published. <a href="%s">View %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1224
-            7 => sprintf(__('%s saved.', 'geodirectory'), $post_object->labels->singular_name),
1225
-            8 => sprintf(__('%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $post_object->labels->singular_name),
1226
-            9 => sprintf(__('%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, date_i18n(__('M j, Y @ G:i', 'geodirectory'), strtotime($post->post_date)), esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1227
-            10 => sprintf(__('%s draft updated. <a target="_blank" href="%s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $post_object->labels->singular_name),
1228
-        );
1229
-    }
1230
-
1231
-    return $messages;
1210
+	global $post, $post_ID;
1211
+
1212
+	$post_types = get_post_types(array('show_ui' => true, '_builtin' => false), 'objects');
1213
+
1214
+	foreach ($post_types as $post_type => $post_object) {
1215
+
1216
+		$messages[$post_type] = array(
1217
+			0 => '', // Unused. Messages start at index 1.
1218
+			1 => sprintf(__('%s updated. <a href="%s">View %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1219
+			2 => __('Custom field updated.', 'geodirectory'),
1220
+			3 => __('Custom field deleted.', 'geodirectory'),
1221
+			4 => sprintf(__('%s updated.', 'geodirectory'), $post_object->labels->singular_name),
1222
+			5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'geodirectory'), $post_object->labels->singular_name, wp_post_revision_title((int)$_GET['revision'], false)) : false,
1223
+			6 => sprintf(__('%s published. <a href="%s">View %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1224
+			7 => sprintf(__('%s saved.', 'geodirectory'), $post_object->labels->singular_name),
1225
+			8 => sprintf(__('%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $post_object->labels->singular_name),
1226
+			9 => sprintf(__('%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, date_i18n(__('M j, Y @ G:i', 'geodirectory'), strtotime($post->post_date)), esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1227
+			10 => sprintf(__('%s draft updated. <a target="_blank" href="%s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $post_object->labels->singular_name),
1228
+		);
1229
+	}
1230
+
1231
+	return $messages;
1232 1232
 }
1233 1233
 
1234 1234
 
@@ -1243,183 +1243,183 @@  discard block
 block discarded – undo
1243 1243
 function geodir_register_defaults()
1244 1244
 {
1245 1245
 
1246
-    global $wpdb;
1247
-
1248
-    $menu_icon = geodir_plugin_url() . '/geodirectory-assets/images/favicon.ico';
1249
-
1250
-    if (!$listing_slug = get_option('geodir_listing_prefix'))
1251
-        $listing_slug = 'places';
1252
-
1253
-    /**
1254
-     * Taxonomies
1255
-     **/
1256
-    //if ( ! taxonomy_exists('gd_place_tags') )
1257
-    {
1258
-
1259
-        $gd_placetags = array();
1260
-        $gd_placetags['object_type'] = 'gd_place';
1261
-        $gd_placetags['listing_slug'] = $listing_slug . '/tags';
1262
-        $gd_placetags['args'] = array(
1263
-            'public' => true,
1264
-            'hierarchical' => false,
1265
-            'rewrite' => array('slug' => $listing_slug . '/tags', 'with_front' => false, 'hierarchical' => true),
1266
-            'query_var' => true,
1267
-
1268
-            'labels' => array(
1269
-                'name' => __('Place Tags', 'geodirectory'),
1270
-                'singular_name' => __('Place Tag', 'geodirectory'),
1271
-                'search_items' => __('Search Place Tags', 'geodirectory'),
1272
-                'popular_items' => __('Popular Place Tags', 'geodirectory'),
1273
-                'all_items' => __('All Place Tags', 'geodirectory'),
1274
-                'edit_item' => __('Edit Place Tag', 'geodirectory'),
1275
-                'update_item' => __('Update Place Tag', 'geodirectory'),
1276
-                'add_new_item' => __('Add New Place Tag', 'geodirectory'),
1277
-                'new_item_name' => __('New Place Tag Name', 'geodirectory'),
1278
-                'add_or_remove_items' => __('Add or remove Place tags', 'geodirectory'),
1279
-                'choose_from_most_used' => __('Choose from the most used Place tags', 'geodirectory'),
1280
-                'separate_items_with_commas' => __('Separate Place tags with commas', 'geodirectory'),
1281
-            ),
1282
-        );
1283
-
1284
-
1285
-        $geodir_taxonomies = get_option('geodir_taxonomies');
1286
-        $geodir_taxonomies['gd_place_tags'] = $gd_placetags;
1287
-        update_option('geodir_taxonomies', $geodir_taxonomies);
1288
-
1289
-
1290
-        // Update post types and delete tmp options
1291
-        flush_rewrite_rules();
1292
-
1293
-    }
1294
-
1295
-    //if ( ! taxonomy_exists('gd_placecategory') )
1296
-    {
1297
-
1298
-        $gd_placecategory = array();
1299
-        $gd_placecategory['object_type'] = 'gd_place';
1300
-        $gd_placecategory['listing_slug'] = $listing_slug;
1301
-        $gd_placecategory['args'] = array(
1302
-            'public' => true,
1303
-            'hierarchical' => true,
1304
-            'rewrite' => array('slug' => $listing_slug, 'with_front' => false, 'hierarchical' => true),
1305
-            'query_var' => true,
1306
-            'labels' => array(
1307
-                'name' => __('Place Categories', 'geodirectory'),
1308
-                'singular_name' => __('Place Category', 'geodirectory'),
1309
-                'search_items' => __('Search Place Categories', 'geodirectory'),
1310
-                'popular_items' => __('Popular Place Categories', 'geodirectory'),
1311
-                'all_items' => __('All Place Categories', 'geodirectory'),
1312
-                'edit_item' => __('Edit Place Category', 'geodirectory'),
1313
-                'update_item' => __('Update Place Category', 'geodirectory'),
1314
-                'add_new_item' => __('Add New Place Category', 'geodirectory'),
1315
-                'new_item_name' => __('New Place Category', 'geodirectory'),
1316
-                'add_or_remove_items' => __('Add or remove Place categories', 'geodirectory'),
1317
-            ),
1318
-        );
1319
-
1320
-
1321
-        $geodir_taxonomies = get_option('geodir_taxonomies');
1322
-        $geodir_taxonomies['gd_placecategory'] = $gd_placecategory;
1323
-        update_option('geodir_taxonomies', $geodir_taxonomies);
1324
-
1325
-
1326
-        flush_rewrite_rules();
1327
-    }
1328
-
1329
-    /**
1330
-     * Post Types
1331
-     **/
1332
-
1333
-    //if ( ! post_type_exists('gd_place') )
1334
-    {
1335
-
1336
-        $labels = array(
1337
-            'name' => __('Places', 'geodirectory'),
1338
-            'singular_name' => __('Place', 'geodirectory'),
1339
-            'add_new' => __('Add New', 'geodirectory'),
1340
-            'add_new_item' => __('Add New Place', 'geodirectory'),
1341
-            'edit_item' => __('Edit Place', 'geodirectory'),
1342
-            'new_item' => __('New Place', 'geodirectory'),
1343
-            'view_item' => __('View Place', 'geodirectory'),
1344
-            'search_items' => __('Search Places', 'geodirectory'),
1345
-            'not_found' => __('No Place Found', 'geodirectory'),
1346
-            'not_found_in_trash' => __('No Place Found In Trash', 'geodirectory'));
1347
-
1348
-        $place_default = array(
1349
-            'labels' => $labels,
1350
-            'can_export' => true,
1351
-            'capability_type' => 'post',
1352
-            'description' => 'Place post type.',
1353
-            'has_archive' => $listing_slug,
1354
-            'hierarchical' => false,
1355
-            'map_meta_cap' => true,
1356
-            'menu_icon' => $menu_icon,
1357
-            'public' => true,
1358
-            'query_var' => true,
1359
-            'rewrite' => array('slug' => $listing_slug , 'with_front' => false, 'hierarchical' => true, 'feeds' => true),
1360
-            'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments', /*'revisions', 'post-formats'*/),
1361
-            'taxonomies' => array('gd_placecategory', 'gd_place_tags'));
1362
-
1363
-        //Update custom post types
1364
-        $geodir_post_types = get_option('geodir_post_types');
1365
-        $geodir_post_types['gd_place'] = $place_default;
1366
-        update_option('geodir_post_types', $geodir_post_types);
1367
-
1368
-        // Update post types and delete tmp options
1369
-        flush_rewrite_rules();
1370
-    }
1371
-
1372
-
1373
-    geodir_register_taxonomies();
1374
-    geodir_register_post_types();
1375
-
1376
-    //die;
1246
+	global $wpdb;
1247
+
1248
+	$menu_icon = geodir_plugin_url() . '/geodirectory-assets/images/favicon.ico';
1249
+
1250
+	if (!$listing_slug = get_option('geodir_listing_prefix'))
1251
+		$listing_slug = 'places';
1252
+
1253
+	/**
1254
+	 * Taxonomies
1255
+	 **/
1256
+	//if ( ! taxonomy_exists('gd_place_tags') )
1257
+	{
1258
+
1259
+		$gd_placetags = array();
1260
+		$gd_placetags['object_type'] = 'gd_place';
1261
+		$gd_placetags['listing_slug'] = $listing_slug . '/tags';
1262
+		$gd_placetags['args'] = array(
1263
+			'public' => true,
1264
+			'hierarchical' => false,
1265
+			'rewrite' => array('slug' => $listing_slug . '/tags', 'with_front' => false, 'hierarchical' => true),
1266
+			'query_var' => true,
1267
+
1268
+			'labels' => array(
1269
+				'name' => __('Place Tags', 'geodirectory'),
1270
+				'singular_name' => __('Place Tag', 'geodirectory'),
1271
+				'search_items' => __('Search Place Tags', 'geodirectory'),
1272
+				'popular_items' => __('Popular Place Tags', 'geodirectory'),
1273
+				'all_items' => __('All Place Tags', 'geodirectory'),
1274
+				'edit_item' => __('Edit Place Tag', 'geodirectory'),
1275
+				'update_item' => __('Update Place Tag', 'geodirectory'),
1276
+				'add_new_item' => __('Add New Place Tag', 'geodirectory'),
1277
+				'new_item_name' => __('New Place Tag Name', 'geodirectory'),
1278
+				'add_or_remove_items' => __('Add or remove Place tags', 'geodirectory'),
1279
+				'choose_from_most_used' => __('Choose from the most used Place tags', 'geodirectory'),
1280
+				'separate_items_with_commas' => __('Separate Place tags with commas', 'geodirectory'),
1281
+			),
1282
+		);
1283
+
1284
+
1285
+		$geodir_taxonomies = get_option('geodir_taxonomies');
1286
+		$geodir_taxonomies['gd_place_tags'] = $gd_placetags;
1287
+		update_option('geodir_taxonomies', $geodir_taxonomies);
1288
+
1289
+
1290
+		// Update post types and delete tmp options
1291
+		flush_rewrite_rules();
1292
+
1293
+	}
1294
+
1295
+	//if ( ! taxonomy_exists('gd_placecategory') )
1296
+	{
1297
+
1298
+		$gd_placecategory = array();
1299
+		$gd_placecategory['object_type'] = 'gd_place';
1300
+		$gd_placecategory['listing_slug'] = $listing_slug;
1301
+		$gd_placecategory['args'] = array(
1302
+			'public' => true,
1303
+			'hierarchical' => true,
1304
+			'rewrite' => array('slug' => $listing_slug, 'with_front' => false, 'hierarchical' => true),
1305
+			'query_var' => true,
1306
+			'labels' => array(
1307
+				'name' => __('Place Categories', 'geodirectory'),
1308
+				'singular_name' => __('Place Category', 'geodirectory'),
1309
+				'search_items' => __('Search Place Categories', 'geodirectory'),
1310
+				'popular_items' => __('Popular Place Categories', 'geodirectory'),
1311
+				'all_items' => __('All Place Categories', 'geodirectory'),
1312
+				'edit_item' => __('Edit Place Category', 'geodirectory'),
1313
+				'update_item' => __('Update Place Category', 'geodirectory'),
1314
+				'add_new_item' => __('Add New Place Category', 'geodirectory'),
1315
+				'new_item_name' => __('New Place Category', 'geodirectory'),
1316
+				'add_or_remove_items' => __('Add or remove Place categories', 'geodirectory'),
1317
+			),
1318
+		);
1319
+
1320
+
1321
+		$geodir_taxonomies = get_option('geodir_taxonomies');
1322
+		$geodir_taxonomies['gd_placecategory'] = $gd_placecategory;
1323
+		update_option('geodir_taxonomies', $geodir_taxonomies);
1324
+
1325
+
1326
+		flush_rewrite_rules();
1327
+	}
1328
+
1329
+	/**
1330
+	 * Post Types
1331
+	 **/
1332
+
1333
+	//if ( ! post_type_exists('gd_place') )
1334
+	{
1335
+
1336
+		$labels = array(
1337
+			'name' => __('Places', 'geodirectory'),
1338
+			'singular_name' => __('Place', 'geodirectory'),
1339
+			'add_new' => __('Add New', 'geodirectory'),
1340
+			'add_new_item' => __('Add New Place', 'geodirectory'),
1341
+			'edit_item' => __('Edit Place', 'geodirectory'),
1342
+			'new_item' => __('New Place', 'geodirectory'),
1343
+			'view_item' => __('View Place', 'geodirectory'),
1344
+			'search_items' => __('Search Places', 'geodirectory'),
1345
+			'not_found' => __('No Place Found', 'geodirectory'),
1346
+			'not_found_in_trash' => __('No Place Found In Trash', 'geodirectory'));
1347
+
1348
+		$place_default = array(
1349
+			'labels' => $labels,
1350
+			'can_export' => true,
1351
+			'capability_type' => 'post',
1352
+			'description' => 'Place post type.',
1353
+			'has_archive' => $listing_slug,
1354
+			'hierarchical' => false,
1355
+			'map_meta_cap' => true,
1356
+			'menu_icon' => $menu_icon,
1357
+			'public' => true,
1358
+			'query_var' => true,
1359
+			'rewrite' => array('slug' => $listing_slug , 'with_front' => false, 'hierarchical' => true, 'feeds' => true),
1360
+			'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments', /*'revisions', 'post-formats'*/),
1361
+			'taxonomies' => array('gd_placecategory', 'gd_place_tags'));
1362
+
1363
+		//Update custom post types
1364
+		$geodir_post_types = get_option('geodir_post_types');
1365
+		$geodir_post_types['gd_place'] = $place_default;
1366
+		update_option('geodir_post_types', $geodir_post_types);
1367
+
1368
+		// Update post types and delete tmp options
1369
+		flush_rewrite_rules();
1370
+	}
1371
+
1372
+
1373
+	geodir_register_taxonomies();
1374
+	geodir_register_post_types();
1375
+
1376
+	//die;
1377 1377
 
1378 1378
 }
1379 1379
 
1380 1380
 $gd_wpml_get_languages = "";
1381 1381
 function gd_wpml_get_lang_from_url($url){
1382 1382
 
1383
-    global $gd_wpml_get_languages;
1384
-    if(isset($_REQUEST['lang']) && $_REQUEST['lang']){return $_REQUEST['lang'];}
1383
+	global $gd_wpml_get_languages;
1384
+	if(isset($_REQUEST['lang']) && $_REQUEST['lang']){return $_REQUEST['lang'];}
1385 1385
 
1386 1386
 
1387
-    //
1388
-    $url = str_replace(array("http://","https://"),"",$url);
1387
+	//
1388
+	$url = str_replace(array("http://","https://"),"",$url);
1389 1389
 
1390
-    // site_url() seems to work better than get_bloginfo('url') here, WPML can change get_bloginfo('url') to add the lang.
1391
-    $site_url = str_replace(array("http://","https://"),"",site_url());
1390
+	// site_url() seems to work better than get_bloginfo('url') here, WPML can change get_bloginfo('url') to add the lang.
1391
+	$site_url = str_replace(array("http://","https://"),"",site_url());
1392 1392
 
1393
-    $url = str_replace($site_url,"",$url);
1393
+	$url = str_replace($site_url,"",$url);
1394 1394
 
1395 1395
 
1396
-    $segments = explode('/', trim($url, '/'));
1396
+	$segments = explode('/', trim($url, '/'));
1397 1397
 
1398
-    //print_r( $segments);
1399
-    if($gd_wpml_get_languages){
1400
-        $langs = $gd_wpml_get_languages;
1401
-    }else{
1402
-        global $sitepress;
1403
-        $gd_wpml_get_languages = $sitepress->get_active_languages();
1404
-    }
1398
+	//print_r( $segments);
1399
+	if($gd_wpml_get_languages){
1400
+		$langs = $gd_wpml_get_languages;
1401
+	}else{
1402
+		global $sitepress;
1403
+		$gd_wpml_get_languages = $sitepress->get_active_languages();
1404
+	}
1405 1405
 
1406
-    if (isset($segments[0]) && $segments[0] && array_key_exists($segments[0], $gd_wpml_get_languages)) {
1407
-        return $segments[0];
1408
-    }
1406
+	if (isset($segments[0]) && $segments[0] && array_key_exists($segments[0], $gd_wpml_get_languages)) {
1407
+		return $segments[0];
1408
+	}
1409 1409
 
1410
-    return false;
1410
+	return false;
1411 1411
 
1412 1412
 
1413 1413
 }
1414 1414
 
1415 1415
 function gd_wpml_slug_translation_turned_on($post_type) {
1416 1416
 
1417
-    global $sitepress;
1418
-    $settings = $sitepress->get_settings();
1419
-    return isset($settings['posts_slug_translation']['types'][$post_type])
1420
-    && $settings['posts_slug_translation']['types'][$post_type]
1421
-    && isset($settings['posts_slug_translation']['on'])
1422
-    && $settings['posts_slug_translation']['on'];
1417
+	global $sitepress;
1418
+	$settings = $sitepress->get_settings();
1419
+	return isset($settings['posts_slug_translation']['types'][$post_type])
1420
+	&& $settings['posts_slug_translation']['types'][$post_type]
1421
+	&& isset($settings['posts_slug_translation']['on'])
1422
+	&& $settings['posts_slug_translation']['on'];
1423 1423
 }
1424 1424
 
1425 1425
 
@@ -1444,150 +1444,150 @@  discard block
 block discarded – undo
1444 1444
  */
1445 1445
 function geodir_listing_permalink_structure($post_link, $post_obj, $leavename, $sample)
1446 1446
 {
1447
-    //echo $post_link."<br />".$sample ;
1447
+	//echo $post_link."<br />".$sample ;
1448 1448
 
1449 1449
 
1450
-    global $wpdb, $wp_query, $plugin_prefix, $post, $comment_post_cache, $gd_permalink_cache;
1451
-    if (isset($post_obj->ID) && isset($post->ID) && $post_obj->ID == $post->ID) {
1452
-    } elseif (isset($post_obj->post_status) && $post_obj->post_status == 'auto-draft') {
1453
-        return $post_link;
1454
-    } else {
1455
-        $orig_post = $post;
1456
-        $post = $post_obj;
1457
-    }
1450
+	global $wpdb, $wp_query, $plugin_prefix, $post, $comment_post_cache, $gd_permalink_cache;
1451
+	if (isset($post_obj->ID) && isset($post->ID) && $post_obj->ID == $post->ID) {
1452
+	} elseif (isset($post_obj->post_status) && $post_obj->post_status == 'auto-draft') {
1453
+		return $post_link;
1454
+	} else {
1455
+		$orig_post = $post;
1456
+		$post = $post_obj;
1457
+	}
1458 1458
 
1459
-    if (in_array($post->post_type, geodir_get_posttypes())) {
1459
+	if (in_array($post->post_type, geodir_get_posttypes())) {
1460 1460
 
1461 1461
 
1462
-        $post_types = get_option('geodir_post_types');
1463
-        $slug = $post_types[$post->post_type]['rewrite']['slug'];
1462
+		$post_types = get_option('geodir_post_types');
1463
+		$slug = $post_types[$post->post_type]['rewrite']['slug'];
1464 1464
 
1465
-        // Alter the CPT slug if WPML is set to do so
1466
-        if(function_exists('icl_object_id')){
1467
-            if ( gd_wpml_slug_translation_turned_on( $post->post_type ) && $language_code = gd_wpml_get_lang_from_url($post_link)) {
1465
+		// Alter the CPT slug if WPML is set to do so
1466
+		if(function_exists('icl_object_id')){
1467
+			if ( gd_wpml_slug_translation_turned_on( $post->post_type ) && $language_code = gd_wpml_get_lang_from_url($post_link)) {
1468 1468
 
1469
-                $org_slug = $slug;
1470
-                $slug = apply_filters( 'wpml_translate_single_string',
1471
-                    $slug,
1472
-                    'WordPress',
1473
-                    'URL slug: ' . $slug,
1474
-                    $language_code);
1469
+				$org_slug = $slug;
1470
+				$slug = apply_filters( 'wpml_translate_single_string',
1471
+					$slug,
1472
+					'WordPress',
1473
+					'URL slug: ' . $slug,
1474
+					$language_code);
1475 1475
 
1476
-                if(!$slug){$slug = $org_slug;}
1476
+				if(!$slug){$slug = $org_slug;}
1477 1477
 
1478
-            }
1479
-        }
1478
+			}
1479
+		}
1480 1480
 
1481
-        if (function_exists('geodir_location_geo_home_link')) {
1482
-            remove_filter('home_url', 'geodir_location_geo_home_link', 100000);
1483
-        }
1481
+		if (function_exists('geodir_location_geo_home_link')) {
1482
+			remove_filter('home_url', 'geodir_location_geo_home_link', 100000);
1483
+		}
1484 1484
         
1485
-        // Fix slug problem when slug matches part of host or base url/ Ex: url -> www.abcxyz.com & slug -> xyz.
1486
-        $site_url = trailingslashit(get_bloginfo('url'));
1485
+		// Fix slug problem when slug matches part of host or base url/ Ex: url -> www.abcxyz.com & slug -> xyz.
1486
+		$site_url = trailingslashit(get_bloginfo('url'));
1487 1487
         
1488
-        if (function_exists('geodir_location_geo_home_link')) {
1489
-            add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
1490
-        }
1491
-
1492
-        $fix_url = strpos($post_link, $site_url) === 0 ? true : false;
1493
-        if ($fix_url) {
1494
-            $post_link = str_replace($site_url, '', $post_link);
1495
-        }
1496
-
1497
-        $post_link = trailingslashit(
1498
-            preg_replace(  "/" . preg_quote( $slug, "/" ) . "/", $slug ."/%gd_taxonomy%",$post_link, 1 )
1499
-        );
1500
-
1501
-        if ($fix_url) {
1502
-            $post_link = $site_url . $post_link;
1503
-        }
1504
-
1505
-        if (isset($comment_post_cache[$post->ID])) {
1506
-            $post = $comment_post_cache[$post->ID];
1507
-        }
1508
-        if (isset($gd_permalink_cache[$post->ID]) && $gd_permalink_cache[$post->ID] && !$sample) {
1509
-            $post_id = $post->ID;
1510
-            if (isset($orig_post)) {
1511
-                $post = $orig_post;
1512
-            }
1513
-            return $gd_permalink_cache[$post_id];
1514
-        }
1488
+		if (function_exists('geodir_location_geo_home_link')) {
1489
+			add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
1490
+		}
1515 1491
 
1516
-        if (!isset($post->post_locations)) {
1517
-            $post_type = $post->post_type;
1518
-            $ID = $post->ID;
1519
-            $post2 = $wpdb->get_row(
1520
-                $wpdb->prepare(
1521
-                    "SELECT * from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1522
-                    array($post->ID)
1523
-                )
1524
-            );
1492
+		$fix_url = strpos($post_link, $site_url) === 0 ? true : false;
1493
+		if ($fix_url) {
1494
+			$post_link = str_replace($site_url, '', $post_link);
1495
+		}
1525 1496
 
1526
-            $post = (object)array_merge((array)$post, (array)$post2);
1497
+		$post_link = trailingslashit(
1498
+			preg_replace(  "/" . preg_quote( $slug, "/" ) . "/", $slug ."/%gd_taxonomy%",$post_link, 1 )
1499
+		);
1527 1500
 
1528
-            $comment_post_cache[$post->ID] = $post;
1529
-        }
1501
+		if ($fix_url) {
1502
+			$post_link = $site_url . $post_link;
1503
+		}
1530 1504
 
1505
+		if (isset($comment_post_cache[$post->ID])) {
1506
+			$post = $comment_post_cache[$post->ID];
1507
+		}
1508
+		if (isset($gd_permalink_cache[$post->ID]) && $gd_permalink_cache[$post->ID] && !$sample) {
1509
+			$post_id = $post->ID;
1510
+			if (isset($orig_post)) {
1511
+				$post = $orig_post;
1512
+			}
1513
+			return $gd_permalink_cache[$post_id];
1514
+		}
1531 1515
 
1516
+		if (!isset($post->post_locations)) {
1517
+			$post_type = $post->post_type;
1518
+			$ID = $post->ID;
1519
+			$post2 = $wpdb->get_row(
1520
+				$wpdb->prepare(
1521
+					"SELECT * from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1522
+					array($post->ID)
1523
+				)
1524
+			);
1532 1525
 
1533
-        if (false !== strpos($post_link, '%gd_taxonomy%')) {
1526
+			$post = (object)array_merge((array)$post, (array)$post2);
1534 1527
 
1535
-            if ( apply_filters("geodir_add_location_url_to_url",get_option('geodir_add_location_url'),$post->post_type,$post)) {
1536
-                $location_request = '';
1528
+			$comment_post_cache[$post->ID] = $post;
1529
+		}
1537 1530
 
1538 1531
 
1539
-                if (!empty($post->post_locations)) {
1540
-                    $geodir_arr_locations = explode(',', $post->post_locations);
1541
-                    if (count($geodir_arr_locations) == 3) {
1542
-                        $post->city_slug = str_replace('[', '', $geodir_arr_locations[0]);
1543
-                        $post->city_slug = str_replace(']', '', $post->city_slug);
1544
-                        $post->region_slug = str_replace('[', '', $geodir_arr_locations[1]);
1545
-                        $post->region_slug = str_replace(']', '', $post->region_slug);
1546
-                        $post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1547
-                        $post->country_slug = str_replace(']', '', $post->country_slug);
1548 1532
 
1549
-                        $post_location = (object)array('country_slug' => $post->country_slug,
1550
-                            'region_slug' => $post->region_slug,
1551
-                            'city_slug' => $post->city_slug
1552
-                        );
1533
+		if (false !== strpos($post_link, '%gd_taxonomy%')) {
1553 1534
 
1554
-                    } else
1555
-                        $post_location = geodir_get_location();
1535
+			if ( apply_filters("geodir_add_location_url_to_url",get_option('geodir_add_location_url'),$post->post_type,$post)) {
1536
+				$location_request = '';
1556 1537
 
1557 1538
 
1558
-                } else {
1539
+				if (!empty($post->post_locations)) {
1540
+					$geodir_arr_locations = explode(',', $post->post_locations);
1541
+					if (count($geodir_arr_locations) == 3) {
1542
+						$post->city_slug = str_replace('[', '', $geodir_arr_locations[0]);
1543
+						$post->city_slug = str_replace(']', '', $post->city_slug);
1544
+						$post->region_slug = str_replace('[', '', $geodir_arr_locations[1]);
1545
+						$post->region_slug = str_replace(']', '', $post->region_slug);
1546
+						$post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1547
+						$post->country_slug = str_replace(']', '', $post->country_slug);
1559 1548
 
1560
-                    $post_location_sql = $wpdb->get_results(
1561
-                        $wpdb->prepare(
1562
-                            "SELECT post_locations from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1563
-                            array($post->ID)
1564
-                        )
1565
-                    );
1566
-
1567
-                    if (!empty($post_location_sql) && is_array($post_location_sql) && !empty($post_location_sql[0]->post_locations)) {
1568
-
1569
-                        $geodir_arr_locations = explode(',', $post_location_sql[0]->post_locations);
1570
-                        if (count($geodir_arr_locations) == 3) {
1571
-                            $post->city_slug = str_replace('[', '', $geodir_arr_locations[0]);
1572
-                            $post->city_slug = str_replace(']', '', $post->city_slug);
1573
-                            $post->region_slug = str_replace('[', '', $geodir_arr_locations[1]);
1574
-                            $post->region_slug = str_replace(']', '', $post->region_slug);
1575
-                            $post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1576
-                            $post->country_slug = str_replace(']', '', $post->country_slug);
1577
-
1578
-                            $post_location = (object)array('country_slug' => $post->country_slug,
1579
-                                'region_slug' => $post->region_slug,
1580
-                                'city_slug' => $post->city_slug
1581
-                            );
1549
+						$post_location = (object)array('country_slug' => $post->country_slug,
1550
+							'region_slug' => $post->region_slug,
1551
+							'city_slug' => $post->city_slug
1552
+						);
1582 1553
 
1583
-                        }
1584
-                    } else
1585
-                        $post_location = geodir_get_location();
1586
-                }
1554
+					} else
1555
+						$post_location = geodir_get_location();
1587 1556
 
1588 1557
 
1589
-                if (!empty($post_location)) {
1590
-                    $country_slug = isset($post_location->country_slug) ? $post_location->country_slug : '';
1558
+				} else {
1559
+
1560
+					$post_location_sql = $wpdb->get_results(
1561
+						$wpdb->prepare(
1562
+							"SELECT post_locations from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1563
+							array($post->ID)
1564
+						)
1565
+					);
1566
+
1567
+					if (!empty($post_location_sql) && is_array($post_location_sql) && !empty($post_location_sql[0]->post_locations)) {
1568
+
1569
+						$geodir_arr_locations = explode(',', $post_location_sql[0]->post_locations);
1570
+						if (count($geodir_arr_locations) == 3) {
1571
+							$post->city_slug = str_replace('[', '', $geodir_arr_locations[0]);
1572
+							$post->city_slug = str_replace(']', '', $post->city_slug);
1573
+							$post->region_slug = str_replace('[', '', $geodir_arr_locations[1]);
1574
+							$post->region_slug = str_replace(']', '', $post->region_slug);
1575
+							$post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1576
+							$post->country_slug = str_replace(']', '', $post->country_slug);
1577
+
1578
+							$post_location = (object)array('country_slug' => $post->country_slug,
1579
+								'region_slug' => $post->region_slug,
1580
+								'city_slug' => $post->city_slug
1581
+							);
1582
+
1583
+						}
1584
+					} else
1585
+						$post_location = geodir_get_location();
1586
+				}
1587
+
1588
+
1589
+				if (!empty($post_location)) {
1590
+					$country_slug = isset($post_location->country_slug) ? $post_location->country_slug : '';
1591 1591
 					$region_slug = isset($post_location->region_slug) ? $post_location->region_slug : '';
1592 1592
 					$city_slug = isset($post_location->city_slug) ? $post_location->city_slug : '';
1593 1593
 					
@@ -1605,78 +1605,78 @@  discard block
 block discarded – undo
1605 1605
 					$location_slug[] = $city_slug;
1606 1606
 					
1607 1607
 					$location_request .= implode('/', $location_slug) . '/';
1608
-                }
1609
-            }
1608
+				}
1609
+			}
1610 1610
 
1611
-            if (get_option('geodir_add_categories_url')) {
1611
+			if (get_option('geodir_add_categories_url')) {
1612 1612
 
1613
-                $term_request = '';
1614
-                $taxonomies = geodir_get_taxonomies($post->post_type);
1613
+				$term_request = '';
1614
+				$taxonomies = geodir_get_taxonomies($post->post_type);
1615 1615
 
1616
-                $taxonomies = end($taxonomies);
1616
+				$taxonomies = end($taxonomies);
1617 1617
 
1618
-                if (!empty($post->default_category)) {
1619
-                    $post_terms = $post->default_category;
1620
-                } else {
1621
-                    $post_terms = '';
1618
+				if (!empty($post->default_category)) {
1619
+					$post_terms = $post->default_category;
1620
+				} else {
1621
+					$post_terms = '';
1622 1622
 
1623
-                    if (isset($post->{$taxonomies})) {
1624
-                        $post_terms = explode(",", trim($post->{$taxonomies}, ","));
1625
-                        $post_terms = $post_terms[0];
1626
-                    }
1623
+					if (isset($post->{$taxonomies})) {
1624
+						$post_terms = explode(",", trim($post->{$taxonomies}, ","));
1625
+						$post_terms = $post_terms[0];
1626
+					}
1627 1627
 
1628
-                    if (!$post_terms)
1629
-                        $post_terms = geodir_get_post_meta($post->ID, 'default_category', true);
1628
+					if (!$post_terms)
1629
+						$post_terms = geodir_get_post_meta($post->ID, 'default_category', true);
1630 1630
 
1631
-                    if (!$post_terms) {
1632
-                        $post_terms = geodir_get_post_meta($post->ID, $taxonomies, true);
1631
+					if (!$post_terms) {
1632
+						$post_terms = geodir_get_post_meta($post->ID, $taxonomies, true);
1633 1633
 
1634
-                        if ($post_terms) {
1635
-                            $post_terms = explode(",", trim($post_terms, ","));
1636
-                            $post_terms = $post_terms[0];
1637
-                        }
1638
-                    }
1639
-                }
1634
+						if ($post_terms) {
1635
+							$post_terms = explode(",", trim($post_terms, ","));
1636
+							$post_terms = $post_terms[0];
1637
+						}
1638
+					}
1639
+				}
1640 1640
 
1641
-                $term = get_term_by('id', $post_terms, $taxonomies);
1641
+				$term = get_term_by('id', $post_terms, $taxonomies);
1642 1642
 
1643
-                if (!empty($term))
1644
-                    $term_request = $term->slug;
1645
-                //$term_request = $term->slug.'/';
1646
-            }
1643
+				if (!empty($term))
1644
+					$term_request = $term->slug;
1645
+				//$term_request = $term->slug.'/';
1646
+			}
1647 1647
 
1648
-            $request_term = '';
1649
-            $listingurl_separator = '';
1650
-            //$detailurl_separator = get_option('geodir_detailurl_separator');
1651
-            $detailurl_separator = '';
1652
-            if (isset($location_request) && $location_request != '' && isset($term_request) && $term_request != '') {
1653
-                $request_term = $location_request;
1654
-                //$listingurl_separator = get_option('geodir_listingurl_separator');
1655
-                //$request_term .= $listingurl_separator.'/'.$term_request;
1656
-                $request_term .= $term_request;
1648
+			$request_term = '';
1649
+			$listingurl_separator = '';
1650
+			//$detailurl_separator = get_option('geodir_detailurl_separator');
1651
+			$detailurl_separator = '';
1652
+			if (isset($location_request) && $location_request != '' && isset($term_request) && $term_request != '') {
1653
+				$request_term = $location_request;
1654
+				//$listingurl_separator = get_option('geodir_listingurl_separator');
1655
+				//$request_term .= $listingurl_separator.'/'.$term_request;
1656
+				$request_term .= $term_request;
1657 1657
 
1658
-            } else {
1659
-                if (isset($location_request) && $location_request != '') $request_term = $location_request;
1658
+			} else {
1659
+				if (isset($location_request) && $location_request != '') $request_term = $location_request;
1660 1660
 
1661
-                if (isset($term_request) && $term_request != '') $request_term .= $term_request;
1662
-            }
1663
-            $request_term = trim($request_term, '/');
1664
-            if (!empty($request_term))
1665
-                $post_link = str_replace('%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1666
-            else
1667
-                $post_link = str_replace('/%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1668
-            //echo $post_link ;
1669
-        }
1670
-        // temp cache the permalink
1671
-        if (!$sample && (!isset($_REQUEST['geodir_ajax']) || (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] != 'add_listing'))) {
1672
-            $gd_permalink_cache[$post->ID] = $post_link;
1673
-        }
1674
-    }
1675
-    if (isset($orig_post)) {
1676
-        $post = $orig_post;
1677
-    }
1678
-
1679
-    return $post_link;
1661
+				if (isset($term_request) && $term_request != '') $request_term .= $term_request;
1662
+			}
1663
+			$request_term = trim($request_term, '/');
1664
+			if (!empty($request_term))
1665
+				$post_link = str_replace('%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1666
+			else
1667
+				$post_link = str_replace('/%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1668
+			//echo $post_link ;
1669
+		}
1670
+		// temp cache the permalink
1671
+		if (!$sample && (!isset($_REQUEST['geodir_ajax']) || (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] != 'add_listing'))) {
1672
+			$gd_permalink_cache[$post->ID] = $post_link;
1673
+		}
1674
+	}
1675
+	if (isset($orig_post)) {
1676
+		$post = $orig_post;
1677
+	}
1678
+
1679
+	return $post_link;
1680 1680
 }
1681 1681
 
1682 1682
 /**
@@ -1692,99 +1692,99 @@  discard block
 block discarded – undo
1692 1692
  * @return string The term link.
1693 1693
  */
1694 1694
 function geodir_term_link($termlink, $term, $taxonomy) {
1695
-    $geodir_taxonomies = geodir_get_taxonomies('', true);
1695
+	$geodir_taxonomies = geodir_get_taxonomies('', true);
1696 1696
 
1697
-    if (isset($taxonomy) && !empty($geodir_taxonomies) && in_array($taxonomy, $geodir_taxonomies)) {
1698
-        global $geodir_add_location_url, $gd_session;
1699
-        $include_location = false;
1700
-        $request_term = array();
1701
-        $add_location_url = get_option('geodir_add_location_url');
1702
-        $location_manager = defined('POST_LOCATION_TABLE') ? true : false;
1697
+	if (isset($taxonomy) && !empty($geodir_taxonomies) && in_array($taxonomy, $geodir_taxonomies)) {
1698
+		global $geodir_add_location_url, $gd_session;
1699
+		$include_location = false;
1700
+		$request_term = array();
1701
+		$add_location_url = get_option('geodir_add_location_url');
1702
+		$location_manager = defined('POST_LOCATION_TABLE') ? true : false;
1703 1703
 
1704
-        $listing_slug = geodir_get_listing_slug($taxonomy);
1704
+		$listing_slug = geodir_get_listing_slug($taxonomy);
1705 1705
 
1706
-        if ($geodir_add_location_url != NULL && $geodir_add_location_url != '') {
1707
-            if ($geodir_add_location_url && $add_location_url) {
1708
-                $include_location = true;
1709
-            }
1710
-        } elseif ($add_location_url && $gd_session->get('gd_multi_location') == 1) {
1711
-            $include_location = true;
1712
-        } elseif ($add_location_url && $location_manager && geodir_is_page('detail')) {
1713
-            $include_location = true;
1714
-        }
1715
-
1716
-        if ($include_location) {
1717
-            global $post;
1706
+		if ($geodir_add_location_url != NULL && $geodir_add_location_url != '') {
1707
+			if ($geodir_add_location_url && $add_location_url) {
1708
+				$include_location = true;
1709
+			}
1710
+		} elseif ($add_location_url && $gd_session->get('gd_multi_location') == 1) {
1711
+			$include_location = true;
1712
+		} elseif ($add_location_url && $location_manager && geodir_is_page('detail')) {
1713
+			$include_location = true;
1714
+		}
1715
+
1716
+		if ($include_location) {
1717
+			global $post;
1718 1718
             
1719
-            $neighbourhood_active = $location_manager && get_option('location_neighbourhoods') ? true : false;
1719
+			$neighbourhood_active = $location_manager && get_option('location_neighbourhoods') ? true : false;
1720 1720
             
1721
-            if (geodir_is_page('detail') && isset($post->country_slug)) {
1722
-                $location_terms = array(
1723
-                    'gd_country' => $post->country_slug,
1724
-                    'gd_region' => $post->region_slug,
1725
-                    'gd_city' => $post->city_slug
1726
-                );
1721
+			if (geodir_is_page('detail') && isset($post->country_slug)) {
1722
+				$location_terms = array(
1723
+					'gd_country' => $post->country_slug,
1724
+					'gd_region' => $post->region_slug,
1725
+					'gd_city' => $post->city_slug
1726
+				);
1727 1727
                 
1728
-                if ($neighbourhood_active && !empty($location_terms['gd_city']) && $gd_ses_neighbourhood = $gd_session->get('gd_neighbourhood')) {
1729
-                    $location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
1730
-                }
1731
-            } else {
1732
-                $location_terms = geodir_get_current_location_terms('query_vars');
1733
-            }
1728
+				if ($neighbourhood_active && !empty($location_terms['gd_city']) && $gd_ses_neighbourhood = $gd_session->get('gd_neighbourhood')) {
1729
+					$location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
1730
+				}
1731
+			} else {
1732
+				$location_terms = geodir_get_current_location_terms('query_vars');
1733
+			}
1734 1734
 
1735
-            $geodir_show_location_url = get_option('geodir_show_location_url');
1736
-            $location_terms = geodir_remove_location_terms($location_terms);
1735
+			$geodir_show_location_url = get_option('geodir_show_location_url');
1736
+			$location_terms = geodir_remove_location_terms($location_terms);
1737 1737
 
1738
-            if (!empty($location_terms)) {
1739
-                $url_separator = '';
1738
+			if (!empty($location_terms)) {
1739
+				$url_separator = '';
1740 1740
 
1741
-                if (get_option('permalink_structure') != '') {
1742
-                    $old_listing_slug = '/' . $listing_slug . '/';
1743
-                    $request_term = implode("/", $location_terms);
1744
-                    $new_listing_slug = '/' . $listing_slug . '/' . $request_term . '/';
1741
+				if (get_option('permalink_structure') != '') {
1742
+					$old_listing_slug = '/' . $listing_slug . '/';
1743
+					$request_term = implode("/", $location_terms);
1744
+					$new_listing_slug = '/' . $listing_slug . '/' . $request_term . '/';
1745 1745
 
1746
-                    $termlink = substr_replace($termlink, $new_listing_slug, strpos($termlink, $old_listing_slug), strlen($old_listing_slug));
1747
-                } else {
1748
-                    $termlink = geodir_getlink($termlink, $request_term);
1749
-                }
1750
-            }
1751
-        }
1746
+					$termlink = substr_replace($termlink, $new_listing_slug, strpos($termlink, $old_listing_slug), strlen($old_listing_slug));
1747
+				} else {
1748
+					$termlink = geodir_getlink($termlink, $request_term);
1749
+				}
1750
+			}
1751
+		}
1752 1752
 
1753
-        // Alter the CPT slug is WPML is set to do so
1754
-        /* we can replace this with the below function
1753
+		// Alter the CPT slug is WPML is set to do so
1754
+		/* we can replace this with the below function
1755 1755
         if(function_exists('icl_object_id')){
1756 1756
             global $sitepress;
1757 1757
             $post_type = str_replace("category","",$taxonomy);
1758 1758
             $termlink = $sitepress->post_type_archive_link_filter( $termlink, $post_type);
1759 1759
         }*/
1760 1760
 
1761
-        // Alter the CPT slug if WPML is set to do so
1762
-        if (function_exists('icl_object_id')) {
1763
-            $post_types = get_option('geodir_post_types');
1764
-            $post_type = str_replace("category","",$taxonomy);
1765
-            $post_type = str_replace("_tags","",$post_type);
1766
-            $slug = $post_types[$post_type]['rewrite']['slug'];
1767
-            if (gd_wpml_slug_translation_turned_on($post_type)) {
1768
-                global $sitepress;
1769
-                $default_lang = $sitepress->get_default_language();
1770
-                $language_code = gd_wpml_get_lang_from_url($termlink);
1771
-                if (!$language_code ) {
1772
-                    $language_code  = $default_lang;
1773
-                }
1761
+		// Alter the CPT slug if WPML is set to do so
1762
+		if (function_exists('icl_object_id')) {
1763
+			$post_types = get_option('geodir_post_types');
1764
+			$post_type = str_replace("category","",$taxonomy);
1765
+			$post_type = str_replace("_tags","",$post_type);
1766
+			$slug = $post_types[$post_type]['rewrite']['slug'];
1767
+			if (gd_wpml_slug_translation_turned_on($post_type)) {
1768
+				global $sitepress;
1769
+				$default_lang = $sitepress->get_default_language();
1770
+				$language_code = gd_wpml_get_lang_from_url($termlink);
1771
+				if (!$language_code ) {
1772
+					$language_code  = $default_lang;
1773
+				}
1774 1774
 
1775
-                $org_slug = $slug;
1776
-                $slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: ' . $slug, $language_code);
1775
+				$org_slug = $slug;
1776
+				$slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: ' . $slug, $language_code);
1777 1777
 
1778
-                if (!$slug) {
1779
-                    $slug = $org_slug;
1780
-                }
1778
+				if (!$slug) {
1779
+					$slug = $org_slug;
1780
+				}
1781 1781
 
1782
-                $termlink = trailingslashit(preg_replace("/" . preg_quote($org_slug, "/") . "/", $slug  ,$termlink, 1));
1783
-            }
1784
-        }
1785
-    }
1782
+				$termlink = trailingslashit(preg_replace("/" . preg_quote($org_slug, "/") . "/", $slug  ,$termlink, 1));
1783
+			}
1784
+		}
1785
+	}
1786 1786
     
1787
-    return $termlink;
1787
+	return $termlink;
1788 1788
 }
1789 1789
 
1790 1790
 /**
@@ -1810,14 +1810,14 @@  discard block
 block discarded – undo
1810 1810
 	if (in_array($post_type, geodir_get_posttypes())) {
1811 1811
 		if (get_option('geodir_add_location_url') && $gd_session->get('gd_multi_location') == 1) {
1812 1812
 			if(geodir_is_page('detail') && !empty($post) && isset($post->country_slug)) {
1813
-                $location_terms = array(
1814
-                    'gd_country' => $post->country_slug,
1815
-                    'gd_region' => $post->region_slug,
1816
-                    'gd_city' => $post->city_slug
1817
-                );
1818
-            } else {
1819
-                $location_terms = geodir_get_current_location_terms('query_vars');
1820
-            }
1813
+				$location_terms = array(
1814
+					'gd_country' => $post->country_slug,
1815
+					'gd_region' => $post->region_slug,
1816
+					'gd_city' => $post->city_slug
1817
+				);
1818
+			} else {
1819
+				$location_terms = geodir_get_current_location_terms('query_vars');
1820
+			}
1821 1821
 			
1822 1822
 			$location_terms = geodir_remove_location_terms($location_terms);
1823 1823
 			
@@ -1848,14 +1848,14 @@  discard block
 block discarded – undo
1848 1848
  */
1849 1849
 function get_post_type_singular_label($post_type, $echo = false)
1850 1850
 {
1851
-    $obj_post_type = get_post_type_object($post_type);
1852
-    if (!is_object($obj_post_type)) {
1853
-        return;
1854
-    }
1855
-    if ($echo)
1856
-        echo $obj_post_type->labels->singular_name;
1857
-    else
1858
-        return $obj_post_type->labels->singular_name;
1851
+	$obj_post_type = get_post_type_object($post_type);
1852
+	if (!is_object($obj_post_type)) {
1853
+		return;
1854
+	}
1855
+	if ($echo)
1856
+		echo $obj_post_type->labels->singular_name;
1857
+	else
1858
+		return $obj_post_type->labels->singular_name;
1859 1859
 
1860 1860
 }
1861 1861
 
@@ -1870,16 +1870,16 @@  discard block
 block discarded – undo
1870 1870
  */
1871 1871
 function get_post_type_plural_label($post_type, $echo = false)
1872 1872
 {
1873
-    $all_postypes = geodir_get_posttypes();
1873
+	$all_postypes = geodir_get_posttypes();
1874 1874
 
1875
-    if (!in_array($post_type, $all_postypes))
1876
-        return false;
1875
+	if (!in_array($post_type, $all_postypes))
1876
+		return false;
1877 1877
 
1878
-    $obj_post_type = get_post_type_object($post_type);
1879
-    if ($echo)
1880
-        echo $obj_post_type->labels->name;
1881
-    else
1882
-        return $obj_post_type->labels->name;
1878
+	$obj_post_type = get_post_type_object($post_type);
1879
+	if ($echo)
1880
+		echo $obj_post_type->labels->name;
1881
+	else
1882
+		return $obj_post_type->labels->name;
1883 1883
 
1884 1884
 }
1885 1885
 
@@ -1898,51 +1898,51 @@  discard block
 block discarded – undo
1898 1898
  */
1899 1899
 function geodir_term_exists($term, $taxonomy = '', $parent = 0)
1900 1900
 {
1901
-    global $wpdb;
1902
-
1903
-    $select = "SELECT term_id FROM $wpdb->terms as t WHERE ";
1904
-    $tax_select = "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE ";
1905
-
1906
-    if (is_int($term)) {
1907
-        if (0 == $term)
1908
-            return 0;
1909
-        $where = 't.term_id = %d';
1910
-        if (!empty($taxonomy))
1911
-            return $wpdb->get_row($wpdb->prepare($tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1912
-        else
1913
-            return $wpdb->get_var($wpdb->prepare($select . $where, $term));
1914
-    }
1901
+	global $wpdb;
1902
+
1903
+	$select = "SELECT term_id FROM $wpdb->terms as t WHERE ";
1904
+	$tax_select = "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE ";
1905
+
1906
+	if (is_int($term)) {
1907
+		if (0 == $term)
1908
+			return 0;
1909
+		$where = 't.term_id = %d';
1910
+		if (!empty($taxonomy))
1911
+			return $wpdb->get_row($wpdb->prepare($tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1912
+		else
1913
+			return $wpdb->get_var($wpdb->prepare($select . $where, $term));
1914
+	}
1915 1915
 
1916
-    $term = trim(wp_unslash($term));
1916
+	$term = trim(wp_unslash($term));
1917 1917
 
1918
-    if ('' === $slug = sanitize_title($term))
1919
-        return 0;
1918
+	if ('' === $slug = sanitize_title($term))
1919
+		return 0;
1920 1920
 
1921
-    $where = 't.slug = %s';
1921
+	$where = 't.slug = %s';
1922 1922
 
1923
-    $where_fields = array($slug);
1924
-    if (!empty($taxonomy)) {
1925
-        $parent = (int)$parent;
1926
-        if ($parent > 0) {
1927
-            $where_fields[] = $parent;
1928
-            $else_where_fields[] = $parent;
1929
-            $where .= ' AND tt.parent = %d';
1923
+	$where_fields = array($slug);
1924
+	if (!empty($taxonomy)) {
1925
+		$parent = (int)$parent;
1926
+		if ($parent > 0) {
1927
+			$where_fields[] = $parent;
1928
+			$else_where_fields[] = $parent;
1929
+			$where .= ' AND tt.parent = %d';
1930 1930
 
1931
-        }
1931
+		}
1932 1932
 
1933
-        $where_fields[] = $taxonomy;
1933
+		$where_fields[] = $taxonomy;
1934 1934
 
1935 1935
 
1936
-        if ($result = $wpdb->get_row($wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $where_fields), ARRAY_A))
1937
-            return $result;
1936
+		if ($result = $wpdb->get_row($wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $where_fields), ARRAY_A))
1937
+			return $result;
1938 1938
 
1939
-        return false;
1940
-    }
1939
+		return false;
1940
+	}
1941 1941
 
1942
-    if ($result = $wpdb->get_var($wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where", $where_fields)))
1943
-        return $result;
1942
+	if ($result = $wpdb->get_var($wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where", $where_fields)))
1943
+		return $result;
1944 1944
 
1945
-    return false;
1945
+	return false;
1946 1946
 }
1947 1947
 
1948 1948
 /**
@@ -1954,7 +1954,7 @@  discard block
 block discarded – undo
1954 1954
 function geodir_get_term_icon_rebuild()
1955 1955
 {
1956 1956
 
1957
-    update_option('gd_term_icons', '');
1957
+	update_option('gd_term_icons', '');
1958 1958
 
1959 1959
 }
1960 1960
 
@@ -1972,60 +1972,60 @@  discard block
 block discarded – undo
1972 1972
  */
1973 1973
 function geodir_get_term_icon($term_id = false, $rebuild = false)
1974 1974
 {
1975
-    global $wpdb;
1976
-    if (!$rebuild) {
1977
-        $terms_icons = get_option('gd_term_icons');
1978
-    } else {
1979
-        $terms_icons = '';
1980
-    }
1981
-
1982
-    if (empty($terms_icons)) {
1983
-        $default_icon_url = get_option('geodir_default_marker_icon');
1984
-        $taxonomy = geodir_get_taxonomies();
1985
-        $post_types = geodir_get_posttypes();
1986
-        $tax_arr = array();
1987
-        foreach ($post_types as $post_type) {
1988
-            $tax_arr[] = "'" . $post_type . "category'";
1989
-        }
1990
-        $tax_c = implode(',', $tax_arr);
1991
-        $terms = $wpdb->get_results("SELECT * FROM $wpdb->term_taxonomy WHERE taxonomy IN ($tax_c)");
1992
-        //$terms = get_terms( $taxonomy );
1993
-
1994
-        if($terms) {
1995
-            foreach ($terms as $term) {
1996
-                $post_type = str_replace("category", "", $term->taxonomy);
1997
-                $a_terms[$post_type][] = $term;
1975
+	global $wpdb;
1976
+	if (!$rebuild) {
1977
+		$terms_icons = get_option('gd_term_icons');
1978
+	} else {
1979
+		$terms_icons = '';
1980
+	}
1998 1981
 
1999
-            }
2000
-        }
1982
+	if (empty($terms_icons)) {
1983
+		$default_icon_url = get_option('geodir_default_marker_icon');
1984
+		$taxonomy = geodir_get_taxonomies();
1985
+		$post_types = geodir_get_posttypes();
1986
+		$tax_arr = array();
1987
+		foreach ($post_types as $post_type) {
1988
+			$tax_arr[] = "'" . $post_type . "category'";
1989
+		}
1990
+		$tax_c = implode(',', $tax_arr);
1991
+		$terms = $wpdb->get_results("SELECT * FROM $wpdb->term_taxonomy WHERE taxonomy IN ($tax_c)");
1992
+		//$terms = get_terms( $taxonomy );
2001 1993
 
2002
-        if($a_terms) {
2003
-            foreach ($a_terms as $pt => $t2) {
1994
+		if($terms) {
1995
+			foreach ($terms as $term) {
1996
+				$post_type = str_replace("category", "", $term->taxonomy);
1997
+				$a_terms[$post_type][] = $term;
2004 1998
 
2005
-                foreach ($t2 as $term) {
2006
-                    $term_icon = get_tax_meta($term->term_id, 'ct_cat_icon', false, $pt);
2007
-                    if ($term_icon) {
2008
-                        $term_icon_url = $term_icon["src"];
2009
-                    } else {
2010
-                        $term_icon_url = $default_icon_url;
2011
-                    }
2012
-                    $terms_icons[$term->term_id] = $term_icon_url;
2013
-                }
2014
-            }
2015
-        }
1999
+			}
2000
+		}
2001
+
2002
+		if($a_terms) {
2003
+			foreach ($a_terms as $pt => $t2) {
2004
+
2005
+				foreach ($t2 as $term) {
2006
+					$term_icon = get_tax_meta($term->term_id, 'ct_cat_icon', false, $pt);
2007
+					if ($term_icon) {
2008
+						$term_icon_url = $term_icon["src"];
2009
+					} else {
2010
+						$term_icon_url = $default_icon_url;
2011
+					}
2012
+					$terms_icons[$term->term_id] = $term_icon_url;
2013
+				}
2014
+			}
2015
+		}
2016 2016
 
2017
-        update_option('gd_term_icons', $terms_icons);
2018
-    }
2017
+		update_option('gd_term_icons', $terms_icons);
2018
+	}
2019 2019
 
2020
-    if ($term_id && isset($terms_icons[$term_id])) {
2021
-        return $terms_icons[$term_id];
2022
-    } elseif ($term_id && !isset($terms_icons[$term_id])) {
2023
-        return get_option('geodir_default_marker_icon');
2024
-    }
2020
+	if ($term_id && isset($terms_icons[$term_id])) {
2021
+		return $terms_icons[$term_id];
2022
+	} elseif ($term_id && !isset($terms_icons[$term_id])) {
2023
+		return get_option('geodir_default_marker_icon');
2024
+	}
2025 2025
 
2026
-    if (is_ssl()) {
2027
-        $terms_icons = str_replace("http:","https:",$terms_icons );
2028
-    }
2026
+	if (is_ssl()) {
2027
+		$terms_icons = str_replace("http:","https:",$terms_icons );
2028
+	}
2029 2029
 
2030
-    return apply_filters('geodir_get_term_icons', $terms_icons, $term_id);
2030
+	return apply_filters('geodir_get_term_icons', $terms_icons, $term_id);
2031 2031
 }
2032 2032
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
                              * @since 1.0.0
61 61
                              * @param string $menu_class The menu HTML class.
62 62
                              */
63
-                            $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
63
+                            $li_class = apply_filters('geodir_menu_li_class', 'menu-item '.$menu_class);
64 64
                             /**
65 65
                              * Filter the menu a class.
66 66
                              *
67 67
                              * @since 1.0.0
68 68
                              */
69 69
                             $a_class = apply_filters('geodir_menu_a_class', '');
70
-                            $items .= '<li class="' . $li_class . '">
71
-									<a href="' . get_post_type_archive_link($post_type) . '" class="' . $a_class . '">
72
-										' . __(ucfirst($args->labels->name),'geodirectory') . '
70
+                            $items .= '<li class="'.$li_class.'">
71
+									<a href="' . get_post_type_archive_link($post_type).'" class="'.$a_class.'">
72
+										' . __(ucfirst($args->labels->name), 'geodirectory').'
73 73
 									</a>
74 74
 								</li>';
75 75
                         }
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
              * @since 1.0.0
89 89
              * @param string $menu_class The menu HTML class.
90 90
              */
91
-            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-listings ' . $menu_class);
91
+            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-listings '.$menu_class);
92 92
             /**
93 93
              * Filter the sub menu li class.
94 94
              *
95 95
              * @since 1.0.0
96 96
              * @param string $menu_class The menu HTML class.
97 97
              */
98
-            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
98
+            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item '.$menu_class);
99 99
             /**
100 100
              * Filter the sub menu ul class.
101 101
              *
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
              * @since 1.0.0
115 115
              */
116 116
             $sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
117
-            $items .= '<li class="' . $li_class . '">
118
-					<a href="#" class="' . $a_class . '">' . __('Listing', 'geodirectory') . '</a>
119
-					<ul class="' . $sub_ul_class . '">';
117
+            $items .= '<li class="'.$li_class.'">
118
+					<a href="#" class="' . $a_class.'">'.__('Listing', 'geodirectory').'</a>
119
+					<ul class="' . $sub_ul_class.'">';
120 120
             $post_types = geodir_get_posttypes('object');
121 121
 
122 122
             $show_listing_post_types = get_option('geodir_add_posttype_in_listing_nav');
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
                                 if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
134 134
                                     $menu_class = 'current-menu-item';
135 135
 
136
-                                $items .= '<li class="' . $sub_li_class . '">
137
-														<a href="' . get_post_type_archive_link($post_type) . '" class="' . $sub_a_class . '">
138
-															' . __(ucfirst($args->labels->name),'geodirectory') . '
136
+                                $items .= '<li class="'.$sub_li_class.'">
137
+														<a href="' . get_post_type_archive_link($post_type).'" class="'.$sub_a_class.'">
138
+															' . __(ucfirst($args->labels->name), 'geodirectory').'
139 139
 														</a>
140 140
 													</li>';
141 141
                             }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
              *
152 152
              * @since 1.5.9
153 153
              */
154
-            $items .= apply_filters('geodir_menu_after_sub_ul','');
154
+            $items .= apply_filters('geodir_menu_after_sub_ul', '');
155 155
             $items .= '</li>';
156 156
         }
157 157
     }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                                      * @since 1.0.0
185 185
                                      * @param string $menu_class The menu HTML class.
186 186
                                      */
187
-                                    $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
187
+                                    $li_class = apply_filters('geodir_menu_li_class', 'menu-item '.$menu_class);
188 188
                                     /**
189 189
                                      * Filter the menu a class.
190 190
                                      *
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
                                      */
193 193
                                     $a_class = apply_filters('geodir_menu_a_class', '');
194 194
                                     $cpt_name = __($args->labels->singular_name, 'geodirectory');
195
-                                    $items .= '<li class="' . $li_class . '">
196
-											<a href="' . geodir_get_addlisting_link($post_type) . '" class="' . $a_class . '">
197
-												' . sprintf( __('Add %s', 'geodirectory'), $cpt_name ) . '
195
+                                    $items .= '<li class="'.$li_class.'">
196
+											<a href="' . geodir_get_addlisting_link($post_type).'" class="'.$a_class.'">
197
+												' . sprintf(__('Add %s', 'geodirectory'), $cpt_name).'
198 198
 											</a>
199 199
 										</li>';
200 200
                                 }
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
              * @since 1.0.0
219 219
              * @param string $menu_class The menu HTML class.
220 220
              */
221
-            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-add-listing ' . $menu_class);
221
+            $li_class = apply_filters('geodir_menu_li_class', 'menu-item menu-item-has-children menu-gd-add-listing '.$menu_class);
222 222
             /**
223 223
              * Filter the sub menu li class.
224 224
              *
225 225
              * @since 1.0.0
226 226
              * @param string $menu_class The menu HTML class.
227 227
              */
228
-            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item ' . $menu_class);
228
+            $sub_li_class = apply_filters('geodir_sub_menu_li_class', 'menu-item '.$menu_class);
229 229
             /**
230 230
              * Filter the sub menu ul class.
231 231
              *
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
              * @since 1.0.0
245 245
              */
246 246
             $sub_a_class = apply_filters('geodir_sub_menu_a_class', '');
247
-            $items .= '<li  class="' . $li_class . '">
248
-					<a href="#" class="' . $a_class . '">' . __('Add Listing', 'geodirectory') . '</a>
249
-					<ul class="' . $sub_ul_class . '">';
247
+            $items .= '<li  class="'.$li_class.'">
248
+					<a href="#" class="' . $a_class.'">'.__('Add Listing', 'geodirectory').'</a>
249
+					<ul class="' . $sub_ul_class.'">';
250 250
 
251 251
             $post_types = geodir_get_posttypes('object');
252 252
 
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
                                          * @since 1.0.0
270 270
                                          * @param string $menu_class The menu HTML class.
271 271
                                          */
272
-                                        $li_class = apply_filters('geodir_menu_li_class', 'menu-item ' . $menu_class);
272
+                                        $li_class = apply_filters('geodir_menu_li_class', 'menu-item '.$menu_class);
273 273
                                         $cpt_name = __($args->labels->singular_name, 'geodirectory');
274
-                                        $items .= '<li class="' . $li_class . '">
275
-														<a href="' . geodir_get_addlisting_link($post_type) . '" class="' . $sub_a_class . '">
276
-															' . sprintf( __('Add %s', 'geodirectory'), $cpt_name ) . '
274
+                                        $items .= '<li class="'.$li_class.'">
275
+														<a href="' . geodir_get_addlisting_link($post_type).'" class="'.$sub_a_class.'">
276
+															' . sprintf(__('Add %s', 'geodirectory'), $cpt_name).'
277 277
 														</a>
278 278
 													</li>';
279 279
                                     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             }
286 286
 
287 287
             $items .= '	</ul> ';
288
-            $items .= apply_filters('geodir_menu_after_sub_ul','');
288
+            $items .= apply_filters('geodir_menu_after_sub_ul', '');
289 289
             $items .= '</li>';
290 290
 
291 291
         }
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
     $geodir_theme_location = get_option('geodir_theme_location_nav');
314 314
     $geodir_theme_location_nav = array();
315 315
     if (empty($locations) && empty($geodir_theme_location)) {
316
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
316
+        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items()."</ul></div>", $menu);
317 317
         $geodir_theme_location_nav[] = $args['theme_location'];
318 318
         update_option('geodir_theme_location_nav', $geodir_theme_location_nav);
319 319
     }
320 320
     //else if(empty($geodir_theme_location)) // It means 'Show geodirectory navigation in selected menu locations' is not set yet.
321 321
 //		$menu = str_replace("</ul></div>",geodir_add_nav_menu_items()."</ul></div>",$menu);
322 322
     else if (is_array($geodir_theme_location) && isset($args['theme_location']) && in_array($args['theme_location'], $geodir_theme_location))
323
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
323
+        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items()."</ul></div>", $menu);
324 324
 
325 325
     return $menu;
326 326
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
     if (has_nav_menu($location) == '1' && is_array($geodir_theme_location) && in_array($location, $geodir_theme_location)) {
350 350
 
351
-        $items = $items . geodir_add_nav_menu_items();
351
+        $items = $items.geodir_add_nav_menu_items();
352 352
         return $items;
353 353
 
354 354
     } else {
@@ -373,12 +373,12 @@  discard block
 block discarded – undo
373 373
 
374 374
     $taxonomies = geodir_get_taxonomies();
375 375
     $taxonomies = implode("','", $taxonomies);
376
-    $taxonomies = "'" . $taxonomies . "'";
376
+    $taxonomies = "'".$taxonomies."'";
377 377
 
378 378
     $pn_categories = $wpdb->get_results(
379 379
         $wpdb->prepare(
380 380
             "SELECT $wpdb->terms.name as name, $wpdb->term_taxonomy.count as count, $wpdb->terms.term_id as cat_ID FROM $wpdb->term_taxonomy,  $wpdb->terms WHERE $wpdb->term_taxonomy.term_id = %d AND $wpdb->term_taxonomy.taxonomy in ( $taxonomies ) ORDER BY name",
381
-            array($wpdb->terms . term_id)
381
+            array($wpdb->terms.term_id)
382 382
         )
383 383
     );
384 384
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 
408 408
     if (geodir_is_page('add-listing') || geodir_is_page('preview')) {
409 409
         if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
410
-            $geodir_post_type = get_post_type((int)$_REQUEST['pid']);
410
+            $geodir_post_type = get_post_type((int) $_REQUEST['pid']);
411 411
         elseif (isset($_REQUEST['listing_type']))
412 412
             $geodir_post_type = sanitize_text_field($_REQUEST['listing_type']);
413 413
     }
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
     if (is_array($all_postypes) && !in_array($geodir_post_type, $all_postypes))
426 426
         $geodir_post_type = '';
427 427
 
428
-    if( defined( 'DOING_AJAX' ) && isset($_REQUEST['stype'])){
428
+    if (defined('DOING_AJAX') && isset($_REQUEST['stype'])) {
429 429
         $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
430 430
     }
431 431
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
      *
436 436
      * @since 1.6.9
437 437
      */
438
-    return apply_filters('geodir_get_current_posttype',$geodir_post_type);
438
+    return apply_filters('geodir_get_current_posttype', $geodir_post_type);
439 439
 }
440 440
 
441 441
 /**
@@ -449,17 +449,17 @@  discard block
 block discarded – undo
449 449
  */
450 450
 function geodir_get_default_posttype()
451 451
 {
452
-    $post_types = apply_filters( 'geodir_get_default_posttype', geodir_get_posttypes( 'object' ) );
452
+    $post_types = apply_filters('geodir_get_default_posttype', geodir_get_posttypes('object'));
453 453
 
454
-    foreach ( $post_types as $post_type => $info ) {
454
+    foreach ($post_types as $post_type => $info) {
455 455
         global $wpdb;
456
-        $has_posts = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type ) );
457
-        if ( $has_posts ) {
456
+        $has_posts = $wpdb->get_row($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type));
457
+        if ($has_posts) {
458 458
             $stype = $post_type; break;
459 459
         }
460 460
     }
461 461
 
462
-    if(!$stype){
462
+    if (!$stype) {
463 463
         $stype = 'gd_place';
464 464
     }
465 465
 
@@ -484,14 +484,14 @@  discard block
 block discarded – undo
484 484
         switch ($output):
485 485
             case 'object':
486 486
             case 'Object':
487
-                $post_types = json_decode(json_encode($post_types), FALSE);//(object)$post_types;
487
+                $post_types = json_decode(json_encode($post_types), FALSE); //(object)$post_types;
488 488
                 break;
489 489
             case 'array':
490 490
             case 'Array':
491
-                $post_types = (array)$post_types;
491
+                $post_types = (array) $post_types;
492 492
                 break;
493 493
 			case 'options':
494
-                $post_types = (array)$post_types;
494
+                $post_types = (array) $post_types;
495 495
 				
496 496
 				$options = array();
497 497
 				if (!empty($post_types)) {
@@ -609,15 +609,15 @@  discard block
 block discarded – undo
609 609
 
610 610
         $categories = get_terms($taxonomies);
611 611
 
612
-        $html .= '<option value="0">' . __('All', 'geodirectory') . '</option>';
612
+        $html .= '<option value="0">'.__('All', 'geodirectory').'</option>';
613 613
 
614 614
         foreach ($categories as $category_obj) {
615 615
             $select_opt = '';
616 616
             if ($selected == $category_obj->term_id) {
617 617
                 $select_opt = 'selected="selected"';
618 618
             }
619
-            $html .= '<option ' . $select_opt . ' value="' . $category_obj->term_id . '">'
620
-                . ucfirst($category_obj->name) . '</option>';
619
+            $html .= '<option '.$select_opt.' value="'.$category_obj->term_id.'">'
620
+                . ucfirst($category_obj->name).'</option>';
621 621
         }
622 622
 
623 623
         if ($echo)
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
     } elseif (isset($wp_query->tax_query->queries)) {
686 686
         $tax_arr = $wp_query->tax_query->queries;
687 687
         //if tax query has 'relation' set then it will break wp_list_pluck so we remove it
688
-        if(isset( $tax_arr['relation'])){unset( $tax_arr['relation']);}
688
+        if (isset($tax_arr['relation'])) {unset($tax_arr['relation']); }
689 689
         $taxonomies = wp_list_pluck($tax_arr, 'taxonomy');
690 690
     }
691 691
 
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 
740 740
             if ((!geodir_is_page('listing')) || (is_search() && $_REQUEST['search_taxonomy'] == '')) {
741 741
                 if ($cat_parent == 0) {
742
-                    $list_class = 'main_list gd-parent-cats-list gd-cats-display-' . $cat_display;
742
+                    $list_class = 'main_list gd-parent-cats-list gd-cats-display-'.$cat_display;
743 743
                     $main_list_class = 'class="main_list_selecter"';
744 744
                 } else {
745 745
                     //$display = 'display:none';
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 
750 750
             if ($cat_display == 'checkbox' || $cat_display == 'radio') {
751 751
                 $p = 0;
752
-                $out = '<div class="' . $list_class . ' gd-cat-row-' . $cat_parent . '" style="margin-left:' . $p . 'px;' . $display . ';">';
752
+                $out = '<div class="'.$list_class.' gd-cat-row-'.$cat_parent.'" style="margin-left:'.$p.'px;'.$display.';">';
753 753
             }
754 754
 
755 755
             foreach ($cat_terms as $cat_term) {
@@ -764,12 +764,12 @@  discard block
 block discarded – undo
764 764
                 }
765 765
 
766 766
                 if ($cat_display == 'radio')
767
-                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
767
+                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category['.$cat_term->taxonomy.'][]" '.$main_list_class.' alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" '.$checked.$onchange.' id="gd-cat-'.$cat_term->term_id.'" >'.$term_check.ucfirst($cat_term->name).'</span>';
768 768
                 elseif ($cat_display == 'select' || $cat_display == 'multiselect')
769
-                    $out .= '<option ' . $main_list_class . ' style="margin-left:' . $p . 'px;" alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' >' . $term_check . ucfirst($cat_term->name) . '</option>';
769
+                    $out .= '<option '.$main_list_class.' style="margin-left:'.$p.'px;" alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" '.$checked.$onchange.' >'.$term_check.ucfirst($cat_term->name).'</option>';
770 770
 
771 771
                 else {
772
-                    $out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
772
+                    $out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category['.$cat_term->taxonomy.'][]" '.$main_list_class.' alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" '.$checked.$onchange.' id="gd-cat-'.$cat_term->term_id.'" >'.$term_check.ucfirst($cat_term->name).'</span>';
773 773
                 }
774 774
 
775 775
                 // Call recurson to print sub cats
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
             $cat_exclude = serialize($exclude_cats);
809 809
 
810 810
         if (isset($_REQUEST['backandedit'])) {
811
-            $post = (object)$gd_session->get('listing');
811
+            $post = (object) $gd_session->get('listing');
812 812
 
813 813
             if (!is_array($post->post_category[$cat_taxonomy]))
814 814
                 $post_category = $post->post_category[$cat_taxonomy];
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 
841 841
             if (!empty($post_category)) {
842 842
                 $cat1 = array_filter(explode(',', $post_category));
843
-                $post_category = ',' . implode(',', $cat1) . ',';
843
+                $post_category = ','.implode(',', $cat1).',';
844 844
 
845 845
             }
846 846
 
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
                 foreach ($post_category_upd as $cat) {
852 852
 
853 853
                     if (!in_array($cat, $exclude_cats) && $cat != '') {
854
-                        $post_category_change .= ',' . $cat;
854
+                        $post_category_change .= ','.$cat;
855 855
                     }
856 856
                 }
857 857
                 $post_category = $post_category_change;
@@ -863,11 +863,11 @@  discard block
 block discarded – undo
863 863
             }
864 864
         }
865 865
 
866
-        echo '<input type="hidden" id="cat_limit" value="' . $cat_limit . '" name="cat_limit[' . $cat_taxonomy . ']"  />';
866
+        echo '<input type="hidden" id="cat_limit" value="'.$cat_limit.'" name="cat_limit['.$cat_taxonomy.']"  />';
867 867
 
868
-        echo '<input type="hidden" id="post_category" value="' . $post_category . '" name="post_category[' . $cat_taxonomy . ']"  />';
868
+        echo '<input type="hidden" id="post_category" value="'.$post_category.'" name="post_category['.$cat_taxonomy.']"  />';
869 869
 
870
-        echo '<input type="hidden" id="post_category_str" value="' . $post_category_str . '" name="post_category_str[' . $cat_taxonomy . ']"  />';
870
+        echo '<input type="hidden" id="post_category_str" value="'.$post_category_str.'" name="post_category_str['.$cat_taxonomy.']"  />';
871 871
 
872 872
 
873 873
         ?>
@@ -886,14 +886,14 @@  discard block
 block discarded – undo
886 886
 
887 887
             function show_subcatlist(main_cat, catObj) {
888 888
                 if (main_cat != '') {
889
-					var url = '<?php echo geodir_get_ajax_url();?>';
890
-                    var cat_taxonomy = '<?php echo $cat_taxonomy;?>';
891
-                    var cat_exclude = '<?php echo base64_encode($cat_exclude);?>';
889
+					var url = '<?php echo geodir_get_ajax_url(); ?>';
890
+                    var cat_taxonomy = '<?php echo $cat_taxonomy; ?>';
891
+                    var cat_exclude = '<?php echo base64_encode($cat_exclude); ?>';
892 892
                     var cat_limit = jQuery('#' + cat_taxonomy).find('#cat_limit').val();
893
-					<?php if ((int)$cat_limit > 0) { ?>
893
+					<?php if ((int) $cat_limit > 0) { ?>
894 894
 					var selected = parseInt(jQuery('#' + cat_taxonomy).find('.cat_sublist > div.post_catlist_item').length);
895 895
 					if (cat_limit != '' && selected > 0 && selected >= cat_limit && cat_limit != 0) {
896
-						alert("<?php echo esc_attr(wp_sprintf(__('You have reached category limit of %d categories.', 'geodirectory'), (int)$cat_limit));?>");
896
+						alert("<?php echo esc_attr(wp_sprintf(__('You have reached category limit of %d categories.', 'geodirectory'), (int) $cat_limit)); ?>");
897 897
 						return false;
898 898
 					}
899 899
 					<?php } ?>
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
             }
933 933
 
934 934
             function update_listing_cat(el) {
935
-                var cat_taxonomy = '<?php echo $cat_taxonomy;?>';
935
+                var cat_taxonomy = '<?php echo $cat_taxonomy; ?>';
936 936
                 var cat_ids = '';
937 937
                 var main_cat = '';
938 938
                 var sub_cat = '';
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
         <div class="main_cat_list" style=" <?php if (isset($style)) {
1014 1014
             echo $style;
1015 1015
         }?> ">
1016
-            <?php geodir_get_catlist($cat_taxonomy, 0);  // print main categories list
1016
+            <?php geodir_get_catlist($cat_taxonomy, 0); // print main categories list
1017 1017
             ?>
1018 1018
         </div>
1019 1019
     <?php
@@ -1040,9 +1040,9 @@  discard block
 block discarded – undo
1040 1040
     if ($exclude != '') {
1041 1041
         $exclude_cats = maybe_unserialize(base64_decode($exclude));
1042 1042
 
1043
-        if(is_array( $exclude_cats)){
1044
-            $exclude_cats = array_map( 'intval', $exclude_cats );
1045
-        }else{
1043
+        if (is_array($exclude_cats)) {
1044
+            $exclude_cats = array_map('intval', $exclude_cats);
1045
+        } else {
1046 1046
             $exclude_cats = intval($exclude_cats);
1047 1047
         }
1048 1048
 
@@ -1056,25 +1056,25 @@  discard block
 block discarded – undo
1056 1056
         <?php $main_cat = get_term($parrent, $request_taxonomy); ?>
1057 1057
 
1058 1058
         <div class="post_catlist_item" style="border:1px solid #CCCCCC; margin:5px auto; padding:5px;">
1059
-            <img alt="move icon" src="<?php echo geodir_plugin_url() . '/geodirectory-assets/images/move.png';?>"
1059
+            <img alt="move icon" src="<?php echo geodir_plugin_url().'/geodirectory-assets/images/move.png'; ?>"
1060 1060
                  onclick="jQuery(this).closest('div').remove();update_listing_cat(this);" align="right"/>
1061 1061
             <?php /* ?>
1062 1062
 		<img src="<?php echo geodir_plugin_url().'/geodirectory-assets/images/move.png';?>" onclick="jQuery(this).closest('div').remove();show_subcatlist();" align="right" /> 
1063 1063
 		<?php */ ?>
1064 1064
 
1065
-            <input type="checkbox" value="<?php echo $main_cat->term_id;?>" class="listing_main_cat"
1065
+            <input type="checkbox" value="<?php echo $main_cat->term_id; ?>" class="listing_main_cat"
1066 1066
                    onchange="if(jQuery(this).is(':checked')){jQuery(this).closest('div').find('.post_default_category').prop('checked',false).show();}else{jQuery(this).closest('div').find('.post_default_category').prop('checked',false).hide();};update_listing_cat()"
1067 1067
                    checked="checked" disabled="disabled"/>
1068 1068
        <span> 
1069
-        <?php printf(__('Add listing in %s category', 'geodirectory'), geodir_ucwords($main_cat->name));?>
1069
+        <?php printf(__('Add listing in %s category', 'geodirectory'), geodir_ucwords($main_cat->name)); ?>
1070 1070
         </span>
1071 1071
             <br/>
1072 1072
 
1073 1073
             <div class="post_default_category">
1074
-                <input type="radio" name="post_default_category" value="<?php echo $main_cat->term_id;?>"
1075
-                       onchange="update_listing_cat()" <?php if ($default) echo ' checked="checked" ';?>   />
1074
+                <input type="radio" name="post_default_category" value="<?php echo $main_cat->term_id; ?>"
1075
+                       onchange="update_listing_cat()" <?php if ($default) echo ' checked="checked" '; ?>   />
1076 1076
         <span> 
1077
-        <?php printf(__('Set %s as default category', 'geodirectory'), geodir_ucwords($main_cat->name));?>
1077
+        <?php printf(__('Set %s as default category', 'geodirectory'), geodir_ucwords($main_cat->name)); ?>
1078 1078
         </span>
1079 1079
             </div>
1080 1080
 
@@ -1107,7 +1107,7 @@  discard block
 block discarded – undo
1107 1107
         $post_cat_str = $post_categories[$request_taxonomy];
1108 1108
         $post_cat_array = explode("#", $post_cat_str);
1109 1109
         if (is_array($post_cat_array)) {
1110
-            $post_cat_array = array_unique( $post_cat_array );
1110
+            $post_cat_array = array_unique($post_cat_array);
1111 1111
 
1112 1112
 			foreach ($post_cat_array as $post_cat_html) {
1113 1113
 
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
                 }
1123 1123
                 $post_sub_catid = '';
1124 1124
                 if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1125
-                    $post_sub_catid = (int)$post_cat_info[1];
1125
+                    $post_sub_catid = (int) $post_cat_info[1];
1126 1126
                 }
1127 1127
 
1128 1128
                 geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
@@ -1143,7 +1143,7 @@  discard block
 block discarded – undo
1143 1143
             }
1144 1144
 
1145 1145
             if (isset($post_cat_info[1]) && !empty($post_cat_info[1])) {
1146
-                $post_sub_catid = (int)$post_cat_info[1];
1146
+                $post_sub_catid = (int) $post_cat_info[1];
1147 1147
             }
1148 1148
 
1149 1149
             geodir_addpost_categories_html($request_taxonomy, $post_maincat_id, $post_sub_catid, $post_maincat_selected, $post_maincat_default);
@@ -1175,9 +1175,9 @@  discard block
 block discarded – undo
1175 1175
         if (!$selected)
1176 1176
             $option_slected = ' selected="selected" ';
1177 1177
 
1178
-        echo '<select field_type="select" id="' . sanitize_text_field($cat_taxonomy) . '" class="chosen_select" ' . $onchange . ' option-ajaxChosen="false" >';
1178
+        echo '<select field_type="select" id="'.sanitize_text_field($cat_taxonomy).'" class="chosen_select" '.$onchange.' option-ajaxChosen="false" >';
1179 1179
 
1180
-        echo '<option value="" ' . $option_selected . ' >' . __('Select Category', 'geodirectory') . '</option>';
1180
+        echo '<option value="" '.$option_selected.' >'.__('Select Category', 'geodirectory').'</option>';
1181 1181
 
1182 1182
         foreach ($cat_terms as $cat_term) {
1183 1183
             $option_selected = '';
@@ -1185,10 +1185,10 @@  discard block
 block discarded – undo
1185 1185
                 $option_selected = ' selected="selected" ';
1186 1186
 
1187 1187
             // Count child terms
1188
-            $child_terms = get_terms( $cat_taxonomy, array( 'parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1 ) );
1189
-            $has_child = !empty( $child_terms ) ? 't' : 'f';
1188
+            $child_terms = get_terms($cat_taxonomy, array('parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1));
1189
+            $has_child = !empty($child_terms) ? 't' : 'f';
1190 1190
 
1191
-            echo '<option  ' . $option_selected . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" _hc="' . $has_child . '" >' . ucfirst($cat_term->name) . '</option>';
1191
+            echo '<option  '.$option_selected.' alt="'.$cat_term->taxonomy.'" title="'.ucfirst($cat_term->name).'" value="'.$cat_term->term_id.'" _hc="'.$has_child.'" >'.ucfirst($cat_term->name).'</option>';
1192 1192
         }
1193 1193
         echo '</select>';
1194 1194
     }
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
             2 => __('Custom field updated.', 'geodirectory'),
1220 1220
             3 => __('Custom field deleted.', 'geodirectory'),
1221 1221
             4 => sprintf(__('%s updated.', 'geodirectory'), $post_object->labels->singular_name),
1222
-            5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'geodirectory'), $post_object->labels->singular_name, wp_post_revision_title((int)$_GET['revision'], false)) : false,
1222
+            5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'geodirectory'), $post_object->labels->singular_name, wp_post_revision_title((int) $_GET['revision'], false)) : false,
1223 1223
             6 => sprintf(__('%s published. <a href="%s">View %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(get_permalink($post_ID)), $post_object->labels->singular_name),
1224 1224
             7 => sprintf(__('%s saved.', 'geodirectory'), $post_object->labels->singular_name),
1225 1225
             8 => sprintf(__('%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'geodirectory'), $post_object->labels->singular_name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $post_object->labels->singular_name),
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 
1246 1246
     global $wpdb;
1247 1247
 
1248
-    $menu_icon = geodir_plugin_url() . '/geodirectory-assets/images/favicon.ico';
1248
+    $menu_icon = geodir_plugin_url().'/geodirectory-assets/images/favicon.ico';
1249 1249
 
1250 1250
     if (!$listing_slug = get_option('geodir_listing_prefix'))
1251 1251
         $listing_slug = 'places';
@@ -1258,11 +1258,11 @@  discard block
 block discarded – undo
1258 1258
 
1259 1259
         $gd_placetags = array();
1260 1260
         $gd_placetags['object_type'] = 'gd_place';
1261
-        $gd_placetags['listing_slug'] = $listing_slug . '/tags';
1261
+        $gd_placetags['listing_slug'] = $listing_slug.'/tags';
1262 1262
         $gd_placetags['args'] = array(
1263 1263
             'public' => true,
1264 1264
             'hierarchical' => false,
1265
-            'rewrite' => array('slug' => $listing_slug . '/tags', 'with_front' => false, 'hierarchical' => true),
1265
+            'rewrite' => array('slug' => $listing_slug.'/tags', 'with_front' => false, 'hierarchical' => true),
1266 1266
             'query_var' => true,
1267 1267
 
1268 1268
             'labels' => array(
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
             'menu_icon' => $menu_icon,
1357 1357
             'public' => true,
1358 1358
             'query_var' => true,
1359
-            'rewrite' => array('slug' => $listing_slug , 'with_front' => false, 'hierarchical' => true, 'feeds' => true),
1359
+            'rewrite' => array('slug' => $listing_slug, 'with_front' => false, 'hierarchical' => true, 'feeds' => true),
1360 1360
             'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments', /*'revisions', 'post-formats'*/),
1361 1361
             'taxonomies' => array('gd_placecategory', 'gd_place_tags'));
1362 1362
 
@@ -1378,27 +1378,27 @@  discard block
 block discarded – undo
1378 1378
 }
1379 1379
 
1380 1380
 $gd_wpml_get_languages = "";
1381
-function gd_wpml_get_lang_from_url($url){
1381
+function gd_wpml_get_lang_from_url($url) {
1382 1382
 
1383 1383
     global $gd_wpml_get_languages;
1384
-    if(isset($_REQUEST['lang']) && $_REQUEST['lang']){return $_REQUEST['lang'];}
1384
+    if (isset($_REQUEST['lang']) && $_REQUEST['lang']) {return $_REQUEST['lang']; }
1385 1385
 
1386 1386
 
1387 1387
     //
1388
-    $url = str_replace(array("http://","https://"),"",$url);
1388
+    $url = str_replace(array("http://", "https://"), "", $url);
1389 1389
 
1390 1390
     // site_url() seems to work better than get_bloginfo('url') here, WPML can change get_bloginfo('url') to add the lang.
1391
-    $site_url = str_replace(array("http://","https://"),"",site_url());
1391
+    $site_url = str_replace(array("http://", "https://"), "", site_url());
1392 1392
 
1393
-    $url = str_replace($site_url,"",$url);
1393
+    $url = str_replace($site_url, "", $url);
1394 1394
 
1395 1395
 
1396 1396
     $segments = explode('/', trim($url, '/'));
1397 1397
 
1398 1398
     //print_r( $segments);
1399
-    if($gd_wpml_get_languages){
1399
+    if ($gd_wpml_get_languages) {
1400 1400
         $langs = $gd_wpml_get_languages;
1401
-    }else{
1401
+    } else {
1402 1402
         global $sitepress;
1403 1403
         $gd_wpml_get_languages = $sitepress->get_active_languages();
1404 1404
     }
@@ -1463,17 +1463,17 @@  discard block
 block discarded – undo
1463 1463
         $slug = $post_types[$post->post_type]['rewrite']['slug'];
1464 1464
 
1465 1465
         // Alter the CPT slug if WPML is set to do so
1466
-        if(function_exists('icl_object_id')){
1467
-            if ( gd_wpml_slug_translation_turned_on( $post->post_type ) && $language_code = gd_wpml_get_lang_from_url($post_link)) {
1466
+        if (function_exists('icl_object_id')) {
1467
+            if (gd_wpml_slug_translation_turned_on($post->post_type) && $language_code = gd_wpml_get_lang_from_url($post_link)) {
1468 1468
 
1469 1469
                 $org_slug = $slug;
1470
-                $slug = apply_filters( 'wpml_translate_single_string',
1470
+                $slug = apply_filters('wpml_translate_single_string',
1471 1471
                     $slug,
1472 1472
                     'WordPress',
1473
-                    'URL slug: ' . $slug,
1473
+                    'URL slug: '.$slug,
1474 1474
                     $language_code);
1475 1475
 
1476
-                if(!$slug){$slug = $org_slug;}
1476
+                if (!$slug) {$slug = $org_slug; }
1477 1477
 
1478 1478
             }
1479 1479
         }
@@ -1495,11 +1495,11 @@  discard block
 block discarded – undo
1495 1495
         }
1496 1496
 
1497 1497
         $post_link = trailingslashit(
1498
-            preg_replace(  "/" . preg_quote( $slug, "/" ) . "/", $slug ."/%gd_taxonomy%",$post_link, 1 )
1498
+            preg_replace("/".preg_quote($slug, "/")."/", $slug."/%gd_taxonomy%", $post_link, 1)
1499 1499
         );
1500 1500
 
1501 1501
         if ($fix_url) {
1502
-            $post_link = $site_url . $post_link;
1502
+            $post_link = $site_url.$post_link;
1503 1503
         }
1504 1504
 
1505 1505
         if (isset($comment_post_cache[$post->ID])) {
@@ -1518,12 +1518,12 @@  discard block
 block discarded – undo
1518 1518
             $ID = $post->ID;
1519 1519
             $post2 = $wpdb->get_row(
1520 1520
                 $wpdb->prepare(
1521
-                    "SELECT * from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1521
+                    "SELECT * from ".$plugin_prefix.$post->post_type."_detail WHERE post_id = %d ",
1522 1522
                     array($post->ID)
1523 1523
                 )
1524 1524
             );
1525 1525
 
1526
-            $post = (object)array_merge((array)$post, (array)$post2);
1526
+            $post = (object) array_merge((array) $post, (array) $post2);
1527 1527
 
1528 1528
             $comment_post_cache[$post->ID] = $post;
1529 1529
         }
@@ -1532,7 +1532,7 @@  discard block
 block discarded – undo
1532 1532
 
1533 1533
         if (false !== strpos($post_link, '%gd_taxonomy%')) {
1534 1534
 
1535
-            if ( apply_filters("geodir_add_location_url_to_url",get_option('geodir_add_location_url'),$post->post_type,$post)) {
1535
+            if (apply_filters("geodir_add_location_url_to_url", get_option('geodir_add_location_url'), $post->post_type, $post)) {
1536 1536
                 $location_request = '';
1537 1537
 
1538 1538
 
@@ -1546,7 +1546,7 @@  discard block
 block discarded – undo
1546 1546
                         $post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1547 1547
                         $post->country_slug = str_replace(']', '', $post->country_slug);
1548 1548
 
1549
-                        $post_location = (object)array('country_slug' => $post->country_slug,
1549
+                        $post_location = (object) array('country_slug' => $post->country_slug,
1550 1550
                             'region_slug' => $post->region_slug,
1551 1551
                             'city_slug' => $post->city_slug
1552 1552
                         );
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
 
1560 1560
                     $post_location_sql = $wpdb->get_results(
1561 1561
                         $wpdb->prepare(
1562
-                            "SELECT post_locations from " . $plugin_prefix . $post->post_type . "_detail WHERE post_id = %d ",
1562
+                            "SELECT post_locations from ".$plugin_prefix.$post->post_type."_detail WHERE post_id = %d ",
1563 1563
                             array($post->ID)
1564 1564
                         )
1565 1565
                     );
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
                             $post->country_slug = str_replace('[', '', $geodir_arr_locations[2]);
1576 1576
                             $post->country_slug = str_replace(']', '', $post->country_slug);
1577 1577
 
1578
-                            $post_location = (object)array('country_slug' => $post->country_slug,
1578
+                            $post_location = (object) array('country_slug' => $post->country_slug,
1579 1579
                                 'region_slug' => $post->region_slug,
1580 1580
                                 'city_slug' => $post->city_slug
1581 1581
                             );
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
 					}
1605 1605
 					$location_slug[] = $city_slug;
1606 1606
 					
1607
-					$location_request .= implode('/', $location_slug) . '/';
1607
+					$location_request .= implode('/', $location_slug).'/';
1608 1608
                 }
1609 1609
             }
1610 1610
 
@@ -1662,9 +1662,9 @@  discard block
 block discarded – undo
1662 1662
             }
1663 1663
             $request_term = trim($request_term, '/');
1664 1664
             if (!empty($request_term))
1665
-                $post_link = str_replace('%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1665
+                $post_link = str_replace('%gd_taxonomy%', $request_term.$detailurl_separator, $post_link);
1666 1666
             else
1667
-                $post_link = str_replace('/%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1667
+                $post_link = str_replace('/%gd_taxonomy%', $request_term.$detailurl_separator, $post_link);
1668 1668
             //echo $post_link ;
1669 1669
         }
1670 1670
         // temp cache the permalink
@@ -1739,9 +1739,9 @@  discard block
 block discarded – undo
1739 1739
                 $url_separator = '';
1740 1740
 
1741 1741
                 if (get_option('permalink_structure') != '') {
1742
-                    $old_listing_slug = '/' . $listing_slug . '/';
1742
+                    $old_listing_slug = '/'.$listing_slug.'/';
1743 1743
                     $request_term = implode("/", $location_terms);
1744
-                    $new_listing_slug = '/' . $listing_slug . '/' . $request_term . '/';
1744
+                    $new_listing_slug = '/'.$listing_slug.'/'.$request_term.'/';
1745 1745
 
1746 1746
                     $termlink = substr_replace($termlink, $new_listing_slug, strpos($termlink, $old_listing_slug), strlen($old_listing_slug));
1747 1747
                 } else {
@@ -1761,25 +1761,25 @@  discard block
 block discarded – undo
1761 1761
         // Alter the CPT slug if WPML is set to do so
1762 1762
         if (function_exists('icl_object_id')) {
1763 1763
             $post_types = get_option('geodir_post_types');
1764
-            $post_type = str_replace("category","",$taxonomy);
1765
-            $post_type = str_replace("_tags","",$post_type);
1764
+            $post_type = str_replace("category", "", $taxonomy);
1765
+            $post_type = str_replace("_tags", "", $post_type);
1766 1766
             $slug = $post_types[$post_type]['rewrite']['slug'];
1767 1767
             if (gd_wpml_slug_translation_turned_on($post_type)) {
1768 1768
                 global $sitepress;
1769 1769
                 $default_lang = $sitepress->get_default_language();
1770 1770
                 $language_code = gd_wpml_get_lang_from_url($termlink);
1771
-                if (!$language_code ) {
1772
-                    $language_code  = $default_lang;
1771
+                if (!$language_code) {
1772
+                    $language_code = $default_lang;
1773 1773
                 }
1774 1774
 
1775 1775
                 $org_slug = $slug;
1776
-                $slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: ' . $slug, $language_code);
1776
+                $slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: '.$slug, $language_code);
1777 1777
 
1778 1778
                 if (!$slug) {
1779 1779
                     $slug = $org_slug;
1780 1780
                 }
1781 1781
 
1782
-                $termlink = trailingslashit(preg_replace("/" . preg_quote($org_slug, "/") . "/", $slug  ,$termlink, 1));
1782
+                $termlink = trailingslashit(preg_replace("/".preg_quote($org_slug, "/")."/", $slug, $termlink, 1));
1783 1783
             }
1784 1784
         }
1785 1785
     }
@@ -1809,7 +1809,7 @@  discard block
 block discarded – undo
1809 1809
 	
1810 1810
 	if (in_array($post_type, geodir_get_posttypes())) {
1811 1811
 		if (get_option('geodir_add_location_url') && $gd_session->get('gd_multi_location') == 1) {
1812
-			if(geodir_is_page('detail') && !empty($post) && isset($post->country_slug)) {
1812
+			if (geodir_is_page('detail') && !empty($post) && isset($post->country_slug)) {
1813 1813
                 $location_terms = array(
1814 1814
                     'gd_country' => $post->country_slug,
1815 1815
                     'gd_region' => $post->region_slug,
@@ -1826,7 +1826,7 @@  discard block
 block discarded – undo
1826 1826
 					$location_terms = implode("/", $location_terms);
1827 1827
 					$location_terms = rtrim($location_terms, '/');
1828 1828
 					
1829
-					$link .= urldecode($location_terms) . '/';
1829
+					$link .= urldecode($location_terms).'/';
1830 1830
 				} else {
1831 1831
 					$link = geodir_getlink($link, $location_terms);
1832 1832
 				}
@@ -1908,9 +1908,9 @@  discard block
 block discarded – undo
1908 1908
             return 0;
1909 1909
         $where = 't.term_id = %d';
1910 1910
         if (!empty($taxonomy))
1911
-            return $wpdb->get_row($wpdb->prepare($tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1911
+            return $wpdb->get_row($wpdb->prepare($tax_select.$where." AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1912 1912
         else
1913
-            return $wpdb->get_var($wpdb->prepare($select . $where, $term));
1913
+            return $wpdb->get_var($wpdb->prepare($select.$where, $term));
1914 1914
     }
1915 1915
 
1916 1916
     $term = trim(wp_unslash($term));
@@ -1922,7 +1922,7 @@  discard block
 block discarded – undo
1922 1922
 
1923 1923
     $where_fields = array($slug);
1924 1924
     if (!empty($taxonomy)) {
1925
-        $parent = (int)$parent;
1925
+        $parent = (int) $parent;
1926 1926
         if ($parent > 0) {
1927 1927
             $where_fields[] = $parent;
1928 1928
             $else_where_fields[] = $parent;
@@ -1985,13 +1985,13 @@  discard block
 block discarded – undo
1985 1985
         $post_types = geodir_get_posttypes();
1986 1986
         $tax_arr = array();
1987 1987
         foreach ($post_types as $post_type) {
1988
-            $tax_arr[] = "'" . $post_type . "category'";
1988
+            $tax_arr[] = "'".$post_type."category'";
1989 1989
         }
1990 1990
         $tax_c = implode(',', $tax_arr);
1991 1991
         $terms = $wpdb->get_results("SELECT * FROM $wpdb->term_taxonomy WHERE taxonomy IN ($tax_c)");
1992 1992
         //$terms = get_terms( $taxonomy );
1993 1993
 
1994
-        if($terms) {
1994
+        if ($terms) {
1995 1995
             foreach ($terms as $term) {
1996 1996
                 $post_type = str_replace("category", "", $term->taxonomy);
1997 1997
                 $a_terms[$post_type][] = $term;
@@ -1999,7 +1999,7 @@  discard block
 block discarded – undo
1999 1999
             }
2000 2000
         }
2001 2001
 
2002
-        if($a_terms) {
2002
+        if ($a_terms) {
2003 2003
             foreach ($a_terms as $pt => $t2) {
2004 2004
 
2005 2005
                 foreach ($t2 as $term) {
@@ -2024,7 +2024,7 @@  discard block
 block discarded – undo
2024 2024
     }
2025 2025
 
2026 2026
     if (is_ssl()) {
2027
-        $terms_icons = str_replace("http:","https:",$terms_icons );
2027
+        $terms_icons = str_replace("http:", "https:", $terms_icons);
2028 2028
     }
2029 2029
 
2030 2030
     return apply_filters('geodir_get_term_icons', $terms_icons, $term_id);
Please login to merge, or discard this patch.
Braces   +167 added lines, -119 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@  discard block
 block discarded – undo
39 39
     if (get_option('geodir_show_listing_nav')) {
40 40
 
41 41
         $menu_class = '';
42
-        if (geodir_is_page('listing'))
43
-            $menu_class = 'current-menu-item';
42
+        if (geodir_is_page('listing')) {
43
+                    $menu_class = 'current-menu-item';
44
+        }
44 45
 
45 46
 
46 47
         //SHOW LISTING OF POST TYPE IN MAIN NAVIGATION
@@ -52,8 +53,9 @@  discard block
 block discarded – undo
52 53
                     if (in_array($post_type, $show_post_type_main_nav)) {
53 54
                         if (get_post_type_archive_link($post_type)) {
54 55
                             $menu_class = '';
55
-                            if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
56
-                                $menu_class = 'current-menu-item';
56
+                            if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing')) {
57
+                                                            $menu_class = 'current-menu-item';
58
+                            }
57 59
                             /**
58 60
                              * Filter the menu li class.
59 61
                              *
@@ -130,8 +132,9 @@  discard block
 block discarded – undo
130 132
                             if (get_post_type_archive_link($post_type)) {
131 133
 
132 134
                                 $menu_class = '';
133
-                                if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing'))
134
-                                    $menu_class = 'current-menu-item';
135
+                                if (geodir_get_current_posttype() == $post_type && geodir_is_page('listing')) {
136
+                                                                    $menu_class = 'current-menu-item';
137
+                                }
135 138
 
136 139
                                 $items .= '<li class="' . $sub_li_class . '">
137 140
 														<a href="' . get_post_type_archive_link($post_type) . '" class="' . $sub_a_class . '">
@@ -159,8 +162,9 @@  discard block
 block discarded – undo
159 162
     if (get_option('geodir_show_addlisting_nav')) {
160 163
 
161 164
         $menu_class = '';
162
-        if (geodir_is_page('add-listing'))
163
-            $menu_class = 'current-menu-item';
165
+        if (geodir_is_page('add-listing')) {
166
+                    $menu_class = 'current-menu-item';
167
+        }
164 168
 
165 169
         //SHOW ADD LISTING POST TYPE IN MAIN NAVIGATION
166 170
         $post_types = geodir_get_posttypes('object');
@@ -176,8 +180,9 @@  discard block
 block discarded – undo
176 180
                                 if (geodir_get_addlisting_link($post_type)) {
177 181
 
178 182
                                     $menu_class = '';
179
-                                    if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing'))
180
-                                        $menu_class = 'current-menu-item';
183
+                                    if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing')) {
184
+                                                                            $menu_class = 'current-menu-item';
185
+                                    }
181 186
                                     /**
182 187
                                      * Filter the menu li class.
183 188
                                      *
@@ -261,8 +266,9 @@  discard block
 block discarded – undo
261 266
                                     if (geodir_get_addlisting_link($post_type)) {
262 267
 
263 268
                                         $menu_class = '';
264
-                                        if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing'))
265
-                                            $menu_class = 'current-menu-item';
269
+                                        if (geodir_get_current_posttype() == $post_type && geodir_is_page('add-listing')) {
270
+                                                                                    $menu_class = 'current-menu-item';
271
+                                        }
266 272
                                         /**
267 273
                                          * Filter the menu li class.
268 274
                                          *
@@ -319,8 +325,9 @@  discard block
 block discarded – undo
319 325
     }
320 326
     //else if(empty($geodir_theme_location)) // It means 'Show geodirectory navigation in selected menu locations' is not set yet.
321 327
 //		$menu = str_replace("</ul></div>",geodir_add_nav_menu_items()."</ul></div>",$menu);
322
-    else if (is_array($geodir_theme_location) && isset($args['theme_location']) && in_array($args['theme_location'], $geodir_theme_location))
323
-        $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
328
+    else if (is_array($geodir_theme_location) && isset($args['theme_location']) && in_array($args['theme_location'], $geodir_theme_location)) {
329
+            $menu = str_replace("</ul></div>", geodir_add_nav_menu_items() . "</ul></div>", $menu);
330
+    }
324 331
 
325 332
     return $menu;
326 333
 
@@ -406,24 +413,28 @@  discard block
 block discarded – undo
406 413
     $geodir_post_type = get_query_var('post_type');
407 414
 
408 415
     if (geodir_is_page('add-listing') || geodir_is_page('preview')) {
409
-        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '')
410
-            $geodir_post_type = get_post_type((int)$_REQUEST['pid']);
411
-        elseif (isset($_REQUEST['listing_type']))
412
-            $geodir_post_type = sanitize_text_field($_REQUEST['listing_type']);
416
+        if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
417
+                    $geodir_post_type = get_post_type((int)$_REQUEST['pid']);
418
+        } elseif (isset($_REQUEST['listing_type'])) {
419
+                    $geodir_post_type = sanitize_text_field($_REQUEST['listing_type']);
420
+        }
413 421
     }
414 422
 
415
-    if ((geodir_is_page('search') || geodir_is_page('author')) && isset($_REQUEST['stype']))
416
-        $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
423
+    if ((geodir_is_page('search') || geodir_is_page('author')) && isset($_REQUEST['stype'])) {
424
+            $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
425
+    }
417 426
 
418
-    if (is_tax())
419
-        $geodir_post_type = geodir_get_taxonomy_posttype();
427
+    if (is_tax()) {
428
+            $geodir_post_type = geodir_get_taxonomy_posttype();
429
+    }
420 430
 
421 431
 
422 432
     $all_postypes = geodir_get_posttypes();
423 433
     $all_postypes = stripslashes_deep($all_postypes);
424 434
 
425
-    if (is_array($all_postypes) && !in_array($geodir_post_type, $all_postypes))
426
-        $geodir_post_type = '';
435
+    if (is_array($all_postypes) && !in_array($geodir_post_type, $all_postypes)) {
436
+            $geodir_post_type = '';
437
+    }
427 438
 
428 439
     if( defined( 'DOING_AJAX' ) && isset($_REQUEST['stype'])){
429 440
         $geodir_post_type = sanitize_text_field($_REQUEST['stype']);
@@ -507,11 +518,12 @@  discard block
 block discarded – undo
507 518
         endswitch;
508 519
     }
509 520
 
510
-    if (!empty($post_types))
511
-        return $post_types;
512
-    else
513
-        return array();
514
-}
521
+    if (!empty($post_types)) {
522
+            return $post_types;
523
+    } else {
524
+            return array();
525
+    }
526
+    }
515 527
 
516 528
 /**
517 529
  * Get Custom Post Type info.
@@ -528,9 +540,10 @@  discard block
 block discarded – undo
528 540
     $post_types = stripslashes_deep($post_types);
529 541
     if (!empty($post_types) && $post_type != '') {
530 542
         return $post_types[$post_type];
531
-    } else
532
-        return false;
533
-}
543
+    } else {
544
+            return false;
545
+    }
546
+    }
534 547
 
535 548
 if (!function_exists('geodir_get_taxonomies')) {
536 549
     /**
@@ -554,18 +567,21 @@  discard block
 block discarded – undo
554 567
             $gd_taxonomies = array_keys($taxonomies);
555 568
 
556 569
 
557
-            if ($post_type != '')
558
-                $gd_taxonomies = array();
570
+            if ($post_type != '') {
571
+                            $gd_taxonomies = array();
572
+            }
559 573
 
560 574
             $i = 0;
561 575
             foreach ($taxonomies as $taxonomy => $args) {
562 576
 
563
-                if ($post_type != '' && $args['object_type'] == $post_type)
564
-                    $gd_taxonomies[] = $taxonomy;
577
+                if ($post_type != '' && $args['object_type'] == $post_type) {
578
+                                    $gd_taxonomies[] = $taxonomy;
579
+                }
565 580
 
566 581
                 if ($tages_taxonomies === false && strpos($taxonomy, '_tag') !== false) {
567
-                    if (array_search($taxonomy, $gd_taxonomies) !== false)
568
-                        unset($gd_taxonomies[array_search($taxonomy, $gd_taxonomies)]);
582
+                    if (array_search($taxonomy, $gd_taxonomies) !== false) {
583
+                                            unset($gd_taxonomies[array_search($taxonomy, $gd_taxonomies)]);
584
+                    }
569 585
                 }
570 586
 
571 587
             }
@@ -620,10 +636,11 @@  discard block
 block discarded – undo
620 636
                 . ucfirst($category_obj->name) . '</option>';
621 637
         }
622 638
 
623
-        if ($echo)
624
-            echo $html;
625
-        else
626
-            return $html;
639
+        if ($echo) {
640
+                    echo $html;
641
+        } else {
642
+                    return $html;
643
+        }
627 644
     }
628 645
 }
629 646
 
@@ -657,11 +674,12 @@  discard block
 block discarded – undo
657 674
 
658 675
     }
659 676
 
660
-    if (!empty($listing_slug))
661
-        return $listing_slug;
662
-    else
663
-        return false;
664
-}
677
+    if (!empty($listing_slug)) {
678
+            return $listing_slug;
679
+    } else {
680
+            return false;
681
+    }
682
+    }
665 683
 
666 684
 
667 685
 /**
@@ -692,16 +710,18 @@  discard block
 block discarded – undo
692 710
     if (!empty($taxonomies)) {
693 711
         foreach (geodir_get_posttypes() as $pt) {
694 712
             $object_taxonomies = $pt === 'attachment' ? get_taxonomies_for_attachments() : get_object_taxonomies($pt);
695
-            if (array_intersect($taxonomies, $object_taxonomies))
696
-                $post_type[] = $pt;
713
+            if (array_intersect($taxonomies, $object_taxonomies)) {
714
+                            $post_type[] = $pt;
715
+            }
697 716
         }
698 717
     }
699 718
 
700
-    if (!empty($post_type))
701
-        return $post_type[0];
702
-    else
703
-        return false;
704
-}
719
+    if (!empty($post_type)) {
720
+            return $post_type[0];
721
+    } else {
722
+            return false;
723
+    }
724
+    }
705 725
 
706 726
 if (!function_exists('geodir_custom_taxonomy_walker')) {
707 727
     /**
@@ -757,18 +777,18 @@  discard block
 block discarded – undo
757 777
                 $checked = '';
758 778
 
759 779
                 if (in_array($cat_term->term_id, $search_terms)) {
760
-                    if ($cat_display == 'select' || $cat_display == 'multiselect')
761
-                        $checked = 'selected="selected"';
762
-                    else
763
-                        $checked = 'checked="checked"';
780
+                    if ($cat_display == 'select' || $cat_display == 'multiselect') {
781
+                                            $checked = 'selected="selected"';
782
+                    } else {
783
+                                            $checked = 'checked="checked"';
784
+                    }
764 785
                 }
765 786
 
766
-                if ($cat_display == 'radio')
767
-                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
768
-                elseif ($cat_display == 'select' || $cat_display == 'multiselect')
769
-                    $out .= '<option ' . $main_list_class . ' style="margin-left:' . $p . 'px;" alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' >' . $term_check . ucfirst($cat_term->name) . '</option>';
770
-
771
-                else {
787
+                if ($cat_display == 'radio') {
788
+                                    $out .= '<span style="display:block" ><input type="radio" field_type="radio" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
789
+                } elseif ($cat_display == 'select' || $cat_display == 'multiselect') {
790
+                                    $out .= '<option ' . $main_list_class . ' style="margin-left:' . $p . 'px;" alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' >' . $term_check . ucfirst($cat_term->name) . '</option>';
791
+                } else {
772 792
                     $out .= '<span style="display:block"><input style="display:inline-block" type="checkbox" field_type="checkbox" name="post_category[' . $cat_term->taxonomy . '][]" ' . $main_list_class . ' alt="' . $cat_term->taxonomy . '" title="' . ucfirst($cat_term->name) . '" value="' . $cat_term->term_id . '" ' . $checked . $onchange . ' id="gd-cat-' . $cat_term->term_id . '" >' . $term_check . ucfirst($cat_term->name) . '</span>';
773 793
                 }
774 794
 
@@ -777,8 +797,9 @@  discard block
 block discarded – undo
777 797
 
778 798
             }
779 799
 
780
-            if ($cat_display == 'checkbox' || $cat_display == 'radio')
781
-                $out .= '</div>';
800
+            if ($cat_display == 'checkbox' || $cat_display == 'radio') {
801
+                            $out .= '</div>';
802
+            }
782 803
 
783 804
             return $out;
784 805
         }
@@ -804,18 +825,21 @@  discard block
 block discarded – undo
804 825
         global $exclude_cats, $gd_session;
805 826
 
806 827
         $cat_exclude = '';
807
-        if (is_array($exclude_cats) && !empty($exclude_cats))
808
-            $cat_exclude = serialize($exclude_cats);
828
+        if (is_array($exclude_cats) && !empty($exclude_cats)) {
829
+                    $cat_exclude = serialize($exclude_cats);
830
+        }
809 831
 
810 832
         if (isset($_REQUEST['backandedit'])) {
811 833
             $post = (object)$gd_session->get('listing');
812 834
 
813
-            if (!is_array($post->post_category[$cat_taxonomy]))
814
-                $post_category = $post->post_category[$cat_taxonomy];
835
+            if (!is_array($post->post_category[$cat_taxonomy])) {
836
+                            $post_category = $post->post_category[$cat_taxonomy];
837
+            }
815 838
 
816 839
             $post_categories = $post->post_category_str;
817
-            if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories))
818
-                $post_category_str = $post_categories[$cat_taxonomy];
840
+            if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
841
+                            $post_category_str = $post_categories[$cat_taxonomy];
842
+            }
819 843
 
820 844
         } elseif ((geodir_is_page('add-listing') && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') || (is_admin())) {
821 845
             global $post;
@@ -1006,8 +1030,9 @@  discard block
 block discarded – undo
1006 1030
         if (!empty($post_categories) && array_key_exists($cat_taxonomy, $post_categories)) {
1007 1031
             $post_cat_str = $post_categories[$cat_taxonomy];
1008 1032
             $post_cat_array = explode("#", $post_cat_str);
1009
-            if (count($post_cat_array) >= $cat_limit && $cat_limit != 0)
1010
-                $style = "display:none;";
1033
+            if (count($post_cat_array) >= $cat_limit && $cat_limit != 0) {
1034
+                            $style = "display:none;";
1035
+            }
1011 1036
         }
1012 1037
         ?>
1013 1038
         <div class="main_cat_list" style=" <?php if (isset($style)) {
@@ -1042,7 +1067,7 @@  discard block
 block discarded – undo
1042 1067
 
1043 1068
         if(is_array( $exclude_cats)){
1044 1069
             $exclude_cats = array_map( 'intval', $exclude_cats );
1045
-        }else{
1070
+        } else{
1046 1071
             $exclude_cats = intval($exclude_cats);
1047 1072
         }
1048 1073
 
@@ -1072,7 +1097,10 @@  discard block
 block discarded – undo
1072 1097
 
1073 1098
             <div class="post_default_category">
1074 1099
                 <input type="radio" name="post_default_category" value="<?php echo $main_cat->term_id;?>"
1075
-                       onchange="update_listing_cat()" <?php if ($default) echo ' checked="checked" ';?>   />
1100
+                       onchange="update_listing_cat()" <?php if ($default) {
1101
+	echo ' checked="checked" ';
1102
+}
1103
+?>   />
1076 1104
         <span> 
1077 1105
         <?php printf(__('Set %s as default category', 'geodirectory'), geodir_ucwords($main_cat->name));?>
1078 1106
         </span>
@@ -1172,8 +1200,9 @@  discard block
 block discarded – undo
1172 1200
         $onchange = ' onchange="show_subcatlist(this.value, this)" ';
1173 1201
 
1174 1202
         $option_selected = '';
1175
-        if (!$selected)
1176
-            $option_slected = ' selected="selected" ';
1203
+        if (!$selected) {
1204
+                    $option_slected = ' selected="selected" ';
1205
+        }
1177 1206
 
1178 1207
         echo '<select field_type="select" id="' . sanitize_text_field($cat_taxonomy) . '" class="chosen_select" ' . $onchange . ' option-ajaxChosen="false" >';
1179 1208
 
@@ -1181,8 +1210,9 @@  discard block
 block discarded – undo
1181 1210
 
1182 1211
         foreach ($cat_terms as $cat_term) {
1183 1212
             $option_selected = '';
1184
-            if ($selected == $cat_term->term_id)
1185
-                $option_selected = ' selected="selected" ';
1213
+            if ($selected == $cat_term->term_id) {
1214
+                            $option_selected = ' selected="selected" ';
1215
+            }
1186 1216
 
1187 1217
             // Count child terms
1188 1218
             $child_terms = get_terms( $cat_taxonomy, array( 'parent' => $cat_term->term_id, 'hide_empty' => false, 'exclude' => $exclude_cats, 'number' => 1 ) );
@@ -1247,8 +1277,9 @@  discard block
 block discarded – undo
1247 1277
 
1248 1278
     $menu_icon = geodir_plugin_url() . '/geodirectory-assets/images/favicon.ico';
1249 1279
 
1250
-    if (!$listing_slug = get_option('geodir_listing_prefix'))
1251
-        $listing_slug = 'places';
1280
+    if (!$listing_slug = get_option('geodir_listing_prefix')) {
1281
+            $listing_slug = 'places';
1282
+    }
1252 1283
 
1253 1284
     /**
1254 1285
      * Taxonomies
@@ -1398,7 +1429,7 @@  discard block
 block discarded – undo
1398 1429
     //print_r( $segments);
1399 1430
     if($gd_wpml_get_languages){
1400 1431
         $langs = $gd_wpml_get_languages;
1401
-    }else{
1432
+    } else{
1402 1433
         global $sitepress;
1403 1434
         $gd_wpml_get_languages = $sitepress->get_active_languages();
1404 1435
     }
@@ -1551,8 +1582,9 @@  discard block
 block discarded – undo
1551 1582
                             'city_slug' => $post->city_slug
1552 1583
                         );
1553 1584
 
1554
-                    } else
1555
-                        $post_location = geodir_get_location();
1585
+                    } else {
1586
+                                            $post_location = geodir_get_location();
1587
+                    }
1556 1588
 
1557 1589
 
1558 1590
                 } else {
@@ -1581,8 +1613,9 @@  discard block
 block discarded – undo
1581 1613
                             );
1582 1614
 
1583 1615
                         }
1584
-                    } else
1585
-                        $post_location = geodir_get_location();
1616
+                    } else {
1617
+                                            $post_location = geodir_get_location();
1618
+                    }
1586 1619
                 }
1587 1620
 
1588 1621
 
@@ -1625,8 +1658,9 @@  discard block
 block discarded – undo
1625 1658
                         $post_terms = $post_terms[0];
1626 1659
                     }
1627 1660
 
1628
-                    if (!$post_terms)
1629
-                        $post_terms = geodir_get_post_meta($post->ID, 'default_category', true);
1661
+                    if (!$post_terms) {
1662
+                                            $post_terms = geodir_get_post_meta($post->ID, 'default_category', true);
1663
+                    }
1630 1664
 
1631 1665
                     if (!$post_terms) {
1632 1666
                         $post_terms = geodir_get_post_meta($post->ID, $taxonomies, true);
@@ -1640,8 +1674,9 @@  discard block
 block discarded – undo
1640 1674
 
1641 1675
                 $term = get_term_by('id', $post_terms, $taxonomies);
1642 1676
 
1643
-                if (!empty($term))
1644
-                    $term_request = $term->slug;
1677
+                if (!empty($term)) {
1678
+                                    $term_request = $term->slug;
1679
+                }
1645 1680
                 //$term_request = $term->slug.'/';
1646 1681
             }
1647 1682
 
@@ -1656,15 +1691,20 @@  discard block
 block discarded – undo
1656 1691
                 $request_term .= $term_request;
1657 1692
 
1658 1693
             } else {
1659
-                if (isset($location_request) && $location_request != '') $request_term = $location_request;
1694
+                if (isset($location_request) && $location_request != '') {
1695
+                	$request_term = $location_request;
1696
+                }
1660 1697
 
1661
-                if (isset($term_request) && $term_request != '') $request_term .= $term_request;
1698
+                if (isset($term_request) && $term_request != '') {
1699
+                	$request_term .= $term_request;
1700
+                }
1662 1701
             }
1663 1702
             $request_term = trim($request_term, '/');
1664
-            if (!empty($request_term))
1665
-                $post_link = str_replace('%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1666
-            else
1667
-                $post_link = str_replace('/%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1703
+            if (!empty($request_term)) {
1704
+                            $post_link = str_replace('%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1705
+            } else {
1706
+                            $post_link = str_replace('/%gd_taxonomy%', $request_term . $detailurl_separator, $post_link);
1707
+            }
1668 1708
             //echo $post_link ;
1669 1709
         }
1670 1710
         // temp cache the permalink
@@ -1852,10 +1892,11 @@  discard block
 block discarded – undo
1852 1892
     if (!is_object($obj_post_type)) {
1853 1893
         return;
1854 1894
     }
1855
-    if ($echo)
1856
-        echo $obj_post_type->labels->singular_name;
1857
-    else
1858
-        return $obj_post_type->labels->singular_name;
1895
+    if ($echo) {
1896
+            echo $obj_post_type->labels->singular_name;
1897
+    } else {
1898
+            return $obj_post_type->labels->singular_name;
1899
+    }
1859 1900
 
1860 1901
 }
1861 1902
 
@@ -1872,14 +1913,16 @@  discard block
 block discarded – undo
1872 1913
 {
1873 1914
     $all_postypes = geodir_get_posttypes();
1874 1915
 
1875
-    if (!in_array($post_type, $all_postypes))
1876
-        return false;
1916
+    if (!in_array($post_type, $all_postypes)) {
1917
+            return false;
1918
+    }
1877 1919
 
1878 1920
     $obj_post_type = get_post_type_object($post_type);
1879
-    if ($echo)
1880
-        echo $obj_post_type->labels->name;
1881
-    else
1882
-        return $obj_post_type->labels->name;
1921
+    if ($echo) {
1922
+            echo $obj_post_type->labels->name;
1923
+    } else {
1924
+            return $obj_post_type->labels->name;
1925
+    }
1883 1926
 
1884 1927
 }
1885 1928
 
@@ -1904,19 +1947,22 @@  discard block
 block discarded – undo
1904 1947
     $tax_select = "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE ";
1905 1948
 
1906 1949
     if (is_int($term)) {
1907
-        if (0 == $term)
1908
-            return 0;
1950
+        if (0 == $term) {
1951
+                    return 0;
1952
+        }
1909 1953
         $where = 't.term_id = %d';
1910
-        if (!empty($taxonomy))
1911
-            return $wpdb->get_row($wpdb->prepare($tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1912
-        else
1913
-            return $wpdb->get_var($wpdb->prepare($select . $where, $term));
1954
+        if (!empty($taxonomy)) {
1955
+                    return $wpdb->get_row($wpdb->prepare($tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
1956
+        } else {
1957
+                    return $wpdb->get_var($wpdb->prepare($select . $where, $term));
1958
+        }
1914 1959
     }
1915 1960
 
1916 1961
     $term = trim(wp_unslash($term));
1917 1962
 
1918
-    if ('' === $slug = sanitize_title($term))
1919
-        return 0;
1963
+    if ('' === $slug = sanitize_title($term)) {
1964
+            return 0;
1965
+    }
1920 1966
 
1921 1967
     $where = 't.slug = %s';
1922 1968
 
@@ -1933,14 +1979,16 @@  discard block
 block discarded – undo
1933 1979
         $where_fields[] = $taxonomy;
1934 1980
 
1935 1981
 
1936
-        if ($result = $wpdb->get_row($wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $where_fields), ARRAY_A))
1937
-            return $result;
1982
+        if ($result = $wpdb->get_row($wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $where_fields), ARRAY_A)) {
1983
+                    return $result;
1984
+        }
1938 1985
 
1939 1986
         return false;
1940 1987
     }
1941 1988
 
1942
-    if ($result = $wpdb->get_var($wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where", $where_fields)))
1943
-        return $result;
1989
+    if ($result = $wpdb->get_var($wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where", $where_fields))) {
1990
+            return $result;
1991
+    }
1944 1992
 
1945 1993
     return false;
1946 1994
 }
Please login to merge, or discard this patch.
geodirectory-admin/dummy-data/property_rent.php 3 patches
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,10 +17,11 @@  discard block
 block discarded – undo
17 17
     update_option($post_type.'_dummy_data_type','standard_places');
18 18
 }
19 19
 
20
-if (geodir_dummy_folder_exists())
20
+if (geodir_dummy_folder_exists()) {
21 21
     $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
22
-else
22
+} else {
23 23
     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
24
+}
24 25
 
25 26
 $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
26 27
 
@@ -1815,16 +1816,18 @@  discard block
 block discarded – undo
1815 1816
 echo '###4.1';
1816 1817
 foreach ($post_info as $post_info) {echo '###5';
1817 1818
     $default_location = geodir_get_default_location();
1818
-    if ($city_bound_lat1 > $city_bound_lat2)
1819
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1820
-    else
1821
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1819
+    if ($city_bound_lat1 > $city_bound_lat2) {
1820
+            $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1821
+    } else {
1822
+            $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1823
+    }
1822 1824
 
1823 1825
 
1824
-    if ($city_bound_lng1 > $city_bound_lng2)
1825
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1826
-    else
1827
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1826
+    if ($city_bound_lng1 > $city_bound_lng2) {
1827
+            $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1828
+    } else {
1829
+            $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1830
+    }
1828 1831
 
1829 1832
     $load_map = get_option('geodir_load_map');
1830 1833
     
Please login to merge, or discard this patch.
Indentation   +791 added lines, -791 removed lines patch added patch discarded remove patch
@@ -7,371 +7,371 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 function geodir_property_rent_custom_fields($post_type='gd_place',$package_id=''){
10
-    $fields = array();
11
-    $package = ($package_id=='') ? '' : array($package_id);
12
-
13
-    // price
14
-    $fields[] = array('listing_type' => $post_type,
15
-                      'field_type'          =>  'text',
16
-                      'data_type'           =>  'FLOAT',
17
-                      'decimal_point'       =>  '2',
18
-                      'admin_title'         =>  __('Price', 'geodirectory'),
19
-                      'site_title'          =>  __('Price', 'geodirectory'),
20
-                      'admin_desc'          =>  __('Enter the price per calendar month (PCM)in $ (no currency symbol)', 'geodirectory'),
21
-                      'htmlvar_name'        =>  'price',
22
-                      'is_active'           =>  true,
23
-                      'for_admin_use'       =>  false,
24
-                      'default_value'       =>  '',
25
-                      'show_in' 	        =>  '[detail],[listing]',
26
-                      'is_required'         =>  false,
27
-                      'validation_pattern'  =>  '\d+(\.\d{2})?',
28
-                      'validation_msg'      =>  'Please enter number and decimal only ie: 100.50',
29
-                      'required_msg'        =>  '',
30
-                      'field_icon'          =>  'fa fa-usd',
31
-                      'css_class'           =>  '',
32
-                      'cat_sort'            =>  true,
33
-                      'cat_filter'	        =>  true,
34
-                      'extra'        =>  array(
35
-                          'is_price'                  =>  1,
36
-                          'thousand_separator'        =>  'comma',
37
-                          'decimal_separator'         =>  'period',
38
-                          'decimal_display'           =>  'if',
39
-                          'currency_symbol'           =>  '$',
40
-                          'currency_symbol_placement' =>  'left'
41
-                      )
42
-    );
43
-
44
-    // property status
45
-    $fields[] = array('listing_type' => $post_type,
46
-                      'data_type' => 'VARCHAR',
47
-                      'field_type' => 'select',
48
-                      'field_type_key' => 'property_status',
49
-                      'is_active' => 1,
50
-                      'for_admin_use' => 0,
51
-                      'is_default' => 0,
52
-                      'admin_title' => __('Property Status', 'geodirectory'),
53
-                      'admin_desc' => __('Enter the status of the property.', 'geodirectory'),
54
-                      'site_title' => __('Property Status', 'geodirectory'),
55
-                      'htmlvar_name' => 'property_status',
56
-                      'default_value' => '',
57
-                      'is_required' => '1',
58
-                      'required_msg' => '',
59
-                      'show_in'   =>  '[detail],[listing]',
60
-                      'show_on_pkg' => $package,
61
-                      'option_values' => 'Select Status/,For Rent,Let,Under Offer',
62
-                      'field_icon' => 'fa fa-home',
63
-                      'css_class' => '',
64
-                      'cat_sort' => 1,
65
-                      'cat_filter' => 1,
66
-    );
67
-
68
-    // property furnishing
69
-    $fields[] = array('listing_type' => $post_type,
70
-                      'field_type'          =>  'select',
71
-                      'data_type'           =>  'VARCHAR',
72
-                      'admin_title'         =>  __('Furnishing', 'geodirectory'),
73
-                      'site_title'          =>  __('Furnishing', 'geodirectory'),
74
-                      'admin_desc'          =>  __('Enter the furnishing status of the property.', 'geodirectory'),
75
-                      'htmlvar_name'        =>  'property_furnishing',
76
-                      'is_active'           =>  true,
77
-                      'for_admin_use'       =>  false,
78
-                      'default_value'       =>  '',
79
-                      'show_in' 	        =>  '[detail],[listing]',
80
-                      'is_required'         =>  true,
81
-                      'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'),
82
-                      'validation_pattern'  =>  '',
83
-                      'validation_msg'      =>  '',
84
-                      'required_msg'        =>  '',
85
-                      'field_icon'          =>  'fa fa-th-large',
86
-                      'css_class'           =>  '',
87
-                      'cat_sort'            =>  true,
88
-                      'cat_filter'	        =>  true
89
-    );
90
-
91
-    // property type
92
-    $fields[] = array('listing_type' => $post_type,
93
-                      'field_type'          =>  'select',
94
-                      'data_type'           =>  'VARCHAR',
95
-                      'admin_title'         =>  __('Property Type', 'geodirectory'),
96
-                      'site_title'          =>  __('Property Type', 'geodirectory'),
97
-                      'admin_desc'          =>  __('Select the property type.', 'geodirectory'),
98
-                      'htmlvar_name'        =>  'property_type',
99
-                      'is_active'           =>  true,
100
-                      'for_admin_use'       =>  false,
101
-                      'default_value'       =>  '',
102
-                      'show_in' 	        =>  '[detail],[listing]',
103
-                      'is_required'         =>  true,
104
-                      'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'),
105
-                      'validation_pattern'  =>  '',
106
-                      'validation_msg'      =>  '',
107
-                      'required_msg'        =>  '',
108
-                      'field_icon'          =>  'fa fa-home',
109
-                      'css_class'           =>  '',
110
-                      'cat_sort'            =>  true,
111
-                      'cat_filter'	        =>  true
112
-    );
113
-
114
-    // property bedrooms
115
-    $fields[] = array('listing_type' => $post_type,
116
-                      'field_type'          =>  'select',
117
-                      'data_type'           =>  'VARCHAR',
118
-                      'admin_title'         =>  __('Property Bedrooms', 'geodirectory'),
119
-                      'site_title'          =>  __('Bedrooms', 'geodirectory'),
120
-                      'admin_desc'          =>  __('Select the number of bedrooms', 'geodirectory'),
121
-                      'htmlvar_name'        =>  'property_bedrooms',
122
-                      'is_active'           =>  true,
123
-                      'for_admin_use'       =>  false,
124
-                      'default_value'       =>  '',
125
-                      'show_in' 	        =>  '[detail],[listing]',
126
-                      'is_required'         =>  true,
127
-                      'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
128
-                      'validation_pattern'  =>  '',
129
-                      'validation_msg'      =>  '',
130
-                      'required_msg'        =>  '',
131
-                      'field_icon'          =>  'fa fa-bed',
132
-                      'css_class'           =>  '',
133
-                      'cat_sort'            =>  true,
134
-                      'cat_filter'	        =>  true
135
-    );
136
-
137
-    // property bathrooms
138
-    $fields[] = array('listing_type' => $post_type,
139
-                      'field_type'          =>  'select',
140
-                      'data_type'           =>  'VARCHAR',
141
-                      'admin_title'         =>  __('Property Bathrooms', 'geodirectory'),
142
-                      'site_title'          =>  __('Bathrooms', 'geodirectory'),
143
-                      'admin_desc'          =>  __('Select the number of bathrooms', 'geodirectory'),
144
-                      'htmlvar_name'        =>  'property_bathrooms',
145
-                      'is_active'           =>  true,
146
-                      'for_admin_use'       =>  false,
147
-                      'default_value'       =>  '',
148
-                      'show_in' 	        =>  '[detail],[listing]',
149
-                      'is_required'         =>  true,
150
-                      'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
151
-                      'validation_pattern'  =>  '',
152
-                      'validation_msg'      =>  '',
153
-                      'required_msg'        =>  '',
154
-                      'field_icon'          =>  'fa fa-bold',
155
-                      'css_class'           =>  '',
156
-                      'cat_sort'            =>  true,
157
-                      'cat_filter'	        =>  true
158
-    );
159
-
160
-    // property area
161
-    $fields[] = array('listing_type' => $post_type,
162
-                      'field_type'          =>  'text',
163
-                      'data_type'           =>  'FLOAT',
164
-                      'admin_title'         =>  __('Property Area', 'geodirectory'),
165
-                      'site_title'          =>  __('Area (Sq Ft)', 'geodirectory'),
166
-                      'admin_desc'          =>  __('Enter the Sq Ft value for the property', 'geodirectory'),
167
-                      'htmlvar_name'        =>  'property_area',
168
-                      'is_active'           =>  true,
169
-                      'for_admin_use'       =>  false,
170
-                      'default_value'       =>  '',
171
-                      'show_in' 	        =>  '[detail],[listing]',
172
-                      'is_required'         =>  false,
173
-                      'validation_pattern'  =>  '\d+(\.\d{2})?',
174
-                      'validation_msg'      =>  'Please enter the property area in numbers only: 1500',
175
-                      'required_msg'        =>  '',
176
-                      'field_icon'          =>  'fa fa-area-chart',
177
-                      'css_class'           =>  '',
178
-                      'cat_sort'            =>  true,
179
-                      'cat_filter'	        =>  true
180
-    );
181
-
182
-    // property features
183
-    $fields[] = array('listing_type' => $post_type,
184
-                      'field_type'          =>  'multiselect',
185
-                      'data_type'           =>  'VARCHAR',
186
-                      'admin_title'         =>  __('Property Features', 'geodirectory'),
187
-                      'site_title'          =>  __('Features', 'geodirectory'),
188
-                      'admin_desc'          =>  __('Select the property features.', 'geodirectory'),
189
-                      'htmlvar_name'        =>  'property_features',
190
-                      'is_active'           =>  true,
191
-                      'for_admin_use'       =>  false,
192
-                      'default_value'       =>  '',
193
-                      'show_in' 	        =>  '[detail],[listing]',
194
-                      'is_required'         =>  true,
195
-                      'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'),
196
-                      'validation_pattern'  =>  '',
197
-                      'validation_msg'      =>  '',
198
-                      'required_msg'        =>  '',
199
-                      'field_icon'          =>  'fa fa-plus-square',
200
-                      'css_class'           =>  'gd-comma-list',
201
-                      'cat_sort'            =>  true,
202
-                      'cat_filter'	        =>  true
203
-    );
204
-
205
-
206
-
207
-    /**
208
-     * Filter the array of default custom fields DB table data.
209
-     *
210
-     * @since 1.6.6
211
-     * @param string $fields The default custom fields as an array.
212
-     */
213
-    $fields = apply_filters('geodir_property_rent_custom_fields', $fields);
214
-
215
-    return  $fields;
10
+	$fields = array();
11
+	$package = ($package_id=='') ? '' : array($package_id);
12
+
13
+	// price
14
+	$fields[] = array('listing_type' => $post_type,
15
+					  'field_type'          =>  'text',
16
+					  'data_type'           =>  'FLOAT',
17
+					  'decimal_point'       =>  '2',
18
+					  'admin_title'         =>  __('Price', 'geodirectory'),
19
+					  'site_title'          =>  __('Price', 'geodirectory'),
20
+					  'admin_desc'          =>  __('Enter the price per calendar month (PCM)in $ (no currency symbol)', 'geodirectory'),
21
+					  'htmlvar_name'        =>  'price',
22
+					  'is_active'           =>  true,
23
+					  'for_admin_use'       =>  false,
24
+					  'default_value'       =>  '',
25
+					  'show_in' 	        =>  '[detail],[listing]',
26
+					  'is_required'         =>  false,
27
+					  'validation_pattern'  =>  '\d+(\.\d{2})?',
28
+					  'validation_msg'      =>  'Please enter number and decimal only ie: 100.50',
29
+					  'required_msg'        =>  '',
30
+					  'field_icon'          =>  'fa fa-usd',
31
+					  'css_class'           =>  '',
32
+					  'cat_sort'            =>  true,
33
+					  'cat_filter'	        =>  true,
34
+					  'extra'        =>  array(
35
+						  'is_price'                  =>  1,
36
+						  'thousand_separator'        =>  'comma',
37
+						  'decimal_separator'         =>  'period',
38
+						  'decimal_display'           =>  'if',
39
+						  'currency_symbol'           =>  '$',
40
+						  'currency_symbol_placement' =>  'left'
41
+					  )
42
+	);
43
+
44
+	// property status
45
+	$fields[] = array('listing_type' => $post_type,
46
+					  'data_type' => 'VARCHAR',
47
+					  'field_type' => 'select',
48
+					  'field_type_key' => 'property_status',
49
+					  'is_active' => 1,
50
+					  'for_admin_use' => 0,
51
+					  'is_default' => 0,
52
+					  'admin_title' => __('Property Status', 'geodirectory'),
53
+					  'admin_desc' => __('Enter the status of the property.', 'geodirectory'),
54
+					  'site_title' => __('Property Status', 'geodirectory'),
55
+					  'htmlvar_name' => 'property_status',
56
+					  'default_value' => '',
57
+					  'is_required' => '1',
58
+					  'required_msg' => '',
59
+					  'show_in'   =>  '[detail],[listing]',
60
+					  'show_on_pkg' => $package,
61
+					  'option_values' => 'Select Status/,For Rent,Let,Under Offer',
62
+					  'field_icon' => 'fa fa-home',
63
+					  'css_class' => '',
64
+					  'cat_sort' => 1,
65
+					  'cat_filter' => 1,
66
+	);
67
+
68
+	// property furnishing
69
+	$fields[] = array('listing_type' => $post_type,
70
+					  'field_type'          =>  'select',
71
+					  'data_type'           =>  'VARCHAR',
72
+					  'admin_title'         =>  __('Furnishing', 'geodirectory'),
73
+					  'site_title'          =>  __('Furnishing', 'geodirectory'),
74
+					  'admin_desc'          =>  __('Enter the furnishing status of the property.', 'geodirectory'),
75
+					  'htmlvar_name'        =>  'property_furnishing',
76
+					  'is_active'           =>  true,
77
+					  'for_admin_use'       =>  false,
78
+					  'default_value'       =>  '',
79
+					  'show_in' 	        =>  '[detail],[listing]',
80
+					  'is_required'         =>  true,
81
+					  'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'),
82
+					  'validation_pattern'  =>  '',
83
+					  'validation_msg'      =>  '',
84
+					  'required_msg'        =>  '',
85
+					  'field_icon'          =>  'fa fa-th-large',
86
+					  'css_class'           =>  '',
87
+					  'cat_sort'            =>  true,
88
+					  'cat_filter'	        =>  true
89
+	);
90
+
91
+	// property type
92
+	$fields[] = array('listing_type' => $post_type,
93
+					  'field_type'          =>  'select',
94
+					  'data_type'           =>  'VARCHAR',
95
+					  'admin_title'         =>  __('Property Type', 'geodirectory'),
96
+					  'site_title'          =>  __('Property Type', 'geodirectory'),
97
+					  'admin_desc'          =>  __('Select the property type.', 'geodirectory'),
98
+					  'htmlvar_name'        =>  'property_type',
99
+					  'is_active'           =>  true,
100
+					  'for_admin_use'       =>  false,
101
+					  'default_value'       =>  '',
102
+					  'show_in' 	        =>  '[detail],[listing]',
103
+					  'is_required'         =>  true,
104
+					  'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'),
105
+					  'validation_pattern'  =>  '',
106
+					  'validation_msg'      =>  '',
107
+					  'required_msg'        =>  '',
108
+					  'field_icon'          =>  'fa fa-home',
109
+					  'css_class'           =>  '',
110
+					  'cat_sort'            =>  true,
111
+					  'cat_filter'	        =>  true
112
+	);
113
+
114
+	// property bedrooms
115
+	$fields[] = array('listing_type' => $post_type,
116
+					  'field_type'          =>  'select',
117
+					  'data_type'           =>  'VARCHAR',
118
+					  'admin_title'         =>  __('Property Bedrooms', 'geodirectory'),
119
+					  'site_title'          =>  __('Bedrooms', 'geodirectory'),
120
+					  'admin_desc'          =>  __('Select the number of bedrooms', 'geodirectory'),
121
+					  'htmlvar_name'        =>  'property_bedrooms',
122
+					  'is_active'           =>  true,
123
+					  'for_admin_use'       =>  false,
124
+					  'default_value'       =>  '',
125
+					  'show_in' 	        =>  '[detail],[listing]',
126
+					  'is_required'         =>  true,
127
+					  'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
128
+					  'validation_pattern'  =>  '',
129
+					  'validation_msg'      =>  '',
130
+					  'required_msg'        =>  '',
131
+					  'field_icon'          =>  'fa fa-bed',
132
+					  'css_class'           =>  '',
133
+					  'cat_sort'            =>  true,
134
+					  'cat_filter'	        =>  true
135
+	);
136
+
137
+	// property bathrooms
138
+	$fields[] = array('listing_type' => $post_type,
139
+					  'field_type'          =>  'select',
140
+					  'data_type'           =>  'VARCHAR',
141
+					  'admin_title'         =>  __('Property Bathrooms', 'geodirectory'),
142
+					  'site_title'          =>  __('Bathrooms', 'geodirectory'),
143
+					  'admin_desc'          =>  __('Select the number of bathrooms', 'geodirectory'),
144
+					  'htmlvar_name'        =>  'property_bathrooms',
145
+					  'is_active'           =>  true,
146
+					  'for_admin_use'       =>  false,
147
+					  'default_value'       =>  '',
148
+					  'show_in' 	        =>  '[detail],[listing]',
149
+					  'is_required'         =>  true,
150
+					  'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
151
+					  'validation_pattern'  =>  '',
152
+					  'validation_msg'      =>  '',
153
+					  'required_msg'        =>  '',
154
+					  'field_icon'          =>  'fa fa-bold',
155
+					  'css_class'           =>  '',
156
+					  'cat_sort'            =>  true,
157
+					  'cat_filter'	        =>  true
158
+	);
159
+
160
+	// property area
161
+	$fields[] = array('listing_type' => $post_type,
162
+					  'field_type'          =>  'text',
163
+					  'data_type'           =>  'FLOAT',
164
+					  'admin_title'         =>  __('Property Area', 'geodirectory'),
165
+					  'site_title'          =>  __('Area (Sq Ft)', 'geodirectory'),
166
+					  'admin_desc'          =>  __('Enter the Sq Ft value for the property', 'geodirectory'),
167
+					  'htmlvar_name'        =>  'property_area',
168
+					  'is_active'           =>  true,
169
+					  'for_admin_use'       =>  false,
170
+					  'default_value'       =>  '',
171
+					  'show_in' 	        =>  '[detail],[listing]',
172
+					  'is_required'         =>  false,
173
+					  'validation_pattern'  =>  '\d+(\.\d{2})?',
174
+					  'validation_msg'      =>  'Please enter the property area in numbers only: 1500',
175
+					  'required_msg'        =>  '',
176
+					  'field_icon'          =>  'fa fa-area-chart',
177
+					  'css_class'           =>  '',
178
+					  'cat_sort'            =>  true,
179
+					  'cat_filter'	        =>  true
180
+	);
181
+
182
+	// property features
183
+	$fields[] = array('listing_type' => $post_type,
184
+					  'field_type'          =>  'multiselect',
185
+					  'data_type'           =>  'VARCHAR',
186
+					  'admin_title'         =>  __('Property Features', 'geodirectory'),
187
+					  'site_title'          =>  __('Features', 'geodirectory'),
188
+					  'admin_desc'          =>  __('Select the property features.', 'geodirectory'),
189
+					  'htmlvar_name'        =>  'property_features',
190
+					  'is_active'           =>  true,
191
+					  'for_admin_use'       =>  false,
192
+					  'default_value'       =>  '',
193
+					  'show_in' 	        =>  '[detail],[listing]',
194
+					  'is_required'         =>  true,
195
+					  'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'),
196
+					  'validation_pattern'  =>  '',
197
+					  'validation_msg'      =>  '',
198
+					  'required_msg'        =>  '',
199
+					  'field_icon'          =>  'fa fa-plus-square',
200
+					  'css_class'           =>  'gd-comma-list',
201
+					  'cat_sort'            =>  true,
202
+					  'cat_filter'	        =>  true
203
+	);
204
+
205
+
206
+
207
+	/**
208
+	 * Filter the array of default custom fields DB table data.
209
+	 *
210
+	 * @since 1.6.6
211
+	 * @param string $fields The default custom fields as an array.
212
+	 */
213
+	$fields = apply_filters('geodir_property_rent_custom_fields', $fields);
214
+
215
+	return  $fields;
216 216
 }
217 217
 
218 218
 function geodir_property_rent_custom_fields_advanced_search($post_type='gd_place') {
219 219
 
220 220
 
221
-    $fields = array();
222
-
223
-    // Price range
224
-    $fields[] = array(
225
-        'create_field'            => true,
226
-        'listing_type'            => $post_type,
227
-        'field_type'              => 'text',
228
-        'data_type'               => 'RANGE',
229
-        'is_active'               => 1,
230
-        'site_field_title'        => 'Price',
231
-        'field_data_type'         => 'FLOAT',
232
-        'main_search'             => 1,
233
-        'main_search_priority'    => 15,
234
-        'data_type_change'        => 'SELECT',
235
-        'search_condition_select' => 'SINGLE',
236
-        'search_min_value'        => '1000',
237
-        'search_max_value'        => '10000',
238
-        'search_diff_value'       => '1000',
239
-        'first_search_value'      => '0',
240
-        'first_search_text'       => '',
241
-        'last_search_text'        => '',
242
-        'search_condition'        => 'SELECT',
243
-        'site_htmlvar_name'       => 'geodir_price',
244
-        'htmlvar_name'            => 'geodir_price',
245
-        'field_title'             => 'geodir_price',
246
-        'expand_custom_value'     => '',
247
-        'front_search_title'      => 'Price Range pm',
248
-        'field_desc'              => ''
249
-    );
250
-
251
-    // bedrooms
252
-    $fields[] = array(
253
-        'create_field'            => true,
254
-        'listing_type'            => $post_type,
255
-        'field_type'              => 'select',
256
-        'data_type'               => 'SELECT',
257
-        'is_active'               => 1,
258
-        'site_field_title'        => 'Bedrooms',
259
-        'field_data_type'         => 'VARCHAR',
260
-        'main_search'             => 1,
261
-        'main_search_priority'    => 16,
262
-        'search_condition'        => 'SINGLE',
263
-        'site_htmlvar_name'       => 'geodir_property_bedrooms',
264
-        'htmlvar_name'            => 'geodir_property_bedrooms',
265
-        'field_title'             => 'geodir_property_bedrooms',
266
-        'front_search_title'      => 'Bedrooms',
267
-        'field_desc'              => ''
268
-    );
269
-
270
-    // Property type
271
-    $fields[] = array(
272
-        'create_field'            => true,
273
-        'listing_type'            => $post_type,
274
-        'field_type'              => 'select',
275
-        'data_type'               => 'SELECT',
276
-        'is_active'               => 1,
277
-        'site_field_title'        => 'Property Type',
278
-        'field_data_type'         => 'VARCHAR',
279
-        'main_search'             => 0,
280
-        //'main_search_priority'    => 16,
281
-        'search_condition'        => 'SINGLE',
282
-        'site_htmlvar_name'       => 'geodir_property_type',
283
-        'htmlvar_name'            => 'geodir_property_type',
284
-        'field_title'             => 'geodir_property_type',
285
-        'front_search_title'      => 'Property Type',
286
-        'field_desc'              => ''
287
-    );
288
-
289
-    // Property Bathrooms
290
-    $fields[] = array(
291
-        'create_field'            => true,
292
-        'listing_type'            => $post_type,
293
-        'field_type'              => 'select',
294
-        'data_type'               => 'SELECT',
295
-        'is_active'               => 1,
296
-        'site_field_title'        => 'Bathrooms',
297
-        'field_data_type'         => 'VARCHAR',
298
-        'main_search'             => 0,
299
-        //'main_search_priority'    => 16,
300
-        'search_condition'        => 'SINGLE',
301
-        'site_htmlvar_name'       => 'geodir_property_bathrooms',
302
-        'htmlvar_name'            => 'geodir_property_bathrooms',
303
-        'field_title'             => 'geodir_property_bathrooms',
304
-        'front_search_title'      => 'Bathrooms',
305
-        'field_desc'              => ''
306
-    );
307
-
308
-    // Property Furnishing
309
-    $fields[] = array(
310
-        'create_field'            => true,
311
-        'listing_type'            => $post_type,
312
-        'field_type'              => 'select',
313
-        'data_type'               => 'SELECT',
314
-        'is_active'               => 1,
315
-        'site_field_title'        => 'Furnishing',
316
-        'field_data_type'         => 'VARCHAR',
317
-        'main_search'             => 0,
318
-        //'main_search_priority'    => 16,
319
-        'search_condition'        => 'SINGLE',
320
-        'site_htmlvar_name'       => 'geodir_property_furnishing',
321
-        'htmlvar_name'            => 'geodir_property_furnishing',
322
-        'field_title'             => 'geodir_property_furnishing',
323
-        'front_search_title'      => 'Furnishing',
324
-        'field_desc'              => ''
325
-    );
326
-
327
-    // Property Status
328
-    $fields[] = array(
329
-        'create_field'            => true,
330
-        'listing_type'            => $post_type,
331
-        'field_type'              => 'select',
332
-        'data_type'               => 'SELECT',
333
-        'is_active'               => 1,
334
-        'site_field_title'        => 'Property Status',
335
-        'field_data_type'         => 'VARCHAR',
336
-        'main_search'             => 0,
337
-        //'main_search_priority'    => 16,
338
-        'search_condition'        => 'SINGLE',
339
-        'site_htmlvar_name'       => 'geodir_property_status',
340
-        'htmlvar_name'            => 'geodir_property_status',
341
-        'field_title'             => 'geodir_property_status',
342
-        'front_search_title'      => 'Property Status',
343
-        'field_desc'              => ''
344
-    );
345
-
346
-    // Property Status
347
-    $fields[] = array(
348
-        'create_field'            => true,
349
-        'listing_type'            => $post_type,
350
-        'field_type'              => 'select',
351
-        'data_type'               => 'SELECT',
352
-        'is_active'               => 1,
353
-        'site_field_title'        => 'Property Status',
354
-        'field_data_type'         => 'VARCHAR',
355
-        'main_search'             => 0,
356
-        //'main_search_priority'    => 16,
357
-        'search_condition'        => 'SINGLE',
358
-        'site_htmlvar_name'       => 'geodir_property_status',
359
-        'htmlvar_name'            => 'geodir_property_status',
360
-        'field_title'             => 'geodir_property_status',
361
-        'front_search_title'      => 'Property Status',
362
-        'field_desc'              => ''
363
-    );
364
-
365
-
366
-    /**
367
-     * Filter the array of advanced search fields DB table data.
368
-     *
369
-     * @since 1.6.6
370
-     * @param string $fields The default custom fields as an array.
371
-     */
372
-    $fields = apply_filters('geodir_property_rent_custom_fields_advanced_search', $fields);
373
-
374
-    return $fields;
221
+	$fields = array();
222
+
223
+	// Price range
224
+	$fields[] = array(
225
+		'create_field'            => true,
226
+		'listing_type'            => $post_type,
227
+		'field_type'              => 'text',
228
+		'data_type'               => 'RANGE',
229
+		'is_active'               => 1,
230
+		'site_field_title'        => 'Price',
231
+		'field_data_type'         => 'FLOAT',
232
+		'main_search'             => 1,
233
+		'main_search_priority'    => 15,
234
+		'data_type_change'        => 'SELECT',
235
+		'search_condition_select' => 'SINGLE',
236
+		'search_min_value'        => '1000',
237
+		'search_max_value'        => '10000',
238
+		'search_diff_value'       => '1000',
239
+		'first_search_value'      => '0',
240
+		'first_search_text'       => '',
241
+		'last_search_text'        => '',
242
+		'search_condition'        => 'SELECT',
243
+		'site_htmlvar_name'       => 'geodir_price',
244
+		'htmlvar_name'            => 'geodir_price',
245
+		'field_title'             => 'geodir_price',
246
+		'expand_custom_value'     => '',
247
+		'front_search_title'      => 'Price Range pm',
248
+		'field_desc'              => ''
249
+	);
250
+
251
+	// bedrooms
252
+	$fields[] = array(
253
+		'create_field'            => true,
254
+		'listing_type'            => $post_type,
255
+		'field_type'              => 'select',
256
+		'data_type'               => 'SELECT',
257
+		'is_active'               => 1,
258
+		'site_field_title'        => 'Bedrooms',
259
+		'field_data_type'         => 'VARCHAR',
260
+		'main_search'             => 1,
261
+		'main_search_priority'    => 16,
262
+		'search_condition'        => 'SINGLE',
263
+		'site_htmlvar_name'       => 'geodir_property_bedrooms',
264
+		'htmlvar_name'            => 'geodir_property_bedrooms',
265
+		'field_title'             => 'geodir_property_bedrooms',
266
+		'front_search_title'      => 'Bedrooms',
267
+		'field_desc'              => ''
268
+	);
269
+
270
+	// Property type
271
+	$fields[] = array(
272
+		'create_field'            => true,
273
+		'listing_type'            => $post_type,
274
+		'field_type'              => 'select',
275
+		'data_type'               => 'SELECT',
276
+		'is_active'               => 1,
277
+		'site_field_title'        => 'Property Type',
278
+		'field_data_type'         => 'VARCHAR',
279
+		'main_search'             => 0,
280
+		//'main_search_priority'    => 16,
281
+		'search_condition'        => 'SINGLE',
282
+		'site_htmlvar_name'       => 'geodir_property_type',
283
+		'htmlvar_name'            => 'geodir_property_type',
284
+		'field_title'             => 'geodir_property_type',
285
+		'front_search_title'      => 'Property Type',
286
+		'field_desc'              => ''
287
+	);
288
+
289
+	// Property Bathrooms
290
+	$fields[] = array(
291
+		'create_field'            => true,
292
+		'listing_type'            => $post_type,
293
+		'field_type'              => 'select',
294
+		'data_type'               => 'SELECT',
295
+		'is_active'               => 1,
296
+		'site_field_title'        => 'Bathrooms',
297
+		'field_data_type'         => 'VARCHAR',
298
+		'main_search'             => 0,
299
+		//'main_search_priority'    => 16,
300
+		'search_condition'        => 'SINGLE',
301
+		'site_htmlvar_name'       => 'geodir_property_bathrooms',
302
+		'htmlvar_name'            => 'geodir_property_bathrooms',
303
+		'field_title'             => 'geodir_property_bathrooms',
304
+		'front_search_title'      => 'Bathrooms',
305
+		'field_desc'              => ''
306
+	);
307
+
308
+	// Property Furnishing
309
+	$fields[] = array(
310
+		'create_field'            => true,
311
+		'listing_type'            => $post_type,
312
+		'field_type'              => 'select',
313
+		'data_type'               => 'SELECT',
314
+		'is_active'               => 1,
315
+		'site_field_title'        => 'Furnishing',
316
+		'field_data_type'         => 'VARCHAR',
317
+		'main_search'             => 0,
318
+		//'main_search_priority'    => 16,
319
+		'search_condition'        => 'SINGLE',
320
+		'site_htmlvar_name'       => 'geodir_property_furnishing',
321
+		'htmlvar_name'            => 'geodir_property_furnishing',
322
+		'field_title'             => 'geodir_property_furnishing',
323
+		'front_search_title'      => 'Furnishing',
324
+		'field_desc'              => ''
325
+	);
326
+
327
+	// Property Status
328
+	$fields[] = array(
329
+		'create_field'            => true,
330
+		'listing_type'            => $post_type,
331
+		'field_type'              => 'select',
332
+		'data_type'               => 'SELECT',
333
+		'is_active'               => 1,
334
+		'site_field_title'        => 'Property Status',
335
+		'field_data_type'         => 'VARCHAR',
336
+		'main_search'             => 0,
337
+		//'main_search_priority'    => 16,
338
+		'search_condition'        => 'SINGLE',
339
+		'site_htmlvar_name'       => 'geodir_property_status',
340
+		'htmlvar_name'            => 'geodir_property_status',
341
+		'field_title'             => 'geodir_property_status',
342
+		'front_search_title'      => 'Property Status',
343
+		'field_desc'              => ''
344
+	);
345
+
346
+	// Property Status
347
+	$fields[] = array(
348
+		'create_field'            => true,
349
+		'listing_type'            => $post_type,
350
+		'field_type'              => 'select',
351
+		'data_type'               => 'SELECT',
352
+		'is_active'               => 1,
353
+		'site_field_title'        => 'Property Status',
354
+		'field_data_type'         => 'VARCHAR',
355
+		'main_search'             => 0,
356
+		//'main_search_priority'    => 16,
357
+		'search_condition'        => 'SINGLE',
358
+		'site_htmlvar_name'       => 'geodir_property_status',
359
+		'htmlvar_name'            => 'geodir_property_status',
360
+		'field_title'             => 'geodir_property_status',
361
+		'front_search_title'      => 'Property Status',
362
+		'field_desc'              => ''
363
+	);
364
+
365
+
366
+	/**
367
+	 * Filter the array of advanced search fields DB table data.
368
+	 *
369
+	 * @since 1.6.6
370
+	 * @param string $fields The default custom fields as an array.
371
+	 */
372
+	$fields = apply_filters('geodir_property_rent_custom_fields_advanced_search', $fields);
373
+
374
+	return $fields;
375 375
 }
376 376
 
377 377
 global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index;
@@ -381,46 +381,46 @@  discard block
 block discarded – undo
381 381
 $category_array = array('Apartments', 'Houses', 'Commercial', 'Land');
382 382
 
383 383
 if($dummy_post_index==1){
384
-    // add the dummy categories
385
-    geodir_dummy_data_taxonomies($post_type,$category_array );
386
-
387
-    // add the dummy custom fields
388
-    $fields = geodir_property_rent_custom_fields($post_type);
389
-    geodir_create_dummy_fields($fields);
390
-
391
-    // update the type currently installed
392
-    update_option($post_type.'_dummy_data_type','property_rent');
393
-
394
-    // add the advanced search fields
395
-    if (defined('GEODIRADVANCESEARCH_VERSION')){
396
-        $search_fields = geodir_property_rent_custom_fields_advanced_search($post_type);
397
-        foreach($search_fields as $sfield){
398
-            geodir_custom_advance_search_field_save( $sfield );
399
-        }
400
-    }
384
+	// add the dummy categories
385
+	geodir_dummy_data_taxonomies($post_type,$category_array );
386
+
387
+	// add the dummy custom fields
388
+	$fields = geodir_property_rent_custom_fields($post_type);
389
+	geodir_create_dummy_fields($fields);
390
+
391
+	// update the type currently installed
392
+	update_option($post_type.'_dummy_data_type','property_rent');
393
+
394
+	// add the advanced search fields
395
+	if (defined('GEODIRADVANCESEARCH_VERSION')){
396
+		$search_fields = geodir_property_rent_custom_fields_advanced_search($post_type);
397
+		foreach($search_fields as $sfield){
398
+			geodir_custom_advance_search_field_save( $sfield );
399
+		}
400
+	}
401 401
 }
402 402
 
403 403
 if (geodir_dummy_folder_exists())
404
-    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
404
+	$dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
405 405
 else
406
-    $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
406
+	$dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
407 407
 
408 408
 $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
409 409
 
410 410
 switch ($dummy_post_index) {
411 411
 
412
-    case(1):
413
-        $image_array[] = "$dummy_image_url/ps/psf1.jpg";
414
-        $image_array[] = "$dummy_image_url/ps/psl1.jpg";
415
-        $image_array[] = "$dummy_image_url/ps/psb1.jpg";
416
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
417
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
412
+	case(1):
413
+		$image_array[] = "$dummy_image_url/ps/psf1.jpg";
414
+		$image_array[] = "$dummy_image_url/ps/psl1.jpg";
415
+		$image_array[] = "$dummy_image_url/ps/psb1.jpg";
416
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
417
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
418 418
 
419 419
 
420
-        $post_info[] = array(
421
-            "listing_type" => $post_type,
422
-            "post_title" => 'Eastern Lodge',
423
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa.
420
+		$post_info[] = array(
421
+			"listing_type" => $post_type,
422
+			"post_title" => 'Eastern Lodge',
423
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa.
424 424
 
425 425
 Aliquam ut odio ullamcorper, posuere enim sed, venenatis tortor. Donec justo elit, aliquam sed cursus sed, semper eget libero. Mauris consequat lorem sed fringilla tincidunt. Phasellus suscipit velit et elit tristique, ac commodo metus scelerisque. Vivamus finibus ipsum placerat pulvinar aliquet. Maecenas augue orci, blandit at nibh pharetra, condimentum congue ligula. Duis non ante sagittis odio convallis lacinia in quis sapien.
426 426
 
@@ -429,42 +429,42 @@  discard block
 block discarded – undo
429 429
 Vestibulum tristique quam eget bibendum pulvinar. Mauris sit amet magna ut arcu rutrum pellentesque feugiat et ipsum. Proin porta quam sed risus accumsan pharetra. Nulla quis semper nisl. Nulla facilisi. Nulla facilisi. Pellentesque euismod sollicitudin lacus vel ultricies. Vestibulum ut sem ut nulla ultricies convallis in at mi. Nunc vitae nibh arcu. Maecenas nunc enim, tempus a rhoncus eget, pellentesque ut erat.
430 430
 
431 431
 Suspendisse interdum accumsan magna et tempor. Suspendisse scelerisque at lorem sit amet faucibus. Aenean quis consectetur enim. Duis aliquet tristique tempus. Suspendisse id ullamcorper mauris. Aliquam in libero eu justo porttitor pulvinar. Nulla semper placerat lectus. Nulla mollis suscipit lacus, a blandit purus cursus non. Maecenas id tellus mi. Pellentesque sollicitudin nibh eget magna scelerisque consequat. Aliquam convallis orci arcu, et euismod dui cursus et. Donec nec pellentesque nulla, ac pretium massa. In gravida bibendum ornare.',
432
-            "post_images" => $image_array,
433
-            "post_category" => array($post_type.'category' => array($category_array[1])),
434
-            "post_tags" => array('Tags', 'Sample Tags'),
435
-            "geodir_video" => '',
436
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
437
-            "geodir_contact" => '(111) 677-4444',
438
-            "geodir_email" => '[email protected]',
439
-            "geodir_website" => 'http://example.com/',
440
-            "geodir_twitter" => 'http://example.com/',
441
-            "geodir_facebook" => 'http://example.com/',
442
-            "geodir_price" => '1750',
443
-            "geodir_property_status" => 'For Rent',
444
-            'geodir_property_furnishing' => 'Furnished',
445
-            'geodir_property_type' => 'Detached house',
446
-            'geodir_property_bedrooms' => '3',
447
-            'geodir_property_bathrooms' => '2',
448
-            'geodir_property_area' => '1850',
449
-            'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace',
450
-            "post_dummy" => '1'
451
-        );
452
-
453
-
454
-        break;
455
-    case 2:
456
-        $image_array = array();
457
-        $post_meta = array();
458
-        $image_array[] = "$dummy_image_url/ps/psf2.jpg";
459
-        $image_array[] = "$dummy_image_url/ps/psl2.jpg";
460
-        $image_array[] = "$dummy_image_url/ps/psb2.jpg";
461
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
462
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
463
-
464
-        $post_info[] = array(
465
-            "listing_type" => $post_type,
466
-            "post_title" => 'Daisy Street',
467
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
432
+			"post_images" => $image_array,
433
+			"post_category" => array($post_type.'category' => array($category_array[1])),
434
+			"post_tags" => array('Tags', 'Sample Tags'),
435
+			"geodir_video" => '',
436
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
437
+			"geodir_contact" => '(111) 677-4444',
438
+			"geodir_email" => '[email protected]',
439
+			"geodir_website" => 'http://example.com/',
440
+			"geodir_twitter" => 'http://example.com/',
441
+			"geodir_facebook" => 'http://example.com/',
442
+			"geodir_price" => '1750',
443
+			"geodir_property_status" => 'For Rent',
444
+			'geodir_property_furnishing' => 'Furnished',
445
+			'geodir_property_type' => 'Detached house',
446
+			'geodir_property_bedrooms' => '3',
447
+			'geodir_property_bathrooms' => '2',
448
+			'geodir_property_area' => '1850',
449
+			'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace',
450
+			"post_dummy" => '1'
451
+		);
452
+
453
+
454
+		break;
455
+	case 2:
456
+		$image_array = array();
457
+		$post_meta = array();
458
+		$image_array[] = "$dummy_image_url/ps/psf2.jpg";
459
+		$image_array[] = "$dummy_image_url/ps/psl2.jpg";
460
+		$image_array[] = "$dummy_image_url/ps/psb2.jpg";
461
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
462
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
463
+
464
+		$post_info[] = array(
465
+			"listing_type" => $post_type,
466
+			"post_title" => 'Daisy Street',
467
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
468 468
 
469 469
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
470 470
 
@@ -474,42 +474,42 @@  discard block
 block discarded – undo
474 474
 
475 475
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
476 476
 
477
-            "post_images" => $image_array,
478
-            "post_category" => array($post_type.'category' => array($category_array[1])),
479
-            "post_tags" => array('Garage'),
480
-            "geodir_video" => '',
481
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
482
-            "geodir_contact" => '(222) 777-1111',
483
-            "geodir_email" => '[email protected]',
484
-            "geodir_website" => 'http://example.com/',
485
-            "geodir_twitter" => 'http://example.com/',
486
-            "geodir_facebook" => 'http://example.com/',
487
-            "geodir_price" => '1150',
488
-            "geodir_property_status" => 'Let',
489
-            'geodir_property_furnishing' => 'Unfurnished',
490
-            'geodir_property_type' => 'Detached house',
491
-            'geodir_property_bedrooms' => '5',
492
-            'geodir_property_bathrooms' => '3',
493
-            'geodir_property_area' => '2650',
494
-            'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace',
495
-            "post_dummy" => '1'
496
-        );
497
-
498
-        break;
499
-
500
-    case 3:
501
-        $image_array = array();
502
-        $post_meta = array();
503
-        $image_array[] = "$dummy_image_url/ps/psf3.jpg";
504
-        $image_array[] = "$dummy_image_url/ps/psl3.jpg";
505
-        $image_array[] = "$dummy_image_url/ps/psb3.jpg";
506
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
507
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
508
-
509
-        $post_info[] = array(
510
-            "listing_type" => $post_type,
511
-            "post_title" => 'Northbay House',
512
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
477
+			"post_images" => $image_array,
478
+			"post_category" => array($post_type.'category' => array($category_array[1])),
479
+			"post_tags" => array('Garage'),
480
+			"geodir_video" => '',
481
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
482
+			"geodir_contact" => '(222) 777-1111',
483
+			"geodir_email" => '[email protected]',
484
+			"geodir_website" => 'http://example.com/',
485
+			"geodir_twitter" => 'http://example.com/',
486
+			"geodir_facebook" => 'http://example.com/',
487
+			"geodir_price" => '1150',
488
+			"geodir_property_status" => 'Let',
489
+			'geodir_property_furnishing' => 'Unfurnished',
490
+			'geodir_property_type' => 'Detached house',
491
+			'geodir_property_bedrooms' => '5',
492
+			'geodir_property_bathrooms' => '3',
493
+			'geodir_property_area' => '2650',
494
+			'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace',
495
+			"post_dummy" => '1'
496
+		);
497
+
498
+		break;
499
+
500
+	case 3:
501
+		$image_array = array();
502
+		$post_meta = array();
503
+		$image_array[] = "$dummy_image_url/ps/psf3.jpg";
504
+		$image_array[] = "$dummy_image_url/ps/psl3.jpg";
505
+		$image_array[] = "$dummy_image_url/ps/psb3.jpg";
506
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
507
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
508
+
509
+		$post_info[] = array(
510
+			"listing_type" => $post_type,
511
+			"post_title" => 'Northbay House',
512
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
513 513
 
514 514
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
515 515
 
@@ -519,43 +519,43 @@  discard block
 block discarded – undo
519 519
 
520 520
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
521 521
 
522
-            "post_images" => $image_array,
523
-            "post_category" => array($post_type.'category' => array($category_array[1])),
524
-            "post_tags" => array('Tags', 'Sample Tags'),
525
-            "geodir_video" => '',
526
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
527
-            "geodir_contact" => '(222) 777-1111',
528
-            "geodir_email" => '[email protected]',
529
-            "geodir_website" => 'http://example.com/',
530
-            "geodir_twitter" => 'http://example.com/',
531
-            "geodir_facebook" => 'http://example.com/',
532
-            "geodir_price" => '1300',
533
-            "geodir_property_status" => 'Under Offer',
534
-            'geodir_property_furnishing' => 'Unfurnished',
535
-            'geodir_property_type' => 'Detached house',
536
-            'geodir_property_bedrooms' => '6',
537
-            'geodir_property_bathrooms' => '6',
538
-            'geodir_property_area' => '1650',
539
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace',
540
-            "post_dummy" => '1'
541
-        );
542
-
543
-        break;
544
-
545
-
546
-    case 4:
547
-        $image_array = array();
548
-        $post_meta = array();
549
-        $image_array[] = "$dummy_image_url/ps/psf4.jpg";
550
-        $image_array[] = "$dummy_image_url/ps/psl4.jpg";
551
-        $image_array[] = "$dummy_image_url/ps/psb4.jpg";
552
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
553
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
554
-
555
-        $post_info[] = array(
556
-            "listing_type" => $post_type,
557
-            "post_title" => 'Jesmond Mansion',
558
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
522
+			"post_images" => $image_array,
523
+			"post_category" => array($post_type.'category' => array($category_array[1])),
524
+			"post_tags" => array('Tags', 'Sample Tags'),
525
+			"geodir_video" => '',
526
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
527
+			"geodir_contact" => '(222) 777-1111',
528
+			"geodir_email" => '[email protected]',
529
+			"geodir_website" => 'http://example.com/',
530
+			"geodir_twitter" => 'http://example.com/',
531
+			"geodir_facebook" => 'http://example.com/',
532
+			"geodir_price" => '1300',
533
+			"geodir_property_status" => 'Under Offer',
534
+			'geodir_property_furnishing' => 'Unfurnished',
535
+			'geodir_property_type' => 'Detached house',
536
+			'geodir_property_bedrooms' => '6',
537
+			'geodir_property_bathrooms' => '6',
538
+			'geodir_property_area' => '1650',
539
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace',
540
+			"post_dummy" => '1'
541
+		);
542
+
543
+		break;
544
+
545
+
546
+	case 4:
547
+		$image_array = array();
548
+		$post_meta = array();
549
+		$image_array[] = "$dummy_image_url/ps/psf4.jpg";
550
+		$image_array[] = "$dummy_image_url/ps/psl4.jpg";
551
+		$image_array[] = "$dummy_image_url/ps/psb4.jpg";
552
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
553
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
554
+
555
+		$post_info[] = array(
556
+			"listing_type" => $post_type,
557
+			"post_title" => 'Jesmond Mansion',
558
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
559 559
 
560 560
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
561 561
 
@@ -565,42 +565,42 @@  discard block
 block discarded – undo
565 565
 
566 566
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
567 567
 
568
-            "post_images" => $image_array,
569
-            "post_category" => array($post_type.'category' => array($category_array[1])),
570
-            "post_tags" => array('Tags', 'Sample Tags'),
571
-            "geodir_video" => '',
572
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
573
-            "geodir_contact" => '(222) 777-1111',
574
-            "geodir_email" => '[email protected]',
575
-            "geodir_website" => 'http://example.com/',
576
-            "geodir_twitter" => 'http://example.com/',
577
-            "geodir_facebook" => 'http://example.com/',
578
-            "geodir_price" => '13000',
579
-            "geodir_property_status" => 'Under Offer',
580
-            'geodir_property_furnishing' => 'Partially furnished',
581
-            'geodir_property_type' => 'Detached house',
582
-            'geodir_property_bedrooms' => '10',
583
-            'geodir_property_bathrooms' => '7',
584
-            'geodir_property_area' => '6600',
585
-            'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace',
586
-            "post_dummy" => '1'
587
-        );
588
-
589
-        break;
590
-
591
-    case 5:
592
-        $image_array = array();
593
-        $post_meta = array();
594
-        $image_array[] = "$dummy_image_url/ps/psf5.jpg";
595
-        $image_array[] = "$dummy_image_url/ps/psl5.jpg";
596
-        $image_array[] = "$dummy_image_url/ps/psb5.jpg";
597
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
598
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
599
-
600
-        $post_info[] = array(
601
-            "listing_type" => $post_type,
602
-            "post_title" => 'Springfield Lodge',
603
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
568
+			"post_images" => $image_array,
569
+			"post_category" => array($post_type.'category' => array($category_array[1])),
570
+			"post_tags" => array('Tags', 'Sample Tags'),
571
+			"geodir_video" => '',
572
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
573
+			"geodir_contact" => '(222) 777-1111',
574
+			"geodir_email" => '[email protected]',
575
+			"geodir_website" => 'http://example.com/',
576
+			"geodir_twitter" => 'http://example.com/',
577
+			"geodir_facebook" => 'http://example.com/',
578
+			"geodir_price" => '13000',
579
+			"geodir_property_status" => 'Under Offer',
580
+			'geodir_property_furnishing' => 'Partially furnished',
581
+			'geodir_property_type' => 'Detached house',
582
+			'geodir_property_bedrooms' => '10',
583
+			'geodir_property_bathrooms' => '7',
584
+			'geodir_property_area' => '6600',
585
+			'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace',
586
+			"post_dummy" => '1'
587
+		);
588
+
589
+		break;
590
+
591
+	case 5:
592
+		$image_array = array();
593
+		$post_meta = array();
594
+		$image_array[] = "$dummy_image_url/ps/psf5.jpg";
595
+		$image_array[] = "$dummy_image_url/ps/psl5.jpg";
596
+		$image_array[] = "$dummy_image_url/ps/psb5.jpg";
597
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
598
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
599
+
600
+		$post_info[] = array(
601
+			"listing_type" => $post_type,
602
+			"post_title" => 'Springfield Lodge',
603
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
604 604
 
605 605
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
606 606
 
@@ -610,42 +610,42 @@  discard block
 block discarded – undo
610 610
 
611 611
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
612 612
 
613
-            "post_images" => $image_array,
614
-            "post_category" => array($post_type.'category' => array($category_array[1])),
615
-            "post_tags" => array('Tags', 'Sample Tags'),
616
-            "geodir_video" => '',
617
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
618
-            "geodir_contact" => '(222) 777-1111',
619
-            "geodir_email" => '[email protected]',
620
-            "geodir_website" => 'http://example.com/',
621
-            "geodir_twitter" => 'http://example.com/',
622
-            "geodir_facebook" => 'http://example.com/',
623
-            "geodir_price" => '1800',
624
-            "geodir_property_status" => 'For Rent',
625
-            'geodir_property_furnishing' => 'Optional',
626
-            'geodir_property_type' => 'Detached house',
627
-            'geodir_property_bedrooms' => '4',
628
-            'geodir_property_bathrooms' => '3',
629
-            'geodir_property_area' => '3700',
630
-            'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden',
631
-            "post_dummy" => '1'
632
-        );
633
-
634
-        break;
635
-
636
-    case 6:
637
-        $image_array = array();
638
-        $post_meta = array();
639
-        $image_array[] = "$dummy_image_url/ps/psf6.jpg";
640
-        $image_array[] = "$dummy_image_url/ps/psl6.jpg";
641
-        $image_array[] = "$dummy_image_url/ps/psb5.jpg";
642
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
643
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
644
-
645
-        $post_info[] = array(
646
-            "listing_type" => $post_type,
647
-            "post_title" => 'Forrest Park',
648
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
613
+			"post_images" => $image_array,
614
+			"post_category" => array($post_type.'category' => array($category_array[1])),
615
+			"post_tags" => array('Tags', 'Sample Tags'),
616
+			"geodir_video" => '',
617
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
618
+			"geodir_contact" => '(222) 777-1111',
619
+			"geodir_email" => '[email protected]',
620
+			"geodir_website" => 'http://example.com/',
621
+			"geodir_twitter" => 'http://example.com/',
622
+			"geodir_facebook" => 'http://example.com/',
623
+			"geodir_price" => '1800',
624
+			"geodir_property_status" => 'For Rent',
625
+			'geodir_property_furnishing' => 'Optional',
626
+			'geodir_property_type' => 'Detached house',
627
+			'geodir_property_bedrooms' => '4',
628
+			'geodir_property_bathrooms' => '3',
629
+			'geodir_property_area' => '3700',
630
+			'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden',
631
+			"post_dummy" => '1'
632
+		);
633
+
634
+		break;
635
+
636
+	case 6:
637
+		$image_array = array();
638
+		$post_meta = array();
639
+		$image_array[] = "$dummy_image_url/ps/psf6.jpg";
640
+		$image_array[] = "$dummy_image_url/ps/psl6.jpg";
641
+		$image_array[] = "$dummy_image_url/ps/psb5.jpg";
642
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
643
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
644
+
645
+		$post_info[] = array(
646
+			"listing_type" => $post_type,
647
+			"post_title" => 'Forrest Park',
648
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
649 649
 
650 650
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
651 651
 
@@ -655,42 +655,42 @@  discard block
 block discarded – undo
655 655
 
656 656
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
657 657
 
658
-            "post_images" => $image_array,
659
-            "post_category" => array($post_type.'category' => array($category_array[1])),
660
-            "post_tags" => array('Tags', 'Sample Tags'),
661
-            "geodir_video" => '',
662
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
663
-            "geodir_contact" => '(222) 777-1111',
664
-            "geodir_email" => '[email protected]',
665
-            "geodir_website" => 'http://example.com/',
666
-            "geodir_twitter" => 'http://example.com/',
667
-            "geodir_facebook" => 'http://example.com/',
668
-            "geodir_price" => '2700',
669
-            "geodir_property_status" => 'For Rent',
670
-            'geodir_property_furnishing' => 'Unfurnished',
671
-            'geodir_property_type' => 'Detached house',
672
-            'geodir_property_bedrooms' => '5',
673
-            'geodir_property_bathrooms' => '4',
674
-            'geodir_property_area' => '2250',
675
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway',
676
-            "post_dummy" => '1'
677
-        );
678
-
679
-        break;
680
-
681
-    case 7:
682
-        $image_array = array();
683
-        $post_meta = array();
684
-        $image_array[] = "$dummy_image_url/ps/psf7.jpg";
685
-        $image_array[] = "$dummy_image_url/ps/psl4.jpg";
686
-        $image_array[] = "$dummy_image_url/ps/psb4.jpg";
687
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
688
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
689
-
690
-        $post_info[] = array(
691
-            "listing_type" => $post_type,
692
-            "post_title" => 'Fraser Suites',
693
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
658
+			"post_images" => $image_array,
659
+			"post_category" => array($post_type.'category' => array($category_array[1])),
660
+			"post_tags" => array('Tags', 'Sample Tags'),
661
+			"geodir_video" => '',
662
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
663
+			"geodir_contact" => '(222) 777-1111',
664
+			"geodir_email" => '[email protected]',
665
+			"geodir_website" => 'http://example.com/',
666
+			"geodir_twitter" => 'http://example.com/',
667
+			"geodir_facebook" => 'http://example.com/',
668
+			"geodir_price" => '2700',
669
+			"geodir_property_status" => 'For Rent',
670
+			'geodir_property_furnishing' => 'Unfurnished',
671
+			'geodir_property_type' => 'Detached house',
672
+			'geodir_property_bedrooms' => '5',
673
+			'geodir_property_bathrooms' => '4',
674
+			'geodir_property_area' => '2250',
675
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway',
676
+			"post_dummy" => '1'
677
+		);
678
+
679
+		break;
680
+
681
+	case 7:
682
+		$image_array = array();
683
+		$post_meta = array();
684
+		$image_array[] = "$dummy_image_url/ps/psf7.jpg";
685
+		$image_array[] = "$dummy_image_url/ps/psl4.jpg";
686
+		$image_array[] = "$dummy_image_url/ps/psb4.jpg";
687
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
688
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
689
+
690
+		$post_info[] = array(
691
+			"listing_type" => $post_type,
692
+			"post_title" => 'Fraser Suites',
693
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
694 694
 
695 695
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
696 696
 
@@ -700,42 +700,42 @@  discard block
 block discarded – undo
700 700
 
701 701
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
702 702
 
703
-            "post_images" => $image_array,
704
-            "post_category" => array($post_type.'category' => array($category_array[0])),
705
-            "post_tags" => array('Tags', 'Sample Tags'),
706
-            "geodir_video" => '',
707
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
708
-            "geodir_contact" => '(222) 777-1111',
709
-            "geodir_email" => '[email protected]',
710
-            "geodir_website" => 'http://example.com/',
711
-            "geodir_twitter" => 'http://example.com/',
712
-            "geodir_facebook" => 'http://example.com/',
713
-            "geodir_price" => '1450',
714
-            "geodir_property_status" => 'For Rent',
715
-            'geodir_property_furnishing' => 'Unfurnished',
716
-            'geodir_property_type' => 'Apartment',
717
-            'geodir_property_bedrooms' => '3',
718
-            'geodir_property_bathrooms' => '2',
719
-            'geodir_property_area' => '1250',
720
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing',
721
-            "post_dummy" => '1'
722
-        );
723
-
724
-        break;
725
-
726
-    case 8:
727
-        $image_array = array();
728
-        $post_meta = array();
729
-        $image_array[] = "$dummy_image_url/ps/psf8.jpg";
730
-        $image_array[] = "$dummy_image_url/ps/psl2.jpg";
731
-        $image_array[] = "$dummy_image_url/ps/psb2.jpg";
732
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
733
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
734
-
735
-        $post_info[] = array(
736
-            "listing_type" => $post_type,
737
-            "post_title" => 'Richmore Apartments',
738
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
703
+			"post_images" => $image_array,
704
+			"post_category" => array($post_type.'category' => array($category_array[0])),
705
+			"post_tags" => array('Tags', 'Sample Tags'),
706
+			"geodir_video" => '',
707
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
708
+			"geodir_contact" => '(222) 777-1111',
709
+			"geodir_email" => '[email protected]',
710
+			"geodir_website" => 'http://example.com/',
711
+			"geodir_twitter" => 'http://example.com/',
712
+			"geodir_facebook" => 'http://example.com/',
713
+			"geodir_price" => '1450',
714
+			"geodir_property_status" => 'For Rent',
715
+			'geodir_property_furnishing' => 'Unfurnished',
716
+			'geodir_property_type' => 'Apartment',
717
+			'geodir_property_bedrooms' => '3',
718
+			'geodir_property_bathrooms' => '2',
719
+			'geodir_property_area' => '1250',
720
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing',
721
+			"post_dummy" => '1'
722
+		);
723
+
724
+		break;
725
+
726
+	case 8:
727
+		$image_array = array();
728
+		$post_meta = array();
729
+		$image_array[] = "$dummy_image_url/ps/psf8.jpg";
730
+		$image_array[] = "$dummy_image_url/ps/psl2.jpg";
731
+		$image_array[] = "$dummy_image_url/ps/psb2.jpg";
732
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
733
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
734
+
735
+		$post_info[] = array(
736
+			"listing_type" => $post_type,
737
+			"post_title" => 'Richmore Apartments',
738
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
739 739
 
740 740
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
741 741
 
@@ -745,43 +745,43 @@  discard block
 block discarded – undo
745 745
 
746 746
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
747 747
 
748
-            "post_images" => $image_array,
749
-            "post_category" => array($post_type.'category' => array($category_array[0])),
750
-            "post_tags" => array('Tags', 'Sample Tags'),
751
-            "geodir_video" => '',
752
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
753
-            "geodir_contact" => '(222) 777-1111',
754
-            "geodir_email" => '[email protected]',
755
-            "geodir_website" => 'http://example.com/',
756
-            "geodir_twitter" => 'http://example.com/',
757
-            "geodir_facebook" => 'http://example.com/',
758
-            "geodir_price" => '2000',
759
-            "geodir_property_status" => 'For Rent',
760
-            'geodir_property_furnishing' => 'Unfurnished',
761
-            'geodir_property_type' => 'Apartment',
762
-            'geodir_property_bedrooms' => '2',
763
-            'geodir_property_bathrooms' => '2',
764
-            'geodir_property_area' => '1750',
765
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
766
-            "post_dummy" => '1'
767
-        );
768
-
769
-        break;
770
-
771
-
772
-    case 9:
773
-        $image_array = array();
774
-        $post_meta = array();
775
-        $image_array[] = "$dummy_image_url/ps/psf9.jpg";
776
-        $image_array[] = "$dummy_image_url/ps/psc9.jpg";
777
-        $image_array[] = "$dummy_image_url/ps/psb2.jpg";
778
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
779
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
780
-
781
-        $post_info[] = array(
782
-            "listing_type" => $post_type,
783
-            "post_title" => 'Hotel Alpina',
784
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
748
+			"post_images" => $image_array,
749
+			"post_category" => array($post_type.'category' => array($category_array[0])),
750
+			"post_tags" => array('Tags', 'Sample Tags'),
751
+			"geodir_video" => '',
752
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
753
+			"geodir_contact" => '(222) 777-1111',
754
+			"geodir_email" => '[email protected]',
755
+			"geodir_website" => 'http://example.com/',
756
+			"geodir_twitter" => 'http://example.com/',
757
+			"geodir_facebook" => 'http://example.com/',
758
+			"geodir_price" => '2000',
759
+			"geodir_property_status" => 'For Rent',
760
+			'geodir_property_furnishing' => 'Unfurnished',
761
+			'geodir_property_type' => 'Apartment',
762
+			'geodir_property_bedrooms' => '2',
763
+			'geodir_property_bathrooms' => '2',
764
+			'geodir_property_area' => '1750',
765
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
766
+			"post_dummy" => '1'
767
+		);
768
+
769
+		break;
770
+
771
+
772
+	case 9:
773
+		$image_array = array();
774
+		$post_meta = array();
775
+		$image_array[] = "$dummy_image_url/ps/psf9.jpg";
776
+		$image_array[] = "$dummy_image_url/ps/psc9.jpg";
777
+		$image_array[] = "$dummy_image_url/ps/psb2.jpg";
778
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
779
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
780
+
781
+		$post_info[] = array(
782
+			"listing_type" => $post_type,
783
+			"post_title" => 'Hotel Alpina',
784
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
785 785
 
786 786
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
787 787
 
@@ -791,39 +791,39 @@  discard block
 block discarded – undo
791 791
 
792 792
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
793 793
 
794
-            "post_images" => $image_array,
795
-            "post_category" => array($post_type.'category' => array($category_array[2])),
796
-            "post_tags" => array('Tags', 'Sample Tags'),
797
-            "geodir_video" => '',
798
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
799
-            "geodir_contact" => '(222) 777-1111',
800
-            "geodir_email" => '[email protected]',
801
-            "geodir_website" => 'http://example.com/',
802
-            "geodir_twitter" => 'http://example.com/',
803
-            "geodir_facebook" => 'http://example.com/',
804
-            "geodir_price" => '60000',
805
-            "geodir_property_status" => 'For Rent',
806
-            'geodir_property_furnishing' => 'Furnished',
807
-            'geodir_property_type' => 'Hotel',
808
-            'geodir_property_bedrooms' => '120',
809
-            'geodir_property_bathrooms' => '133',
810
-            'geodir_property_area' => '35000',
811
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
812
-            "post_dummy" => '1'
813
-        );
814
-
815
-        break;
816
-
817
-    case 10:
818
-        $image_array = array();
819
-        $post_meta = array();
820
-        $image_array[] = "$dummy_image_url/ps/psf10.jpg";
821
-        $image_array[] = "$dummy_image_url/ps/psf102.jpg";
822
-
823
-        $post_info[] = array(
824
-            "listing_type" => $post_type,
825
-            "post_title" => 'Development Land',
826
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
794
+			"post_images" => $image_array,
795
+			"post_category" => array($post_type.'category' => array($category_array[2])),
796
+			"post_tags" => array('Tags', 'Sample Tags'),
797
+			"geodir_video" => '',
798
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
799
+			"geodir_contact" => '(222) 777-1111',
800
+			"geodir_email" => '[email protected]',
801
+			"geodir_website" => 'http://example.com/',
802
+			"geodir_twitter" => 'http://example.com/',
803
+			"geodir_facebook" => 'http://example.com/',
804
+			"geodir_price" => '60000',
805
+			"geodir_property_status" => 'For Rent',
806
+			'geodir_property_furnishing' => 'Furnished',
807
+			'geodir_property_type' => 'Hotel',
808
+			'geodir_property_bedrooms' => '120',
809
+			'geodir_property_bathrooms' => '133',
810
+			'geodir_property_area' => '35000',
811
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
812
+			"post_dummy" => '1'
813
+		);
814
+
815
+		break;
816
+
817
+	case 10:
818
+		$image_array = array();
819
+		$post_meta = array();
820
+		$image_array[] = "$dummy_image_url/ps/psf10.jpg";
821
+		$image_array[] = "$dummy_image_url/ps/psf102.jpg";
822
+
823
+		$post_info[] = array(
824
+			"listing_type" => $post_type,
825
+			"post_title" => 'Development Land',
826
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
827 827
 
828 828
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
829 829
 
@@ -833,93 +833,93 @@  discard block
 block discarded – undo
833 833
 
834 834
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
835 835
 
836
-            "post_images" => $image_array,
837
-            "post_category" => array($post_type.'category' => array($category_array[3])),
838
-            "post_tags" => array('Tags', 'Sample Tags'),
839
-            "geodir_video" => '',
840
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
841
-            "geodir_contact" => '(222) 777-1111',
842
-            "geodir_email" => '[email protected]',
843
-            "geodir_website" => 'http://example.com/',
844
-            "geodir_twitter" => 'http://example.com/',
845
-            "geodir_facebook" => 'http://example.com/',
846
-            "geodir_price" => '800',
847
-            "geodir_property_status" => 'For Rent',
848
-            'geodir_property_furnishing' => '',
849
-            'geodir_property_type' => 'Land',
850
-            'geodir_property_bedrooms' => '',
851
-            'geodir_property_bathrooms' => '',
852
-            'geodir_property_area' => '250000',
853
-            'geodir_property_features' => '',
854
-            "post_dummy" => '1'
855
-        );
856
-
857
-        break;
836
+			"post_images" => $image_array,
837
+			"post_category" => array($post_type.'category' => array($category_array[3])),
838
+			"post_tags" => array('Tags', 'Sample Tags'),
839
+			"geodir_video" => '',
840
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
841
+			"geodir_contact" => '(222) 777-1111',
842
+			"geodir_email" => '[email protected]',
843
+			"geodir_website" => 'http://example.com/',
844
+			"geodir_twitter" => 'http://example.com/',
845
+			"geodir_facebook" => 'http://example.com/',
846
+			"geodir_price" => '800',
847
+			"geodir_property_status" => 'For Rent',
848
+			'geodir_property_furnishing' => '',
849
+			'geodir_property_type' => 'Land',
850
+			'geodir_property_bedrooms' => '',
851
+			'geodir_property_bathrooms' => '',
852
+			'geodir_property_area' => '250000',
853
+			'geodir_property_features' => '',
854
+			"post_dummy" => '1'
855
+		);
856
+
857
+		break;
858 858
 
859 859
 } // end of switch
860 860
 
861 861
 foreach ($post_info as $post_info) {
862
-    $default_location = geodir_get_default_location();
863
-    if ($city_bound_lat1 > $city_bound_lat2)
864
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
865
-    else
866
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
862
+	$default_location = geodir_get_default_location();
863
+	if ($city_bound_lat1 > $city_bound_lat2)
864
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
865
+	else
866
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
867 867
 
868 868
 
869
-    if ($city_bound_lng1 > $city_bound_lng2)
870
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
871
-    else
872
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
869
+	if ($city_bound_lng1 > $city_bound_lng2)
870
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
871
+	else
872
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
873 873
 
874
-    $load_map = get_option('geodir_load_map');
874
+	$load_map = get_option('geodir_load_map');
875 875
     
876
-    if ($load_map == 'osm') {
877
-        $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
878
-    } else {
879
-        $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
880
-    }
881
-
882
-    $postal_code = '';
883
-    if (!empty($post_address)) {
884
-        if ($load_map == 'osm') {
885
-            $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : '';
886
-            $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : '';
887
-        } else {
888
-            $addresses = array();
889
-            $addresses_default = array();
876
+	if ($load_map == 'osm') {
877
+		$post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
878
+	} else {
879
+		$post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
880
+	}
881
+
882
+	$postal_code = '';
883
+	if (!empty($post_address)) {
884
+		if ($load_map == 'osm') {
885
+			$address = !empty($post_address->formatted_address) ? $post_address->formatted_address : '';
886
+			$postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : '';
887
+		} else {
888
+			$addresses = array();
889
+			$addresses_default = array();
890 890
             
891
-            foreach ($post_address as $add_key => $add_value) {
892
-                if ($add_key < 2 && !empty($add_value->long_name)) {
893
-                    $addresses_default[] = $add_value->long_name;
894
-                }
895
-                if ($add_value->types[0] == 'postal_code') {
896
-                    $postal_code = $add_value->long_name;
897
-                }
898
-                if ($add_value->types[0] == 'street_number') {
899
-                    $addresses[] = $add_value->long_name;
900
-                }
901
-                if ($add_value->types[0] == 'route') {
902
-                    $addresses[] = $add_value->long_name;
903
-                }
904
-                if ($add_value->types[0] == 'neighborhood') {
905
-                    $addresses[] = $add_value->long_name;
906
-                }
907
-                if ($add_value->types[0] == 'sublocality') {
908
-                    $addresses[] = $add_value->long_name;
909
-                }
910
-            }
911
-            $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
912
-        }
913
-
914
-        $post_info['post_address'] = !empty($address) ? $address : $default_location->city;
915
-        $post_info['post_city'] = $default_location->city;
916
-        $post_info['post_region'] = $default_location->region;
917
-        $post_info['post_country'] = $default_location->country;
918
-        $post_info['post_zip'] = $postal_code;
919
-        $post_info['post_latitude'] = $dummy_post_latitude;
920
-        $post_info['post_longitude'] = $dummy_post_longitude;
921
-    }
891
+			foreach ($post_address as $add_key => $add_value) {
892
+				if ($add_key < 2 && !empty($add_value->long_name)) {
893
+					$addresses_default[] = $add_value->long_name;
894
+				}
895
+				if ($add_value->types[0] == 'postal_code') {
896
+					$postal_code = $add_value->long_name;
897
+				}
898
+				if ($add_value->types[0] == 'street_number') {
899
+					$addresses[] = $add_value->long_name;
900
+				}
901
+				if ($add_value->types[0] == 'route') {
902
+					$addresses[] = $add_value->long_name;
903
+				}
904
+				if ($add_value->types[0] == 'neighborhood') {
905
+					$addresses[] = $add_value->long_name;
906
+				}
907
+				if ($add_value->types[0] == 'sublocality') {
908
+					$addresses[] = $add_value->long_name;
909
+				}
910
+			}
911
+			$address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
912
+		}
913
+
914
+		$post_info['post_address'] = !empty($address) ? $address : $default_location->city;
915
+		$post_info['post_city'] = $default_location->city;
916
+		$post_info['post_region'] = $default_location->region;
917
+		$post_info['post_country'] = $default_location->country;
918
+		$post_info['post_zip'] = $postal_code;
919
+		$post_info['post_latitude'] = $dummy_post_latitude;
920
+		$post_info['post_longitude'] = $dummy_post_longitude;
921
+	}
922 922
     
923
-    geodir_save_listing($post_info, true);
924
-    echo 1;
923
+	geodir_save_listing($post_info, true);
924
+	echo 1;
925 925
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  * @package GeoDirectory
7 7
  */
8 8
 
9
-function geodir_property_rent_custom_fields($post_type='gd_place',$package_id=''){
9
+function geodir_property_rent_custom_fields($post_type = 'gd_place', $package_id = '') {
10 10
     $fields = array();
11
-    $package = ($package_id=='') ? '' : array($package_id);
11
+    $package = ($package_id == '') ? '' : array($package_id);
12 12
 
13 13
     // price
14 14
     $fields[] = array('listing_type' => $post_type,
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                       'default_value'       =>  '',
79 79
                       'show_in' 	        =>  '[detail],[listing]',
80 80
                       'is_required'         =>  true,
81
-                      'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'),
81
+                      'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional', 'geodirectory'),
82 82
                       'validation_pattern'  =>  '',
83 83
                       'validation_msg'      =>  '',
84 84
                       'required_msg'        =>  '',
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                       'default_value'       =>  '',
102 102
                       'show_in' 	        =>  '[detail],[listing]',
103 103
                       'is_required'         =>  true,
104
-                      'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'),
104
+                      'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land', 'geodirectory'),
105 105
                       'validation_pattern'  =>  '',
106 106
                       'validation_msg'      =>  '',
107 107
                       'required_msg'        =>  '',
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                       'default_value'       =>  '',
125 125
                       'show_in' 	        =>  '[detail],[listing]',
126 126
                       'is_required'         =>  true,
127
-                      'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
127
+                      'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'),
128 128
                       'validation_pattern'  =>  '',
129 129
                       'validation_msg'      =>  '',
130 130
                       'required_msg'        =>  '',
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                       'default_value'       =>  '',
148 148
                       'show_in' 	        =>  '[detail],[listing]',
149 149
                       'is_required'         =>  true,
150
-                      'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
150
+                      'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'),
151 151
                       'validation_pattern'  =>  '',
152 152
                       'validation_msg'      =>  '',
153 153
                       'required_msg'        =>  '',
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                       'default_value'       =>  '',
193 193
                       'show_in' 	        =>  '[detail],[listing]',
194 194
                       'is_required'         =>  true,
195
-                      'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'),
195
+                      'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace', 'geodirectory'),
196 196
                       'validation_pattern'  =>  '',
197 197
                       'validation_msg'      =>  '',
198 198
                       'required_msg'        =>  '',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     return  $fields;
216 216
 }
217 217
 
218
-function geodir_property_rent_custom_fields_advanced_search($post_type='gd_place') {
218
+function geodir_property_rent_custom_fields_advanced_search($post_type = 'gd_place') {
219 219
 
220 220
 
221 221
     $fields = array();
@@ -374,34 +374,34 @@  discard block
 block discarded – undo
374 374
     return $fields;
375 375
 }
376 376
 
377
-global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index;
377
+global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2, $wpdb, $current_user, $dummy_post_index;
378 378
 $post_info = array();
379 379
 $image_array = array();
380 380
 $post_meta = array();
381 381
 $category_array = array('Apartments', 'Houses', 'Commercial', 'Land');
382 382
 
383
-if($dummy_post_index==1){
383
+if ($dummy_post_index == 1) {
384 384
     // add the dummy categories
385
-    geodir_dummy_data_taxonomies($post_type,$category_array );
385
+    geodir_dummy_data_taxonomies($post_type, $category_array);
386 386
 
387 387
     // add the dummy custom fields
388 388
     $fields = geodir_property_rent_custom_fields($post_type);
389 389
     geodir_create_dummy_fields($fields);
390 390
 
391 391
     // update the type currently installed
392
-    update_option($post_type.'_dummy_data_type','property_rent');
392
+    update_option($post_type.'_dummy_data_type', 'property_rent');
393 393
 
394 394
     // add the advanced search fields
395
-    if (defined('GEODIRADVANCESEARCH_VERSION')){
395
+    if (defined('GEODIRADVANCESEARCH_VERSION')) {
396 396
         $search_fields = geodir_property_rent_custom_fields_advanced_search($post_type);
397
-        foreach($search_fields as $sfield){
398
-            geodir_custom_advance_search_field_save( $sfield );
397
+        foreach ($search_fields as $sfield) {
398
+            geodir_custom_advance_search_field_save($sfield);
399 399
         }
400 400
     }
401 401
 }
402 402
 
403 403
 if (geodir_dummy_folder_exists())
404
-    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
404
+    $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy";
405 405
 else
406 406
     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
407 407
 
Please login to merge, or discard this patch.
geodirectory-admin/dummy-data/property_sale.php 3 patches
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,10 +17,11 @@  discard block
 block discarded – undo
17 17
     update_option($post_type.'_dummy_data_type','standard_places');
18 18
 }
19 19
 
20
-if (geodir_dummy_folder_exists())
20
+if (geodir_dummy_folder_exists()) {
21 21
     $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
22
-else
22
+} else {
23 23
     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
24
+}
24 25
 
25 26
 $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
26 27
 
@@ -1815,16 +1816,18 @@  discard block
 block discarded – undo
1815 1816
 echo '###4.1';
1816 1817
 foreach ($post_info as $post_info) {echo '###5';
1817 1818
     $default_location = geodir_get_default_location();
1818
-    if ($city_bound_lat1 > $city_bound_lat2)
1819
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1820
-    else
1821
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1819
+    if ($city_bound_lat1 > $city_bound_lat2) {
1820
+            $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1821
+    } else {
1822
+            $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1823
+    }
1822 1824
 
1823 1825
 
1824
-    if ($city_bound_lng1 > $city_bound_lng2)
1825
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1826
-    else
1827
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1826
+    if ($city_bound_lng1 > $city_bound_lng2) {
1827
+            $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1828
+    } else {
1829
+            $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1830
+    }
1828 1831
 
1829 1832
     $load_map = get_option('geodir_load_map');
1830 1833
     
Please login to merge, or discard this patch.
Indentation   +676 added lines, -676 removed lines patch added patch discarded remove patch
@@ -7,256 +7,256 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 function geodir_property_sale_custom_fields($post_type='gd_place',$package_id=''){
10
-    $fields = array();
11
-    $package = ($package_id=='') ? '' : array($package_id);
12
-
13
-    // price
14
-    $fields[] = array('listing_type' => $post_type,
15
-                      'field_type'          =>  'text',
16
-                      'data_type'           =>  'FLOAT',
17
-                      'decimal_point'       =>  '2',
18
-                      'admin_title'         =>  __('Price', 'geodirectory'),
19
-                      'site_title'          =>  __('Price', 'geodirectory'),
20
-                      'admin_desc'          =>  __('Enter the price in $ (no currency symbol)', 'geodirectory'),
21
-                      'htmlvar_name'        =>  'price',
22
-                      'is_active'           =>  true,
23
-                      'for_admin_use'       =>  false,
24
-                      'default_value'       =>  '',
25
-                      'show_in' 	        =>  '[detail],[listing]',
26
-                      'is_required'         =>  false,
27
-                      'validation_pattern'  =>  '\d+(\.\d{2})?',
28
-                      'validation_msg'      =>  'Please enter number and decimal only ie: 100.50',
29
-                      'required_msg'        =>  '',
30
-                      'field_icon'          =>  'fa fa-usd',
31
-                      'css_class'           =>  '',
32
-                      'cat_sort'            =>  true,
33
-                      'cat_filter'	        =>  true,
34
-                      'extra'        =>  array(
35
-                          'is_price'                  =>  1,
36
-                          'thousand_separator'        =>  'comma',
37
-                          'decimal_separator'         =>  'period',
38
-                          'decimal_display'           =>  'if',
39
-                          'currency_symbol'           =>  '$',
40
-                          'currency_symbol_placement' =>  'left'
41
-                      )
42
-    );
43
-
44
-    // property status
45
-    $fields[] = array('listing_type' => $post_type,
46
-                      'data_type' => 'VARCHAR',
47
-                      'field_type' => 'select',
48
-                      'field_type_key' => 'property_status',
49
-                      'is_active' => 1,
50
-                      'for_admin_use' => 0,
51
-                      'is_default' => 0,
52
-                      'admin_title' => __('Property Status', 'geodirectory'),
53
-                      'admin_desc' => __('Enter the status of the property.', 'geodirectory'),
54
-                      'site_title' => __('Property Status', 'geodirectory'),
55
-                      'htmlvar_name' => 'property_status',
56
-                      'default_value' => '',
57
-                      'is_required' => '1',
58
-                      'required_msg' => '',
59
-                      'show_in'   =>  '[detail],[listing]',
60
-                      'show_on_pkg' => $package,
61
-                      'option_values' => 'Select Status/,For Sale,Sold,Under Offer',
62
-                      'field_icon' => 'fa fa-home',
63
-                      'css_class' => '',
64
-                      'cat_sort' => 1,
65
-                      'cat_filter' => 1,
66
-    );
67
-
68
-    // property furnishing
69
-    $fields[] = array('listing_type' => $post_type,
70
-                      'field_type'          =>  'select',
71
-                      'data_type'           =>  'VARCHAR',
72
-                      'admin_title'         =>  __('Furnishing', 'geodirectory'),
73
-                      'site_title'          =>  __('Furnishing', 'geodirectory'),
74
-                      'admin_desc'          =>  __('Enter the furnishing status of the property.', 'geodirectory'),
75
-                      'htmlvar_name'        =>  'property_furnishing',
76
-                      'is_active'           =>  true,
77
-                      'for_admin_use'       =>  false,
78
-                      'default_value'       =>  '',
79
-                      'show_in' 	        =>  '[detail],[listing]',
80
-                      'is_required'         =>  true,
81
-                      'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'),
82
-                      'validation_pattern'  =>  '',
83
-                      'validation_msg'      =>  '',
84
-                      'required_msg'        =>  '',
85
-                      'field_icon'          =>  'fa fa-th-large',
86
-                      'css_class'           =>  '',
87
-                      'cat_sort'            =>  true,
88
-                      'cat_filter'	        =>  true
89
-    );
90
-
91
-    // property type
92
-    $fields[] = array('listing_type' => $post_type,
93
-                      'field_type'          =>  'select',
94
-                      'data_type'           =>  'VARCHAR',
95
-                      'admin_title'         =>  __('Property Type', 'geodirectory'),
96
-                      'site_title'          =>  __('Property Type', 'geodirectory'),
97
-                      'admin_desc'          =>  __('Select the property type.', 'geodirectory'),
98
-                      'htmlvar_name'        =>  'property_type',
99
-                      'is_active'           =>  true,
100
-                      'for_admin_use'       =>  false,
101
-                      'default_value'       =>  '',
102
-                      'show_in' 	        =>  '[detail],[listing]',
103
-                      'is_required'         =>  true,
104
-                      'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'),
105
-                      'validation_pattern'  =>  '',
106
-                      'validation_msg'      =>  '',
107
-                      'required_msg'        =>  '',
108
-                      'field_icon'          =>  'fa fa-home',
109
-                      'css_class'           =>  '',
110
-                      'cat_sort'            =>  true,
111
-                      'cat_filter'	        =>  true
112
-    );
113
-
114
-    // property bedrooms
115
-    $fields[] = array('listing_type' => $post_type,
116
-                      'field_type'          =>  'select',
117
-                      'data_type'           =>  'VARCHAR',
118
-                      'admin_title'         =>  __('Property Bedrooms', 'geodirectory'),
119
-                      'site_title'          =>  __('Bedrooms', 'geodirectory'),
120
-                      'admin_desc'          =>  __('Select the number of bedrooms', 'geodirectory'),
121
-                      'htmlvar_name'        =>  'property_bedrooms',
122
-                      'is_active'           =>  true,
123
-                      'for_admin_use'       =>  false,
124
-                      'default_value'       =>  '',
125
-                      'show_in' 	        =>  '[detail],[listing]',
126
-                      'is_required'         =>  true,
127
-                      'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
128
-                      'validation_pattern'  =>  '',
129
-                      'validation_msg'      =>  '',
130
-                      'required_msg'        =>  '',
131
-                      'field_icon'          =>  'fa fa-bed',
132
-                      'css_class'           =>  '',
133
-                      'cat_sort'            =>  true,
134
-                      'cat_filter'	        =>  true
135
-    );
136
-
137
-    // property bathrooms
138
-    $fields[] = array('listing_type' => $post_type,
139
-                      'field_type'          =>  'select',
140
-                      'data_type'           =>  'VARCHAR',
141
-                      'admin_title'         =>  __('Property Bathrooms', 'geodirectory'),
142
-                      'site_title'          =>  __('Bathrooms', 'geodirectory'),
143
-                      'admin_desc'          =>  __('Select the number of bathrooms', 'geodirectory'),
144
-                      'htmlvar_name'        =>  'property_bathrooms',
145
-                      'is_active'           =>  true,
146
-                      'for_admin_use'       =>  false,
147
-                      'default_value'       =>  '',
148
-                      'show_in' 	        =>  '[detail],[listing]',
149
-                      'is_required'         =>  true,
150
-                      'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
151
-                      'validation_pattern'  =>  '',
152
-                      'validation_msg'      =>  '',
153
-                      'required_msg'        =>  '',
154
-                      'field_icon'          =>  'fa fa-bold',
155
-                      'css_class'           =>  '',
156
-                      'cat_sort'            =>  true,
157
-                      'cat_filter'	        =>  true
158
-    );
159
-
160
-    // property area
161
-    $fields[] = array('listing_type' => $post_type,
162
-                      'field_type'          =>  'text',
163
-                      'data_type'           =>  'FLOAT',
164
-                      'admin_title'         =>  __('Property Area', 'geodirectory'),
165
-                      'site_title'          =>  __('Area (Sq Ft)', 'geodirectory'),
166
-                      'admin_desc'          =>  __('Enter the Sq Ft value for the property', 'geodirectory'),
167
-                      'htmlvar_name'        =>  'property_area',
168
-                      'is_active'           =>  true,
169
-                      'for_admin_use'       =>  false,
170
-                      'default_value'       =>  '',
171
-                      'show_in' 	        =>  '[detail],[listing]',
172
-                      'is_required'         =>  false,
173
-                      'validation_pattern'  =>  '\d+(\.\d{2})?',
174
-                      'validation_msg'      =>  'Please enter the property area in numbers only: 1500',
175
-                      'required_msg'        =>  '',
176
-                      'field_icon'          =>  'fa fa-area-chart',
177
-                      'css_class'           =>  '',
178
-                      'cat_sort'            =>  true,
179
-                      'cat_filter'	        =>  true
180
-    );
181
-
182
-    // property features
183
-    $fields[] = array('listing_type' => $post_type,
184
-                      'field_type'          =>  'multiselect',
185
-                      'data_type'           =>  'VARCHAR',
186
-                      'admin_title'         =>  __('Property Features', 'geodirectory'),
187
-                      'site_title'          =>  __('Features', 'geodirectory'),
188
-                      'admin_desc'          =>  __('Select the property features.', 'geodirectory'),
189
-                      'htmlvar_name'        =>  'property_features',
190
-                      'is_active'           =>  true,
191
-                      'for_admin_use'       =>  false,
192
-                      'default_value'       =>  '',
193
-                      'show_in' 	        =>  '[detail],[listing]',
194
-                      'is_required'         =>  true,
195
-                      'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'),
196
-                      'validation_pattern'  =>  '',
197
-                      'validation_msg'      =>  '',
198
-                      'required_msg'        =>  '',
199
-                      'field_icon'          =>  'fa fa-plus-square',
200
-                      'css_class'           =>  'gd-comma-list',
201
-                      'cat_sort'            =>  true,
202
-                      'cat_filter'	        =>  true
203
-    );
204
-
205
-
206
-
207
-    /**
208
-     * Filter the array of default custom fields DB table data.
209
-     *
210
-     * @since 1.6.6
211
-     * @param string $fields The default custom fields as an array.
212
-     */
213
-    $fields = apply_filters('geodir_property_sale_custom_fields', $fields);
214
-
215
-    return  $fields;
10
+	$fields = array();
11
+	$package = ($package_id=='') ? '' : array($package_id);
12
+
13
+	// price
14
+	$fields[] = array('listing_type' => $post_type,
15
+					  'field_type'          =>  'text',
16
+					  'data_type'           =>  'FLOAT',
17
+					  'decimal_point'       =>  '2',
18
+					  'admin_title'         =>  __('Price', 'geodirectory'),
19
+					  'site_title'          =>  __('Price', 'geodirectory'),
20
+					  'admin_desc'          =>  __('Enter the price in $ (no currency symbol)', 'geodirectory'),
21
+					  'htmlvar_name'        =>  'price',
22
+					  'is_active'           =>  true,
23
+					  'for_admin_use'       =>  false,
24
+					  'default_value'       =>  '',
25
+					  'show_in' 	        =>  '[detail],[listing]',
26
+					  'is_required'         =>  false,
27
+					  'validation_pattern'  =>  '\d+(\.\d{2})?',
28
+					  'validation_msg'      =>  'Please enter number and decimal only ie: 100.50',
29
+					  'required_msg'        =>  '',
30
+					  'field_icon'          =>  'fa fa-usd',
31
+					  'css_class'           =>  '',
32
+					  'cat_sort'            =>  true,
33
+					  'cat_filter'	        =>  true,
34
+					  'extra'        =>  array(
35
+						  'is_price'                  =>  1,
36
+						  'thousand_separator'        =>  'comma',
37
+						  'decimal_separator'         =>  'period',
38
+						  'decimal_display'           =>  'if',
39
+						  'currency_symbol'           =>  '$',
40
+						  'currency_symbol_placement' =>  'left'
41
+					  )
42
+	);
43
+
44
+	// property status
45
+	$fields[] = array('listing_type' => $post_type,
46
+					  'data_type' => 'VARCHAR',
47
+					  'field_type' => 'select',
48
+					  'field_type_key' => 'property_status',
49
+					  'is_active' => 1,
50
+					  'for_admin_use' => 0,
51
+					  'is_default' => 0,
52
+					  'admin_title' => __('Property Status', 'geodirectory'),
53
+					  'admin_desc' => __('Enter the status of the property.', 'geodirectory'),
54
+					  'site_title' => __('Property Status', 'geodirectory'),
55
+					  'htmlvar_name' => 'property_status',
56
+					  'default_value' => '',
57
+					  'is_required' => '1',
58
+					  'required_msg' => '',
59
+					  'show_in'   =>  '[detail],[listing]',
60
+					  'show_on_pkg' => $package,
61
+					  'option_values' => 'Select Status/,For Sale,Sold,Under Offer',
62
+					  'field_icon' => 'fa fa-home',
63
+					  'css_class' => '',
64
+					  'cat_sort' => 1,
65
+					  'cat_filter' => 1,
66
+	);
67
+
68
+	// property furnishing
69
+	$fields[] = array('listing_type' => $post_type,
70
+					  'field_type'          =>  'select',
71
+					  'data_type'           =>  'VARCHAR',
72
+					  'admin_title'         =>  __('Furnishing', 'geodirectory'),
73
+					  'site_title'          =>  __('Furnishing', 'geodirectory'),
74
+					  'admin_desc'          =>  __('Enter the furnishing status of the property.', 'geodirectory'),
75
+					  'htmlvar_name'        =>  'property_furnishing',
76
+					  'is_active'           =>  true,
77
+					  'for_admin_use'       =>  false,
78
+					  'default_value'       =>  '',
79
+					  'show_in' 	        =>  '[detail],[listing]',
80
+					  'is_required'         =>  true,
81
+					  'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'),
82
+					  'validation_pattern'  =>  '',
83
+					  'validation_msg'      =>  '',
84
+					  'required_msg'        =>  '',
85
+					  'field_icon'          =>  'fa fa-th-large',
86
+					  'css_class'           =>  '',
87
+					  'cat_sort'            =>  true,
88
+					  'cat_filter'	        =>  true
89
+	);
90
+
91
+	// property type
92
+	$fields[] = array('listing_type' => $post_type,
93
+					  'field_type'          =>  'select',
94
+					  'data_type'           =>  'VARCHAR',
95
+					  'admin_title'         =>  __('Property Type', 'geodirectory'),
96
+					  'site_title'          =>  __('Property Type', 'geodirectory'),
97
+					  'admin_desc'          =>  __('Select the property type.', 'geodirectory'),
98
+					  'htmlvar_name'        =>  'property_type',
99
+					  'is_active'           =>  true,
100
+					  'for_admin_use'       =>  false,
101
+					  'default_value'       =>  '',
102
+					  'show_in' 	        =>  '[detail],[listing]',
103
+					  'is_required'         =>  true,
104
+					  'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'),
105
+					  'validation_pattern'  =>  '',
106
+					  'validation_msg'      =>  '',
107
+					  'required_msg'        =>  '',
108
+					  'field_icon'          =>  'fa fa-home',
109
+					  'css_class'           =>  '',
110
+					  'cat_sort'            =>  true,
111
+					  'cat_filter'	        =>  true
112
+	);
113
+
114
+	// property bedrooms
115
+	$fields[] = array('listing_type' => $post_type,
116
+					  'field_type'          =>  'select',
117
+					  'data_type'           =>  'VARCHAR',
118
+					  'admin_title'         =>  __('Property Bedrooms', 'geodirectory'),
119
+					  'site_title'          =>  __('Bedrooms', 'geodirectory'),
120
+					  'admin_desc'          =>  __('Select the number of bedrooms', 'geodirectory'),
121
+					  'htmlvar_name'        =>  'property_bedrooms',
122
+					  'is_active'           =>  true,
123
+					  'for_admin_use'       =>  false,
124
+					  'default_value'       =>  '',
125
+					  'show_in' 	        =>  '[detail],[listing]',
126
+					  'is_required'         =>  true,
127
+					  'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
128
+					  'validation_pattern'  =>  '',
129
+					  'validation_msg'      =>  '',
130
+					  'required_msg'        =>  '',
131
+					  'field_icon'          =>  'fa fa-bed',
132
+					  'css_class'           =>  '',
133
+					  'cat_sort'            =>  true,
134
+					  'cat_filter'	        =>  true
135
+	);
136
+
137
+	// property bathrooms
138
+	$fields[] = array('listing_type' => $post_type,
139
+					  'field_type'          =>  'select',
140
+					  'data_type'           =>  'VARCHAR',
141
+					  'admin_title'         =>  __('Property Bathrooms', 'geodirectory'),
142
+					  'site_title'          =>  __('Bathrooms', 'geodirectory'),
143
+					  'admin_desc'          =>  __('Select the number of bathrooms', 'geodirectory'),
144
+					  'htmlvar_name'        =>  'property_bathrooms',
145
+					  'is_active'           =>  true,
146
+					  'for_admin_use'       =>  false,
147
+					  'default_value'       =>  '',
148
+					  'show_in' 	        =>  '[detail],[listing]',
149
+					  'is_required'         =>  true,
150
+					  'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
151
+					  'validation_pattern'  =>  '',
152
+					  'validation_msg'      =>  '',
153
+					  'required_msg'        =>  '',
154
+					  'field_icon'          =>  'fa fa-bold',
155
+					  'css_class'           =>  '',
156
+					  'cat_sort'            =>  true,
157
+					  'cat_filter'	        =>  true
158
+	);
159
+
160
+	// property area
161
+	$fields[] = array('listing_type' => $post_type,
162
+					  'field_type'          =>  'text',
163
+					  'data_type'           =>  'FLOAT',
164
+					  'admin_title'         =>  __('Property Area', 'geodirectory'),
165
+					  'site_title'          =>  __('Area (Sq Ft)', 'geodirectory'),
166
+					  'admin_desc'          =>  __('Enter the Sq Ft value for the property', 'geodirectory'),
167
+					  'htmlvar_name'        =>  'property_area',
168
+					  'is_active'           =>  true,
169
+					  'for_admin_use'       =>  false,
170
+					  'default_value'       =>  '',
171
+					  'show_in' 	        =>  '[detail],[listing]',
172
+					  'is_required'         =>  false,
173
+					  'validation_pattern'  =>  '\d+(\.\d{2})?',
174
+					  'validation_msg'      =>  'Please enter the property area in numbers only: 1500',
175
+					  'required_msg'        =>  '',
176
+					  'field_icon'          =>  'fa fa-area-chart',
177
+					  'css_class'           =>  '',
178
+					  'cat_sort'            =>  true,
179
+					  'cat_filter'	        =>  true
180
+	);
181
+
182
+	// property features
183
+	$fields[] = array('listing_type' => $post_type,
184
+					  'field_type'          =>  'multiselect',
185
+					  'data_type'           =>  'VARCHAR',
186
+					  'admin_title'         =>  __('Property Features', 'geodirectory'),
187
+					  'site_title'          =>  __('Features', 'geodirectory'),
188
+					  'admin_desc'          =>  __('Select the property features.', 'geodirectory'),
189
+					  'htmlvar_name'        =>  'property_features',
190
+					  'is_active'           =>  true,
191
+					  'for_admin_use'       =>  false,
192
+					  'default_value'       =>  '',
193
+					  'show_in' 	        =>  '[detail],[listing]',
194
+					  'is_required'         =>  true,
195
+					  'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'),
196
+					  'validation_pattern'  =>  '',
197
+					  'validation_msg'      =>  '',
198
+					  'required_msg'        =>  '',
199
+					  'field_icon'          =>  'fa fa-plus-square',
200
+					  'css_class'           =>  'gd-comma-list',
201
+					  'cat_sort'            =>  true,
202
+					  'cat_filter'	        =>  true
203
+	);
204
+
205
+
206
+
207
+	/**
208
+	 * Filter the array of default custom fields DB table data.
209
+	 *
210
+	 * @since 1.6.6
211
+	 * @param string $fields The default custom fields as an array.
212
+	 */
213
+	$fields = apply_filters('geodir_property_sale_custom_fields', $fields);
214
+
215
+	return  $fields;
216 216
 }
217 217
 
218 218
 function geodir_property_sale_custom_fields_advanced_search($post_type='gd_place') {
219 219
 
220 220
 
221
-    $fields = array();
222
-
223
-    // price range
224
-    $fields[] = array(
225
-        'create_field'            => true,
226
-        'listing_type'            => $post_type,
227
-        'field_type'              => 'text',
228
-        'data_type'               => 'RANGE',
229
-        'is_active'               => 1,
230
-        'site_field_title'        => 'Price',
231
-        'field_data_type'         => 'FLOAT',
232
-        'main_search'             => 1,
233
-        'main_search_priority'    => 15,
234
-        'data_type_change'        => 'SELECT',
235
-        'search_condition_select' => 'SINGLE',
236
-        'search_min_value'        => '50000',
237
-        'search_max_value'        => '1000000',
238
-        'search_diff_value'       => '100000',
239
-        'first_search_value'      => '0',
240
-        'first_search_text'       => '',
241
-        'last_search_text'        => '',
242
-        'search_condition'        => 'SELECT',
243
-        'site_htmlvar_name'       => 'geodir_price',
244
-        'htmlvar_name'            => 'geodir_price',
245
-        'field_title'             => 'geodir_price',
246
-        'expand_custom_value'     => '',
247
-        'front_search_title'      => 'Price Range',
248
-        'field_desc'              => ''
249
-    );
250
-
251
-    /**
252
-     * Filter the array of advanced search fields DB table data.
253
-     *
254
-     * @since 1.6.6
255
-     * @param string $fields The default custom fields as an array.
256
-     */
257
-    $fields = apply_filters('geodir_property_sale_custom_fields_advanced_search', $fields);
258
-
259
-    return $fields;
221
+	$fields = array();
222
+
223
+	// price range
224
+	$fields[] = array(
225
+		'create_field'            => true,
226
+		'listing_type'            => $post_type,
227
+		'field_type'              => 'text',
228
+		'data_type'               => 'RANGE',
229
+		'is_active'               => 1,
230
+		'site_field_title'        => 'Price',
231
+		'field_data_type'         => 'FLOAT',
232
+		'main_search'             => 1,
233
+		'main_search_priority'    => 15,
234
+		'data_type_change'        => 'SELECT',
235
+		'search_condition_select' => 'SINGLE',
236
+		'search_min_value'        => '50000',
237
+		'search_max_value'        => '1000000',
238
+		'search_diff_value'       => '100000',
239
+		'first_search_value'      => '0',
240
+		'first_search_text'       => '',
241
+		'last_search_text'        => '',
242
+		'search_condition'        => 'SELECT',
243
+		'site_htmlvar_name'       => 'geodir_price',
244
+		'htmlvar_name'            => 'geodir_price',
245
+		'field_title'             => 'geodir_price',
246
+		'expand_custom_value'     => '',
247
+		'front_search_title'      => 'Price Range',
248
+		'field_desc'              => ''
249
+	);
250
+
251
+	/**
252
+	 * Filter the array of advanced search fields DB table data.
253
+	 *
254
+	 * @since 1.6.6
255
+	 * @param string $fields The default custom fields as an array.
256
+	 */
257
+	$fields = apply_filters('geodir_property_sale_custom_fields_advanced_search', $fields);
258
+
259
+	return $fields;
260 260
 }
261 261
 
262 262
 global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index;
@@ -266,46 +266,46 @@  discard block
 block discarded – undo
266 266
 $category_array = array('Apartments', 'Houses', 'Commercial', 'Land');
267 267
 
268 268
 if($dummy_post_index==1){
269
-    // add the dummy categories
270
-    geodir_dummy_data_taxonomies($post_type,$category_array );
271
-
272
-    // add the dummy custom fields
273
-    $fields = geodir_property_sale_custom_fields($post_type);
274
-    geodir_create_dummy_fields($fields);
275
-
276
-    // update the type currently installed
277
-    update_option($post_type.'_dummy_data_type','property_sale');
278
-
279
-    // add the advanced search fields
280
-    if (defined('GEODIRADVANCESEARCH_VERSION')){
281
-        $search_fields = geodir_property_sale_custom_fields_advanced_search($post_type);
282
-        foreach($search_fields as $sfield){
283
-            geodir_custom_advance_search_field_save( $sfield );
284
-        }
285
-    }
269
+	// add the dummy categories
270
+	geodir_dummy_data_taxonomies($post_type,$category_array );
271
+
272
+	// add the dummy custom fields
273
+	$fields = geodir_property_sale_custom_fields($post_type);
274
+	geodir_create_dummy_fields($fields);
275
+
276
+	// update the type currently installed
277
+	update_option($post_type.'_dummy_data_type','property_sale');
278
+
279
+	// add the advanced search fields
280
+	if (defined('GEODIRADVANCESEARCH_VERSION')){
281
+		$search_fields = geodir_property_sale_custom_fields_advanced_search($post_type);
282
+		foreach($search_fields as $sfield){
283
+			geodir_custom_advance_search_field_save( $sfield );
284
+		}
285
+	}
286 286
 }
287 287
 
288 288
 if (geodir_dummy_folder_exists())
289
-    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
289
+	$dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
290 290
 else
291
-    $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
291
+	$dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
292 292
 
293 293
 $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
294 294
 
295 295
 switch ($dummy_post_index) {
296 296
 
297
-    case(1):
298
-        $image_array[] = "$dummy_image_url/ps/psf1.jpg";
299
-        $image_array[] = "$dummy_image_url/ps/psl1.jpg";
300
-        $image_array[] = "$dummy_image_url/ps/psb1.jpg";
301
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
302
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
297
+	case(1):
298
+		$image_array[] = "$dummy_image_url/ps/psf1.jpg";
299
+		$image_array[] = "$dummy_image_url/ps/psl1.jpg";
300
+		$image_array[] = "$dummy_image_url/ps/psb1.jpg";
301
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
302
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
303 303
 
304 304
 
305
-        $post_info[] = array(
306
-            "listing_type" => $post_type,
307
-            "post_title" => 'Eastern Lodge',
308
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa.
305
+		$post_info[] = array(
306
+			"listing_type" => $post_type,
307
+			"post_title" => 'Eastern Lodge',
308
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa.
309 309
 
310 310
 Aliquam ut odio ullamcorper, posuere enim sed, venenatis tortor. Donec justo elit, aliquam sed cursus sed, semper eget libero. Mauris consequat lorem sed fringilla tincidunt. Phasellus suscipit velit et elit tristique, ac commodo metus scelerisque. Vivamus finibus ipsum placerat pulvinar aliquet. Maecenas augue orci, blandit at nibh pharetra, condimentum congue ligula. Duis non ante sagittis odio convallis lacinia in quis sapien.
311 311
 
@@ -314,42 +314,42 @@  discard block
 block discarded – undo
314 314
 Vestibulum tristique quam eget bibendum pulvinar. Mauris sit amet magna ut arcu rutrum pellentesque feugiat et ipsum. Proin porta quam sed risus accumsan pharetra. Nulla quis semper nisl. Nulla facilisi. Nulla facilisi. Pellentesque euismod sollicitudin lacus vel ultricies. Vestibulum ut sem ut nulla ultricies convallis in at mi. Nunc vitae nibh arcu. Maecenas nunc enim, tempus a rhoncus eget, pellentesque ut erat.
315 315
 
316 316
 Suspendisse interdum accumsan magna et tempor. Suspendisse scelerisque at lorem sit amet faucibus. Aenean quis consectetur enim. Duis aliquet tristique tempus. Suspendisse id ullamcorper mauris. Aliquam in libero eu justo porttitor pulvinar. Nulla semper placerat lectus. Nulla mollis suscipit lacus, a blandit purus cursus non. Maecenas id tellus mi. Pellentesque sollicitudin nibh eget magna scelerisque consequat. Aliquam convallis orci arcu, et euismod dui cursus et. Donec nec pellentesque nulla, ac pretium massa. In gravida bibendum ornare.',
317
-            "post_images" => $image_array,
318
-            "post_category" => array($post_type.'category' => array($category_array[1])),
319
-            "post_tags" => array('Tags', 'Sample Tags'),
320
-            "geodir_video" => '',
321
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
322
-            "geodir_contact" => '(111) 677-4444',
323
-            "geodir_email" => '[email protected]',
324
-            "geodir_website" => 'http://example.com/',
325
-            "geodir_twitter" => 'http://example.com/',
326
-            "geodir_facebook" => 'http://example.com/',
327
-            "geodir_price" => '350000',
328
-            "geodir_property_status" => 'For Sale',
329
-            'geodir_property_furnishing' => 'Furnished',
330
-            'geodir_property_type' => 'Detached house',
331
-            'geodir_property_bedrooms' => '3',
332
-            'geodir_property_bathrooms' => '2',
333
-            'geodir_property_area' => '1850',
334
-            'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace',
335
-            "post_dummy" => '1'
336
-        );
337
-
338
-
339
-        break;
340
-    case 2:
341
-        $image_array = array();
342
-        $post_meta = array();
343
-        $image_array[] = "$dummy_image_url/ps/psf2.jpg";
344
-        $image_array[] = "$dummy_image_url/ps/psl2.jpg";
345
-        $image_array[] = "$dummy_image_url/ps/psb2.jpg";
346
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
347
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
348
-
349
-        $post_info[] = array(
350
-            "listing_type" => $post_type,
351
-            "post_title" => 'Daisy Street',
352
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
317
+			"post_images" => $image_array,
318
+			"post_category" => array($post_type.'category' => array($category_array[1])),
319
+			"post_tags" => array('Tags', 'Sample Tags'),
320
+			"geodir_video" => '',
321
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
322
+			"geodir_contact" => '(111) 677-4444',
323
+			"geodir_email" => '[email protected]',
324
+			"geodir_website" => 'http://example.com/',
325
+			"geodir_twitter" => 'http://example.com/',
326
+			"geodir_facebook" => 'http://example.com/',
327
+			"geodir_price" => '350000',
328
+			"geodir_property_status" => 'For Sale',
329
+			'geodir_property_furnishing' => 'Furnished',
330
+			'geodir_property_type' => 'Detached house',
331
+			'geodir_property_bedrooms' => '3',
332
+			'geodir_property_bathrooms' => '2',
333
+			'geodir_property_area' => '1850',
334
+			'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace',
335
+			"post_dummy" => '1'
336
+		);
337
+
338
+
339
+		break;
340
+	case 2:
341
+		$image_array = array();
342
+		$post_meta = array();
343
+		$image_array[] = "$dummy_image_url/ps/psf2.jpg";
344
+		$image_array[] = "$dummy_image_url/ps/psl2.jpg";
345
+		$image_array[] = "$dummy_image_url/ps/psb2.jpg";
346
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
347
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
348
+
349
+		$post_info[] = array(
350
+			"listing_type" => $post_type,
351
+			"post_title" => 'Daisy Street',
352
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
353 353
 
354 354
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
355 355
 
@@ -359,42 +359,42 @@  discard block
 block discarded – undo
359 359
 
360 360
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
361 361
 
362
-            "post_images" => $image_array,
363
-            "post_category" => array($post_type.'category' => array($category_array[1])),
364
-            "post_tags" => array('Garage'),
365
-            "geodir_video" => '',
366
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
367
-            "geodir_contact" => '(222) 777-1111',
368
-            "geodir_email" => '[email protected]',
369
-            "geodir_website" => 'http://example.com/',
370
-            "geodir_twitter" => 'http://example.com/',
371
-            "geodir_facebook" => 'http://example.com/',
372
-            "geodir_price" => '230000',
373
-            "geodir_property_status" => 'Sold',
374
-            'geodir_property_furnishing' => 'Unfurnished',
375
-            'geodir_property_type' => 'Detached house',
376
-            'geodir_property_bedrooms' => '5',
377
-            'geodir_property_bathrooms' => '3',
378
-            'geodir_property_area' => '2650',
379
-            'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace',
380
-            "post_dummy" => '1'
381
-        );
382
-
383
-        break;
384
-
385
-    case 3:
386
-        $image_array = array();
387
-        $post_meta = array();
388
-        $image_array[] = "$dummy_image_url/ps/psf3.jpg";
389
-        $image_array[] = "$dummy_image_url/ps/psl3.jpg";
390
-        $image_array[] = "$dummy_image_url/ps/psb3.jpg";
391
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
392
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
393
-
394
-        $post_info[] = array(
395
-            "listing_type" => $post_type,
396
-            "post_title" => 'Northbay House',
397
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
362
+			"post_images" => $image_array,
363
+			"post_category" => array($post_type.'category' => array($category_array[1])),
364
+			"post_tags" => array('Garage'),
365
+			"geodir_video" => '',
366
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
367
+			"geodir_contact" => '(222) 777-1111',
368
+			"geodir_email" => '[email protected]',
369
+			"geodir_website" => 'http://example.com/',
370
+			"geodir_twitter" => 'http://example.com/',
371
+			"geodir_facebook" => 'http://example.com/',
372
+			"geodir_price" => '230000',
373
+			"geodir_property_status" => 'Sold',
374
+			'geodir_property_furnishing' => 'Unfurnished',
375
+			'geodir_property_type' => 'Detached house',
376
+			'geodir_property_bedrooms' => '5',
377
+			'geodir_property_bathrooms' => '3',
378
+			'geodir_property_area' => '2650',
379
+			'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace',
380
+			"post_dummy" => '1'
381
+		);
382
+
383
+		break;
384
+
385
+	case 3:
386
+		$image_array = array();
387
+		$post_meta = array();
388
+		$image_array[] = "$dummy_image_url/ps/psf3.jpg";
389
+		$image_array[] = "$dummy_image_url/ps/psl3.jpg";
390
+		$image_array[] = "$dummy_image_url/ps/psb3.jpg";
391
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
392
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
393
+
394
+		$post_info[] = array(
395
+			"listing_type" => $post_type,
396
+			"post_title" => 'Northbay House',
397
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
398 398
 
399 399
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
400 400
 
@@ -404,43 +404,43 @@  discard block
 block discarded – undo
404 404
 
405 405
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
406 406
 
407
-            "post_images" => $image_array,
408
-            "post_category" => array($post_type.'category' => array($category_array[1])),
409
-            "post_tags" => array('Tags', 'Sample Tags'),
410
-            "geodir_video" => '',
411
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
412
-            "geodir_contact" => '(222) 777-1111',
413
-            "geodir_email" => '[email protected]',
414
-            "geodir_website" => 'http://example.com/',
415
-            "geodir_twitter" => 'http://example.com/',
416
-            "geodir_facebook" => 'http://example.com/',
417
-            "geodir_price" => '260000',
418
-            "geodir_property_status" => 'Under Offer',
419
-            'geodir_property_furnishing' => 'Unfurnished',
420
-            'geodir_property_type' => 'Detached house',
421
-            'geodir_property_bedrooms' => '6',
422
-            'geodir_property_bathrooms' => '6',
423
-            'geodir_property_area' => '1650',
424
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace',
425
-            "post_dummy" => '1'
426
-        );
427
-
428
-        break;
429
-
430
-
431
-    case 4:
432
-        $image_array = array();
433
-        $post_meta = array();
434
-        $image_array[] = "$dummy_image_url/ps/psf4.jpg";
435
-        $image_array[] = "$dummy_image_url/ps/psl4.jpg";
436
-        $image_array[] = "$dummy_image_url/ps/psb4.jpg";
437
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
438
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
439
-
440
-        $post_info[] = array(
441
-            "listing_type" => $post_type,
442
-            "post_title" => 'Jesmond Mansion',
443
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
407
+			"post_images" => $image_array,
408
+			"post_category" => array($post_type.'category' => array($category_array[1])),
409
+			"post_tags" => array('Tags', 'Sample Tags'),
410
+			"geodir_video" => '',
411
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
412
+			"geodir_contact" => '(222) 777-1111',
413
+			"geodir_email" => '[email protected]',
414
+			"geodir_website" => 'http://example.com/',
415
+			"geodir_twitter" => 'http://example.com/',
416
+			"geodir_facebook" => 'http://example.com/',
417
+			"geodir_price" => '260000',
418
+			"geodir_property_status" => 'Under Offer',
419
+			'geodir_property_furnishing' => 'Unfurnished',
420
+			'geodir_property_type' => 'Detached house',
421
+			'geodir_property_bedrooms' => '6',
422
+			'geodir_property_bathrooms' => '6',
423
+			'geodir_property_area' => '1650',
424
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace',
425
+			"post_dummy" => '1'
426
+		);
427
+
428
+		break;
429
+
430
+
431
+	case 4:
432
+		$image_array = array();
433
+		$post_meta = array();
434
+		$image_array[] = "$dummy_image_url/ps/psf4.jpg";
435
+		$image_array[] = "$dummy_image_url/ps/psl4.jpg";
436
+		$image_array[] = "$dummy_image_url/ps/psb4.jpg";
437
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
438
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
439
+
440
+		$post_info[] = array(
441
+			"listing_type" => $post_type,
442
+			"post_title" => 'Jesmond Mansion',
443
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
444 444
 
445 445
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
446 446
 
@@ -450,42 +450,42 @@  discard block
 block discarded – undo
450 450
 
451 451
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
452 452
 
453
-            "post_images" => $image_array,
454
-            "post_category" => array($post_type.'category' => array($category_array[1])),
455
-            "post_tags" => array('Tags', 'Sample Tags'),
456
-            "geodir_video" => '',
457
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
458
-            "geodir_contact" => '(222) 777-1111',
459
-            "geodir_email" => '[email protected]',
460
-            "geodir_website" => 'http://example.com/',
461
-            "geodir_twitter" => 'http://example.com/',
462
-            "geodir_facebook" => 'http://example.com/',
463
-            "geodir_price" => '2300000',
464
-            "geodir_property_status" => 'Under Offer',
465
-            'geodir_property_furnishing' => 'Partially furnished',
466
-            'geodir_property_type' => 'Detached house',
467
-            'geodir_property_bedrooms' => '10',
468
-            'geodir_property_bathrooms' => '7',
469
-            'geodir_property_area' => '6600',
470
-            'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace',
471
-            "post_dummy" => '1'
472
-        );
473
-
474
-        break;
475
-
476
-    case 5:
477
-        $image_array = array();
478
-        $post_meta = array();
479
-        $image_array[] = "$dummy_image_url/ps/psf5.jpg";
480
-        $image_array[] = "$dummy_image_url/ps/psl5.jpg";
481
-        $image_array[] = "$dummy_image_url/ps/psb5.jpg";
482
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
483
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
484
-
485
-        $post_info[] = array(
486
-            "listing_type" => $post_type,
487
-            "post_title" => 'Springfield Lodge',
488
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
453
+			"post_images" => $image_array,
454
+			"post_category" => array($post_type.'category' => array($category_array[1])),
455
+			"post_tags" => array('Tags', 'Sample Tags'),
456
+			"geodir_video" => '',
457
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
458
+			"geodir_contact" => '(222) 777-1111',
459
+			"geodir_email" => '[email protected]',
460
+			"geodir_website" => 'http://example.com/',
461
+			"geodir_twitter" => 'http://example.com/',
462
+			"geodir_facebook" => 'http://example.com/',
463
+			"geodir_price" => '2300000',
464
+			"geodir_property_status" => 'Under Offer',
465
+			'geodir_property_furnishing' => 'Partially furnished',
466
+			'geodir_property_type' => 'Detached house',
467
+			'geodir_property_bedrooms' => '10',
468
+			'geodir_property_bathrooms' => '7',
469
+			'geodir_property_area' => '6600',
470
+			'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace',
471
+			"post_dummy" => '1'
472
+		);
473
+
474
+		break;
475
+
476
+	case 5:
477
+		$image_array = array();
478
+		$post_meta = array();
479
+		$image_array[] = "$dummy_image_url/ps/psf5.jpg";
480
+		$image_array[] = "$dummy_image_url/ps/psl5.jpg";
481
+		$image_array[] = "$dummy_image_url/ps/psb5.jpg";
482
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
483
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
484
+
485
+		$post_info[] = array(
486
+			"listing_type" => $post_type,
487
+			"post_title" => 'Springfield Lodge',
488
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
489 489
 
490 490
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
491 491
 
@@ -495,42 +495,42 @@  discard block
 block discarded – undo
495 495
 
496 496
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
497 497
 
498
-            "post_images" => $image_array,
499
-            "post_category" => array($post_type.'category' => array($category_array[1])),
500
-            "post_tags" => array('Tags', 'Sample Tags'),
501
-            "geodir_video" => '',
502
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
503
-            "geodir_contact" => '(222) 777-1111',
504
-            "geodir_email" => '[email protected]',
505
-            "geodir_website" => 'http://example.com/',
506
-            "geodir_twitter" => 'http://example.com/',
507
-            "geodir_facebook" => 'http://example.com/',
508
-            "geodir_price" => '330000',
509
-            "geodir_property_status" => 'For Sale',
510
-            'geodir_property_furnishing' => 'Optional',
511
-            'geodir_property_type' => 'Detached house',
512
-            'geodir_property_bedrooms' => '4',
513
-            'geodir_property_bathrooms' => '3',
514
-            'geodir_property_area' => '3700',
515
-            'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden',
516
-            "post_dummy" => '1'
517
-        );
518
-
519
-        break;
520
-
521
-    case 6:
522
-        $image_array = array();
523
-        $post_meta = array();
524
-        $image_array[] = "$dummy_image_url/ps/psf6.jpg";
525
-        $image_array[] = "$dummy_image_url/ps/psl6.jpg";
526
-        $image_array[] = "$dummy_image_url/ps/psb5.jpg";
527
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
528
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
529
-
530
-        $post_info[] = array(
531
-            "listing_type" => $post_type,
532
-            "post_title" => 'Forrest Park',
533
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
498
+			"post_images" => $image_array,
499
+			"post_category" => array($post_type.'category' => array($category_array[1])),
500
+			"post_tags" => array('Tags', 'Sample Tags'),
501
+			"geodir_video" => '',
502
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
503
+			"geodir_contact" => '(222) 777-1111',
504
+			"geodir_email" => '[email protected]',
505
+			"geodir_website" => 'http://example.com/',
506
+			"geodir_twitter" => 'http://example.com/',
507
+			"geodir_facebook" => 'http://example.com/',
508
+			"geodir_price" => '330000',
509
+			"geodir_property_status" => 'For Sale',
510
+			'geodir_property_furnishing' => 'Optional',
511
+			'geodir_property_type' => 'Detached house',
512
+			'geodir_property_bedrooms' => '4',
513
+			'geodir_property_bathrooms' => '3',
514
+			'geodir_property_area' => '3700',
515
+			'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden',
516
+			"post_dummy" => '1'
517
+		);
518
+
519
+		break;
520
+
521
+	case 6:
522
+		$image_array = array();
523
+		$post_meta = array();
524
+		$image_array[] = "$dummy_image_url/ps/psf6.jpg";
525
+		$image_array[] = "$dummy_image_url/ps/psl6.jpg";
526
+		$image_array[] = "$dummy_image_url/ps/psb5.jpg";
527
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
528
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
529
+
530
+		$post_info[] = array(
531
+			"listing_type" => $post_type,
532
+			"post_title" => 'Forrest Park',
533
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
534 534
 
535 535
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
536 536
 
@@ -540,42 +540,42 @@  discard block
 block discarded – undo
540 540
 
541 541
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
542 542
 
543
-            "post_images" => $image_array,
544
-            "post_category" => array($post_type.'category' => array($category_array[1])),
545
-            "post_tags" => array('Tags', 'Sample Tags'),
546
-            "geodir_video" => '',
547
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
548
-            "geodir_contact" => '(222) 777-1111',
549
-            "geodir_email" => '[email protected]',
550
-            "geodir_website" => 'http://example.com/',
551
-            "geodir_twitter" => 'http://example.com/',
552
-            "geodir_facebook" => 'http://example.com/',
553
-            "geodir_price" => '530000',
554
-            "geodir_property_status" => 'For Sale',
555
-            'geodir_property_furnishing' => 'Unfurnished',
556
-            'geodir_property_type' => 'Detached house',
557
-            'geodir_property_bedrooms' => '5',
558
-            'geodir_property_bathrooms' => '4',
559
-            'geodir_property_area' => '2250',
560
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway',
561
-            "post_dummy" => '1'
562
-        );
563
-
564
-        break;
565
-
566
-    case 7:
567
-        $image_array = array();
568
-        $post_meta = array();
569
-        $image_array[] = "$dummy_image_url/ps/psf7.jpg";
570
-        $image_array[] = "$dummy_image_url/ps/psl4.jpg";
571
-        $image_array[] = "$dummy_image_url/ps/psb4.jpg";
572
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
573
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
574
-
575
-        $post_info[] = array(
576
-            "listing_type" => $post_type,
577
-            "post_title" => 'Fraser Suites',
578
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
543
+			"post_images" => $image_array,
544
+			"post_category" => array($post_type.'category' => array($category_array[1])),
545
+			"post_tags" => array('Tags', 'Sample Tags'),
546
+			"geodir_video" => '',
547
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
548
+			"geodir_contact" => '(222) 777-1111',
549
+			"geodir_email" => '[email protected]',
550
+			"geodir_website" => 'http://example.com/',
551
+			"geodir_twitter" => 'http://example.com/',
552
+			"geodir_facebook" => 'http://example.com/',
553
+			"geodir_price" => '530000',
554
+			"geodir_property_status" => 'For Sale',
555
+			'geodir_property_furnishing' => 'Unfurnished',
556
+			'geodir_property_type' => 'Detached house',
557
+			'geodir_property_bedrooms' => '5',
558
+			'geodir_property_bathrooms' => '4',
559
+			'geodir_property_area' => '2250',
560
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway',
561
+			"post_dummy" => '1'
562
+		);
563
+
564
+		break;
565
+
566
+	case 7:
567
+		$image_array = array();
568
+		$post_meta = array();
569
+		$image_array[] = "$dummy_image_url/ps/psf7.jpg";
570
+		$image_array[] = "$dummy_image_url/ps/psl4.jpg";
571
+		$image_array[] = "$dummy_image_url/ps/psb4.jpg";
572
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
573
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
574
+
575
+		$post_info[] = array(
576
+			"listing_type" => $post_type,
577
+			"post_title" => 'Fraser Suites',
578
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
579 579
 
580 580
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
581 581
 
@@ -585,42 +585,42 @@  discard block
 block discarded – undo
585 585
 
586 586
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
587 587
 
588
-            "post_images" => $image_array,
589
-            "post_category" => array($post_type.'category' => array($category_array[0])),
590
-            "post_tags" => array('Tags', 'Sample Tags'),
591
-            "geodir_video" => '',
592
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
593
-            "geodir_contact" => '(222) 777-1111',
594
-            "geodir_email" => '[email protected]',
595
-            "geodir_website" => 'http://example.com/',
596
-            "geodir_twitter" => 'http://example.com/',
597
-            "geodir_facebook" => 'http://example.com/',
598
-            "geodir_price" => '245000',
599
-            "geodir_property_status" => 'For Sale',
600
-            'geodir_property_furnishing' => 'Unfurnished',
601
-            'geodir_property_type' => 'Apartment',
602
-            'geodir_property_bedrooms' => '3',
603
-            'geodir_property_bathrooms' => '2',
604
-            'geodir_property_area' => '1250',
605
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing',
606
-            "post_dummy" => '1'
607
-        );
608
-
609
-        break;
610
-
611
-    case 8:
612
-        $image_array = array();
613
-        $post_meta = array();
614
-        $image_array[] = "$dummy_image_url/ps/psf8.jpg";
615
-        $image_array[] = "$dummy_image_url/ps/psl2.jpg";
616
-        $image_array[] = "$dummy_image_url/ps/psb2.jpg";
617
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
618
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
619
-
620
-        $post_info[] = array(
621
-            "listing_type" => $post_type,
622
-            "post_title" => 'Richmore Apartments',
623
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
588
+			"post_images" => $image_array,
589
+			"post_category" => array($post_type.'category' => array($category_array[0])),
590
+			"post_tags" => array('Tags', 'Sample Tags'),
591
+			"geodir_video" => '',
592
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
593
+			"geodir_contact" => '(222) 777-1111',
594
+			"geodir_email" => '[email protected]',
595
+			"geodir_website" => 'http://example.com/',
596
+			"geodir_twitter" => 'http://example.com/',
597
+			"geodir_facebook" => 'http://example.com/',
598
+			"geodir_price" => '245000',
599
+			"geodir_property_status" => 'For Sale',
600
+			'geodir_property_furnishing' => 'Unfurnished',
601
+			'geodir_property_type' => 'Apartment',
602
+			'geodir_property_bedrooms' => '3',
603
+			'geodir_property_bathrooms' => '2',
604
+			'geodir_property_area' => '1250',
605
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing',
606
+			"post_dummy" => '1'
607
+		);
608
+
609
+		break;
610
+
611
+	case 8:
612
+		$image_array = array();
613
+		$post_meta = array();
614
+		$image_array[] = "$dummy_image_url/ps/psf8.jpg";
615
+		$image_array[] = "$dummy_image_url/ps/psl2.jpg";
616
+		$image_array[] = "$dummy_image_url/ps/psb2.jpg";
617
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
618
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
619
+
620
+		$post_info[] = array(
621
+			"listing_type" => $post_type,
622
+			"post_title" => 'Richmore Apartments',
623
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
624 624
 
625 625
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
626 626
 
@@ -630,43 +630,43 @@  discard block
 block discarded – undo
630 630
 
631 631
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
632 632
 
633
-            "post_images" => $image_array,
634
-            "post_category" => array($post_type.'category' => array($category_array[0])),
635
-            "post_tags" => array('Tags', 'Sample Tags'),
636
-            "geodir_video" => '',
637
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
638
-            "geodir_contact" => '(222) 777-1111',
639
-            "geodir_email" => '[email protected]',
640
-            "geodir_website" => 'http://example.com/',
641
-            "geodir_twitter" => 'http://example.com/',
642
-            "geodir_facebook" => 'http://example.com/',
643
-            "geodir_price" => '395000',
644
-            "geodir_property_status" => 'For Sale',
645
-            'geodir_property_furnishing' => 'Unfurnished',
646
-            'geodir_property_type' => 'Apartment',
647
-            'geodir_property_bedrooms' => '2',
648
-            'geodir_property_bathrooms' => '2',
649
-            'geodir_property_area' => '1750',
650
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
651
-            "post_dummy" => '1'
652
-        );
653
-
654
-        break;
655
-
656
-
657
-    case 9:
658
-        $image_array = array();
659
-        $post_meta = array();
660
-        $image_array[] = "$dummy_image_url/ps/psf9.jpg";
661
-        $image_array[] = "$dummy_image_url/ps/psc9.jpg";
662
-        $image_array[] = "$dummy_image_url/ps/psb2.jpg";
663
-        $image_array[] = "$dummy_image_url/ps/psk.jpg";
664
-        $image_array[] = "$dummy_image_url/ps/psbr.jpg";
665
-
666
-        $post_info[] = array(
667
-            "listing_type" => $post_type,
668
-            "post_title" => 'Hotel Alpina',
669
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
633
+			"post_images" => $image_array,
634
+			"post_category" => array($post_type.'category' => array($category_array[0])),
635
+			"post_tags" => array('Tags', 'Sample Tags'),
636
+			"geodir_video" => '',
637
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
638
+			"geodir_contact" => '(222) 777-1111',
639
+			"geodir_email" => '[email protected]',
640
+			"geodir_website" => 'http://example.com/',
641
+			"geodir_twitter" => 'http://example.com/',
642
+			"geodir_facebook" => 'http://example.com/',
643
+			"geodir_price" => '395000',
644
+			"geodir_property_status" => 'For Sale',
645
+			'geodir_property_furnishing' => 'Unfurnished',
646
+			'geodir_property_type' => 'Apartment',
647
+			'geodir_property_bedrooms' => '2',
648
+			'geodir_property_bathrooms' => '2',
649
+			'geodir_property_area' => '1750',
650
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
651
+			"post_dummy" => '1'
652
+		);
653
+
654
+		break;
655
+
656
+
657
+	case 9:
658
+		$image_array = array();
659
+		$post_meta = array();
660
+		$image_array[] = "$dummy_image_url/ps/psf9.jpg";
661
+		$image_array[] = "$dummy_image_url/ps/psc9.jpg";
662
+		$image_array[] = "$dummy_image_url/ps/psb2.jpg";
663
+		$image_array[] = "$dummy_image_url/ps/psk.jpg";
664
+		$image_array[] = "$dummy_image_url/ps/psbr.jpg";
665
+
666
+		$post_info[] = array(
667
+			"listing_type" => $post_type,
668
+			"post_title" => 'Hotel Alpina',
669
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
670 670
 
671 671
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
672 672
 
@@ -676,39 +676,39 @@  discard block
 block discarded – undo
676 676
 
677 677
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
678 678
 
679
-            "post_images" => $image_array,
680
-            "post_category" => array($post_type.'category' => array($category_array[2])),
681
-            "post_tags" => array('Tags', 'Sample Tags'),
682
-            "geodir_video" => '',
683
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
684
-            "geodir_contact" => '(222) 777-1111',
685
-            "geodir_email" => '[email protected]',
686
-            "geodir_website" => 'http://example.com/',
687
-            "geodir_twitter" => 'http://example.com/',
688
-            "geodir_facebook" => 'http://example.com/',
689
-            "geodir_price" => '12500000',
690
-            "geodir_property_status" => 'For Sale',
691
-            'geodir_property_furnishing' => 'Furnished',
692
-            'geodir_property_type' => 'Hotel',
693
-            'geodir_property_bedrooms' => '120',
694
-            'geodir_property_bathrooms' => '133',
695
-            'geodir_property_area' => '35000',
696
-            'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
697
-            "post_dummy" => '1'
698
-        );
699
-
700
-        break;
701
-
702
-    case 10:
703
-        $image_array = array();
704
-        $post_meta = array();
705
-        $image_array[] = "$dummy_image_url/ps/psf10.jpg";
706
-        $image_array[] = "$dummy_image_url/ps/psf102.jpg";
707
-
708
-        $post_info[] = array(
709
-            "listing_type" => $post_type,
710
-            "post_title" => 'Development Land',
711
-            "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
679
+			"post_images" => $image_array,
680
+			"post_category" => array($post_type.'category' => array($category_array[2])),
681
+			"post_tags" => array('Tags', 'Sample Tags'),
682
+			"geodir_video" => '',
683
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
684
+			"geodir_contact" => '(222) 777-1111',
685
+			"geodir_email" => '[email protected]',
686
+			"geodir_website" => 'http://example.com/',
687
+			"geodir_twitter" => 'http://example.com/',
688
+			"geodir_facebook" => 'http://example.com/',
689
+			"geodir_price" => '12500000',
690
+			"geodir_property_status" => 'For Sale',
691
+			'geodir_property_furnishing' => 'Furnished',
692
+			'geodir_property_type' => 'Hotel',
693
+			'geodir_property_bedrooms' => '120',
694
+			'geodir_property_bathrooms' => '133',
695
+			'geodir_property_area' => '35000',
696
+			'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage',
697
+			"post_dummy" => '1'
698
+		);
699
+
700
+		break;
701
+
702
+	case 10:
703
+		$image_array = array();
704
+		$post_meta = array();
705
+		$image_array[] = "$dummy_image_url/ps/psf10.jpg";
706
+		$image_array[] = "$dummy_image_url/ps/psf102.jpg";
707
+
708
+		$post_info[] = array(
709
+			"listing_type" => $post_type,
710
+			"post_title" => 'Development Land',
711
+			"post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna.
712 712
 
713 713
 Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel.
714 714
 
@@ -718,93 +718,93 @@  discard block
 block discarded – undo
718 718
 
719 719
 Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.',
720 720
 
721
-            "post_images" => $image_array,
722
-            "post_category" => array($post_type.'category' => array($category_array[3])),
723
-            "post_tags" => array('Tags', 'Sample Tags'),
724
-            "geodir_video" => '',
725
-            "geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
726
-            "geodir_contact" => '(222) 777-1111',
727
-            "geodir_email" => '[email protected]',
728
-            "geodir_website" => 'http://example.com/',
729
-            "geodir_twitter" => 'http://example.com/',
730
-            "geodir_facebook" => 'http://example.com/',
731
-            "geodir_price" => '80000',
732
-            "geodir_property_status" => 'For Sale',
733
-            'geodir_property_furnishing' => '',
734
-            'geodir_property_type' => 'Land',
735
-            'geodir_property_bedrooms' => '',
736
-            'geodir_property_bathrooms' => '',
737
-            'geodir_property_area' => '250000',
738
-            'geodir_property_features' => '',
739
-            "post_dummy" => '1'
740
-        );
741
-
742
-        break;
721
+			"post_images" => $image_array,
722
+			"post_category" => array($post_type.'category' => array($category_array[3])),
723
+			"post_tags" => array('Tags', 'Sample Tags'),
724
+			"geodir_video" => '',
725
+			"geodir_timing" => 'Viewing Sunday 10 am to 9 pm',
726
+			"geodir_contact" => '(222) 777-1111',
727
+			"geodir_email" => '[email protected]',
728
+			"geodir_website" => 'http://example.com/',
729
+			"geodir_twitter" => 'http://example.com/',
730
+			"geodir_facebook" => 'http://example.com/',
731
+			"geodir_price" => '80000',
732
+			"geodir_property_status" => 'For Sale',
733
+			'geodir_property_furnishing' => '',
734
+			'geodir_property_type' => 'Land',
735
+			'geodir_property_bedrooms' => '',
736
+			'geodir_property_bathrooms' => '',
737
+			'geodir_property_area' => '250000',
738
+			'geodir_property_features' => '',
739
+			"post_dummy" => '1'
740
+		);
741
+
742
+		break;
743 743
 
744 744
 } // end of switch
745 745
 
746 746
 foreach ($post_info as $post_info) {
747
-    $default_location = geodir_get_default_location();
748
-    if ($city_bound_lat1 > $city_bound_lat2)
749
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
750
-    else
751
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
747
+	$default_location = geodir_get_default_location();
748
+	if ($city_bound_lat1 > $city_bound_lat2)
749
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
750
+	else
751
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
752 752
 
753 753
 
754
-    if ($city_bound_lng1 > $city_bound_lng2)
755
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
756
-    else
757
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
754
+	if ($city_bound_lng1 > $city_bound_lng2)
755
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
756
+	else
757
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
758 758
 
759
-    $load_map = get_option('geodir_load_map');
759
+	$load_map = get_option('geodir_load_map');
760 760
     
761
-    if ($load_map == 'osm') {
762
-        $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
763
-    } else {
764
-        $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
765
-    }
766
-
767
-    $postal_code = '';
768
-    if (!empty($post_address)) {
769
-        if ($load_map == 'osm') {
770
-            $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : '';
771
-            $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : '';
772
-        } else {
773
-            $addresses = array();
774
-            $addresses_default = array();
761
+	if ($load_map == 'osm') {
762
+		$post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
763
+	} else {
764
+		$post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
765
+	}
766
+
767
+	$postal_code = '';
768
+	if (!empty($post_address)) {
769
+		if ($load_map == 'osm') {
770
+			$address = !empty($post_address->formatted_address) ? $post_address->formatted_address : '';
771
+			$postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : '';
772
+		} else {
773
+			$addresses = array();
774
+			$addresses_default = array();
775 775
             
776
-            foreach ($post_address as $add_key => $add_value) {
777
-                if ($add_key < 2 && !empty($add_value->long_name)) {
778
-                    $addresses_default[] = $add_value->long_name;
779
-                }
780
-                if ($add_value->types[0] == 'postal_code') {
781
-                    $postal_code = $add_value->long_name;
782
-                }
783
-                if ($add_value->types[0] == 'street_number') {
784
-                    $addresses[] = $add_value->long_name;
785
-                }
786
-                if ($add_value->types[0] == 'route') {
787
-                    $addresses[] = $add_value->long_name;
788
-                }
789
-                if ($add_value->types[0] == 'neighborhood') {
790
-                    $addresses[] = $add_value->long_name;
791
-                }
792
-                if ($add_value->types[0] == 'sublocality') {
793
-                    $addresses[] = $add_value->long_name;
794
-                }
795
-            }
796
-            $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
797
-        }
798
-
799
-        $post_info['post_address'] = !empty($address) ? $address : $default_location->city;
800
-        $post_info['post_city'] = $default_location->city;
801
-        $post_info['post_region'] = $default_location->region;
802
-        $post_info['post_country'] = $default_location->country;
803
-        $post_info['post_zip'] = $postal_code;
804
-        $post_info['post_latitude'] = $dummy_post_latitude;
805
-        $post_info['post_longitude'] = $dummy_post_longitude;
806
-    }
776
+			foreach ($post_address as $add_key => $add_value) {
777
+				if ($add_key < 2 && !empty($add_value->long_name)) {
778
+					$addresses_default[] = $add_value->long_name;
779
+				}
780
+				if ($add_value->types[0] == 'postal_code') {
781
+					$postal_code = $add_value->long_name;
782
+				}
783
+				if ($add_value->types[0] == 'street_number') {
784
+					$addresses[] = $add_value->long_name;
785
+				}
786
+				if ($add_value->types[0] == 'route') {
787
+					$addresses[] = $add_value->long_name;
788
+				}
789
+				if ($add_value->types[0] == 'neighborhood') {
790
+					$addresses[] = $add_value->long_name;
791
+				}
792
+				if ($add_value->types[0] == 'sublocality') {
793
+					$addresses[] = $add_value->long_name;
794
+				}
795
+			}
796
+			$address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
797
+		}
798
+
799
+		$post_info['post_address'] = !empty($address) ? $address : $default_location->city;
800
+		$post_info['post_city'] = $default_location->city;
801
+		$post_info['post_region'] = $default_location->region;
802
+		$post_info['post_country'] = $default_location->country;
803
+		$post_info['post_zip'] = $postal_code;
804
+		$post_info['post_latitude'] = $dummy_post_latitude;
805
+		$post_info['post_longitude'] = $dummy_post_longitude;
806
+	}
807 807
     
808
-    geodir_save_listing($post_info, true);
809
-    echo 1;
808
+	geodir_save_listing($post_info, true);
809
+	echo 1;
810 810
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  * @package GeoDirectory
7 7
  */
8 8
 
9
-function geodir_property_sale_custom_fields($post_type='gd_place',$package_id=''){
9
+function geodir_property_sale_custom_fields($post_type = 'gd_place', $package_id = '') {
10 10
     $fields = array();
11
-    $package = ($package_id=='') ? '' : array($package_id);
11
+    $package = ($package_id == '') ? '' : array($package_id);
12 12
 
13 13
     // price
14 14
     $fields[] = array('listing_type' => $post_type,
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                       'default_value'       =>  '',
79 79
                       'show_in' 	        =>  '[detail],[listing]',
80 80
                       'is_required'         =>  true,
81
-                      'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'),
81
+                      'option_values'       =>  __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional', 'geodirectory'),
82 82
                       'validation_pattern'  =>  '',
83 83
                       'validation_msg'      =>  '',
84 84
                       'required_msg'        =>  '',
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                       'default_value'       =>  '',
102 102
                       'show_in' 	        =>  '[detail],[listing]',
103 103
                       'is_required'         =>  true,
104
-                      'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'),
104
+                      'option_values'       =>  __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land', 'geodirectory'),
105 105
                       'validation_pattern'  =>  '',
106 106
                       'validation_msg'      =>  '',
107 107
                       'required_msg'        =>  '',
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                       'default_value'       =>  '',
125 125
                       'show_in' 	        =>  '[detail],[listing]',
126 126
                       'is_required'         =>  true,
127
-                      'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
127
+                      'option_values'       =>  __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'),
128 128
                       'validation_pattern'  =>  '',
129 129
                       'validation_msg'      =>  '',
130 130
                       'required_msg'        =>  '',
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                       'default_value'       =>  '',
148 148
                       'show_in' 	        =>  '[detail],[listing]',
149 149
                       'is_required'         =>  true,
150
-                      'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'),
150
+                      'option_values'       =>  __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'),
151 151
                       'validation_pattern'  =>  '',
152 152
                       'validation_msg'      =>  '',
153 153
                       'required_msg'        =>  '',
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                       'default_value'       =>  '',
193 193
                       'show_in' 	        =>  '[detail],[listing]',
194 194
                       'is_required'         =>  true,
195
-                      'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'),
195
+                      'option_values'       =>  __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace', 'geodirectory'),
196 196
                       'validation_pattern'  =>  '',
197 197
                       'validation_msg'      =>  '',
198 198
                       'required_msg'        =>  '',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     return  $fields;
216 216
 }
217 217
 
218
-function geodir_property_sale_custom_fields_advanced_search($post_type='gd_place') {
218
+function geodir_property_sale_custom_fields_advanced_search($post_type = 'gd_place') {
219 219
 
220 220
 
221 221
     $fields = array();
@@ -259,34 +259,34 @@  discard block
 block discarded – undo
259 259
     return $fields;
260 260
 }
261 261
 
262
-global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index;
262
+global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2, $wpdb, $current_user, $dummy_post_index;
263 263
 $post_info = array();
264 264
 $image_array = array();
265 265
 $post_meta = array();
266 266
 $category_array = array('Apartments', 'Houses', 'Commercial', 'Land');
267 267
 
268
-if($dummy_post_index==1){
268
+if ($dummy_post_index == 1) {
269 269
     // add the dummy categories
270
-    geodir_dummy_data_taxonomies($post_type,$category_array );
270
+    geodir_dummy_data_taxonomies($post_type, $category_array);
271 271
 
272 272
     // add the dummy custom fields
273 273
     $fields = geodir_property_sale_custom_fields($post_type);
274 274
     geodir_create_dummy_fields($fields);
275 275
 
276 276
     // update the type currently installed
277
-    update_option($post_type.'_dummy_data_type','property_sale');
277
+    update_option($post_type.'_dummy_data_type', 'property_sale');
278 278
 
279 279
     // add the advanced search fields
280
-    if (defined('GEODIRADVANCESEARCH_VERSION')){
280
+    if (defined('GEODIRADVANCESEARCH_VERSION')) {
281 281
         $search_fields = geodir_property_sale_custom_fields_advanced_search($post_type);
282
-        foreach($search_fields as $sfield){
283
-            geodir_custom_advance_search_field_save( $sfield );
282
+        foreach ($search_fields as $sfield) {
283
+            geodir_custom_advance_search_field_save($sfield);
284 284
         }
285 285
     }
286 286
 }
287 287
 
288 288
 if (geodir_dummy_folder_exists())
289
-    $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy";
289
+    $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy";
290 290
 else
291 291
     $dummy_image_url = 'http://www.wpgeodirectory.com/dummy';
292 292
 
Please login to merge, or discard this patch.