Passed
Pull Request — master (#257)
by Viruthagiri
10:40
created
geodirectory-admin/option-pages/design_settings_array.php 1 patch
Indentation   +946 added lines, -946 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
  */
18 18
 function geodir_post_type_setting_fun()
19 19
 {
20
-    $post_type_arr = array();
20
+	$post_type_arr = array();
21 21
 
22
-    $post_types = geodir_get_posttypes('object');
22
+	$post_types = geodir_get_posttypes('object');
23 23
 
24
-    foreach ($post_types as $key => $post_types_obj) {
25
-        $post_type_arr[$key] = $post_types_obj->labels->singular_name;
26
-    }
27
-    return $post_type_arr;
24
+	foreach ($post_types as $key => $post_types_obj) {
25
+		$post_type_arr[$key] = $post_types_obj->labels->singular_name;
26
+	}
27
+	return $post_type_arr;
28 28
 }
29 29
 
30 30
 /**
@@ -35,17 +35,17 @@  discard block
 block discarded – undo
35 35
  */
36 36
 function geodir_theme_location_setting_fun()
37 37
 {
38
-    $post_type_arr = array();
39
-    $geodir_all_nav_locations = get_registered_nav_menus();
40
-    $geodir_active_nav_locations = get_nav_menu_locations();
41
-    if (!empty($geodir_active_nav_locations) && is_array($geodir_active_nav_locations)) {
42
-        foreach ($geodir_active_nav_locations as $key => $theme_location) {
43
-            if (!empty($geodir_all_nav_locations) && is_array($geodir_all_nav_locations) && array_key_exists($key, $geodir_all_nav_locations))
44
-                $post_type_arr[$key] = $geodir_all_nav_locations[$key];
45
-        }
46
-    }
47
-
48
-    return $post_type_arr;
38
+	$post_type_arr = array();
39
+	$geodir_all_nav_locations = get_registered_nav_menus();
40
+	$geodir_active_nav_locations = get_nav_menu_locations();
41
+	if (!empty($geodir_active_nav_locations) && is_array($geodir_active_nav_locations)) {
42
+		foreach ($geodir_active_nav_locations as $key => $theme_location) {
43
+			if (!empty($geodir_all_nav_locations) && is_array($geodir_all_nav_locations) && array_key_exists($key, $geodir_all_nav_locations))
44
+				$post_type_arr[$key] = $geodir_all_nav_locations[$key];
45
+		}
46
+	}
47
+
48
+	return $post_type_arr;
49 49
 }
50 50
 /**
51 51
  * Filter GD design settings array.
@@ -55,543 +55,543 @@  discard block
 block discarded – undo
55 55
  */
56 56
 $geodir_settings['design_settings'] = apply_filters('geodir_design_settings', array(
57 57
 
58
-    /* Home Layout Settings start */
59
-    array('name' => __('Home', 'geodirectory'), 'type' => 'title', 'desc' => 'Setting to set home page layout', 'id' => 'home_page_settings '),
58
+	/* Home Layout Settings start */
59
+	array('name' => __('Home', 'geodirectory'), 'type' => 'title', 'desc' => 'Setting to set home page layout', 'id' => 'home_page_settings '),
60 60
 
61 61
 
62
-    array('name' => __('Home Top Section Settings', 'geodirectory'),
63
-        'type' => 'sectionstart',
64
-        'desc' => '',
65
-        'id' => 'geodir_home_top_section'),
62
+	array('name' => __('Home Top Section Settings', 'geodirectory'),
63
+		'type' => 'sectionstart',
64
+		'desc' => '',
65
+		'id' => 'geodir_home_top_section'),
66 66
 
67
-    array(
68
-        'name' => __('Geodirectory home page', 'geodirectory'),
69
-        'desc' => __('Set geodirectory home page as your home. <b style="color:red;">This setting has been depreciated and will be removed in the next version, instead please set the GD home page in GD>Permalinks and then set this page to the front page under Settings>Reading>Front Page</b>', 'geodirectory'),
70
-        'id' => 'geodir_set_as_home',
71
-        'type' => 'checkbox',
72
-        'std' => '0' // Default value to show home top section
73
-    ),
67
+	array(
68
+		'name' => __('Geodirectory home page', 'geodirectory'),
69
+		'desc' => __('Set geodirectory home page as your home. <b style="color:red;">This setting has been depreciated and will be removed in the next version, instead please set the GD home page in GD>Permalinks and then set this page to the front page under Settings>Reading>Front Page</b>', 'geodirectory'),
70
+		'id' => 'geodir_set_as_home',
71
+		'type' => 'checkbox',
72
+		'std' => '0' // Default value to show home top section
73
+	),
74 74
 
75
-    array(
76
-        'name' => __('Home top section', 'geodirectory'),
77
-        'desc' => __('Show the top section of home page', 'geodirectory'),
78
-        'id' => 'geodir_show_home_top_section',
79
-        'type' => 'checkbox',
80
-        'std' => '1' // Default value to show home top section
81
-    ),
75
+	array(
76
+		'name' => __('Home top section', 'geodirectory'),
77
+		'desc' => __('Show the top section of home page', 'geodirectory'),
78
+		'id' => 'geodir_show_home_top_section',
79
+		'type' => 'checkbox',
80
+		'std' => '1' // Default value to show home top section
81
+	),
82 82
 
83 83
 
84
-    array('type' => 'sectionend', 'id' => 'geodir_home_top_section'),
84
+	array('type' => 'sectionend', 'id' => 'geodir_home_top_section'),
85 85
 
86 86
 
87
-    array('name' => __('Home Page Layout Settings', 'geodirectory'),
88
-        'type' => 'sectionstart',
89
-        'desc' => '',
90
-        'id' => 'geodir_home_layout'),
87
+	array('name' => __('Home Page Layout Settings', 'geodirectory'),
88
+		'type' => 'sectionstart',
89
+		'desc' => '',
90
+		'id' => 'geodir_home_layout'),
91 91
 
92
-    array(
93
-        'name' => __('Home right section', 'geodirectory'),
94
-        'desc' => __('Show the right section of home page', 'geodirectory'),
95
-        'id' => 'geodir_show_home_right_section',
96
-        'type' => 'checkbox',
97
-        'std' => '1' // Default value to show home top section
98
-    ),
92
+	array(
93
+		'name' => __('Home right section', 'geodirectory'),
94
+		'desc' => __('Show the right section of home page', 'geodirectory'),
95
+		'id' => 'geodir_show_home_right_section',
96
+		'type' => 'checkbox',
97
+		'std' => '1' // Default value to show home top section
98
+	),
99 99
 
100
-    array(
101
-        'name' => __('Width of home right section', 'geodirectory'),
102
-        'desc' => __('Enter the width of right section of home page in %', 'geodirectory'),
103
-        'id' => 'geodir_width_home_right_section',
104
-        'type' => 'text',
105
-        'css' => 'min-width:300px;',
106
-        'std' => '30' // Default value to show home top section
107
-    ),
100
+	array(
101
+		'name' => __('Width of home right section', 'geodirectory'),
102
+		'desc' => __('Enter the width of right section of home page in %', 'geodirectory'),
103
+		'id' => 'geodir_width_home_right_section',
104
+		'type' => 'text',
105
+		'css' => 'min-width:300px;',
106
+		'std' => '30' // Default value to show home top section
107
+	),
108 108
 
109
-    array(
110
-        'name' => __('Home content section', 'geodirectory'),
111
-        'desc' => __('Show the content section of home page', 'geodirectory'),
112
-        'id' => 'geodir_show_home_contant_section',
113
-        'type' => 'checkbox',
114
-        'std' => '1' // Default value to show home top section
115
-    ),
109
+	array(
110
+		'name' => __('Home content section', 'geodirectory'),
111
+		'desc' => __('Show the content section of home page', 'geodirectory'),
112
+		'id' => 'geodir_show_home_contant_section',
113
+		'type' => 'checkbox',
114
+		'std' => '1' // Default value to show home top section
115
+	),
116 116
 
117
-    array(
118
-        'name' => __('Width of home content section', 'geodirectory'),
119
-        'desc' => __('Enter the width of content section of home page in %', 'geodirectory'),
120
-        'id' => 'geodir_width_home_contant_section',
121
-        'type' => 'text',
122
-        'css' => 'min-width:300px;',
123
-        'std' => '63' // Default value to show home top section
124
-    ),
117
+	array(
118
+		'name' => __('Width of home content section', 'geodirectory'),
119
+		'desc' => __('Enter the width of content section of home page in %', 'geodirectory'),
120
+		'id' => 'geodir_width_home_contant_section',
121
+		'type' => 'text',
122
+		'css' => 'min-width:300px;',
123
+		'std' => '63' // Default value to show home top section
124
+	),
125 125
 
126
-    array(
127
-        'name' => __('Home left section', 'geodirectory'),
128
-        'desc' => __('Show the left section of home page', 'geodirectory'),
129
-        'id' => 'geodir_show_home_left_section',
130
-        'type' => 'checkbox',
131
-        'std' => '0' // Default value to show home top section
132
-    ),
126
+	array(
127
+		'name' => __('Home left section', 'geodirectory'),
128
+		'desc' => __('Show the left section of home page', 'geodirectory'),
129
+		'id' => 'geodir_show_home_left_section',
130
+		'type' => 'checkbox',
131
+		'std' => '0' // Default value to show home top section
132
+	),
133 133
 
134
-    array(
135
-        'name' => __('Width of home left section', 'geodirectory'),
136
-        'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
137
-        'id' => 'geodir_width_home_left_section',
138
-        'type' => 'text',
139
-        'css' => 'min-width:300px;',
140
-        'std' => '30' // Default value to show home top section
141
-    ),
134
+	array(
135
+		'name' => __('Width of home left section', 'geodirectory'),
136
+		'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
137
+		'id' => 'geodir_width_home_left_section',
138
+		'type' => 'text',
139
+		'css' => 'min-width:300px;',
140
+		'std' => '30' // Default value to show home top section
141
+	),
142 142
 
143
-    array(
144
-        'name' => __('Home bottom section', 'geodirectory'),
145
-        'desc' => __('Show the bottom section of home page', 'geodirectory'),
146
-        'id' => 'geodir_show_home_bottom_section',
147
-        'type' => 'checkbox',
148
-        'std' => '0' // Default value to show home top section
149
-    ),
150
-    array(
151
-        'name' => __('Resize image large size', 'geodirectory'),
152
-        'desc' => sprintf(__('Use default wordpress media image large size ( %s ) for featured image upload. If unchecked then default geodirectory image large size ( 800x800 ) will be used.', 'geodirectory'), get_option('large_size_w') . 'x' . get_option('large_size_h')),
153
-        'id' => 'geodir_use_wp_media_large_size',
154
-        'type' => 'checkbox',
155
-        'std' => '0'
156
-    ),
143
+	array(
144
+		'name' => __('Home bottom section', 'geodirectory'),
145
+		'desc' => __('Show the bottom section of home page', 'geodirectory'),
146
+		'id' => 'geodir_show_home_bottom_section',
147
+		'type' => 'checkbox',
148
+		'std' => '0' // Default value to show home top section
149
+	),
150
+	array(
151
+		'name' => __('Resize image large size', 'geodirectory'),
152
+		'desc' => sprintf(__('Use default wordpress media image large size ( %s ) for featured image upload. If unchecked then default geodirectory image large size ( 800x800 ) will be used.', 'geodirectory'), get_option('large_size_w') . 'x' . get_option('large_size_h')),
153
+		'id' => 'geodir_use_wp_media_large_size',
154
+		'type' => 'checkbox',
155
+		'std' => '0'
156
+	),
157 157
 
158
-    array('type' => 'sectionend', 'id' => 'geodir_home_layout'),
158
+	array('type' => 'sectionend', 'id' => 'geodir_home_layout'),
159 159
 
160 160
 
161
-    /* Home Layout Settings end */
161
+	/* Home Layout Settings end */
162 162
 
163 163
 
164
-    /* Listing Layout Settings end */
164
+	/* Listing Layout Settings end */
165 165
 
166
-    array('name' => __('Listings', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_listing_settings '),
166
+	array('name' => __('Listings', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_listing_settings '),
167 167
 
168 168
 
169
-    array('name' => __('Listing Page Layout Settings', 'geodirectory'),
170
-        'type' => 'sectionstart',
171
-        'desc' => '',
172
-        'id' => 'geodir_listing_layout'),
169
+	array('name' => __('Listing Page Layout Settings', 'geodirectory'),
170
+		'type' => 'sectionstart',
171
+		'desc' => '',
172
+		'id' => 'geodir_listing_layout'),
173 173
 
174
-    array(
175
-        'name' => __('Listing top section', 'geodirectory'),
176
-        'desc' => __('Show the top section of listing page', 'geodirectory'),
177
-        'id' => 'geodir_show_listing_top_section',
178
-        'type' => 'checkbox',
179
-        'std' => '1' // Default value to show home top section
180
-    ),
174
+	array(
175
+		'name' => __('Listing top section', 'geodirectory'),
176
+		'desc' => __('Show the top section of listing page', 'geodirectory'),
177
+		'id' => 'geodir_show_listing_top_section',
178
+		'type' => 'checkbox',
179
+		'std' => '1' // Default value to show home top section
180
+	),
181 181
 
182
-    array(
183
-        'name' => __('Listing right section', 'geodirectory'),
184
-        'desc' => __('Show the right section of listing page', 'geodirectory'),
185
-        'id' => 'geodir_show_listing_right_section',
186
-        'type' => 'checkbox',
187
-        'std' => '1' // Default value to show home top section
188
-    ),
182
+	array(
183
+		'name' => __('Listing right section', 'geodirectory'),
184
+		'desc' => __('Show the right section of listing page', 'geodirectory'),
185
+		'id' => 'geodir_show_listing_right_section',
186
+		'type' => 'checkbox',
187
+		'std' => '1' // Default value to show home top section
188
+	),
189 189
 
190
-    array(
191
-        'name' => __('Width of listing right section', 'geodirectory'),
192
-        'desc' => __('Enter the width of right section of listing page in %', 'geodirectory'),
193
-        'id' => 'geodir_width_listing_right_section',
194
-        'type' => 'text',
195
-        'css' => 'min-width:300px;',
196
-        'std' => '30' // Default value to show home top section
197
-    ),
190
+	array(
191
+		'name' => __('Width of listing right section', 'geodirectory'),
192
+		'desc' => __('Enter the width of right section of listing page in %', 'geodirectory'),
193
+		'id' => 'geodir_width_listing_right_section',
194
+		'type' => 'text',
195
+		'css' => 'min-width:300px;',
196
+		'std' => '30' // Default value to show home top section
197
+	),
198 198
 
199 199
 
200
-    array(
201
-        'name' => __('Listing content section view', 'geodirectory'),
202
-        'desc' => __('Set the listing view of listing page', 'geodirectory'),
203
-        'id' => 'geodir_listing_view',
204
-        'css' => 'min-width:300px;',
205
-        'std' => 'gridview_onehalf',
206
-        'type' => 'select',
207
-        'class' => 'chosen_select',
208
-        'options' => array_unique(array(
209
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
210
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
211
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
212
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
213
-            'listview' => __('List view', 'geodirectory'),
214
-        ))
215
-    ),
200
+	array(
201
+		'name' => __('Listing content section view', 'geodirectory'),
202
+		'desc' => __('Set the listing view of listing page', 'geodirectory'),
203
+		'id' => 'geodir_listing_view',
204
+		'css' => 'min-width:300px;',
205
+		'std' => 'gridview_onehalf',
206
+		'type' => 'select',
207
+		'class' => 'chosen_select',
208
+		'options' => array_unique(array(
209
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
210
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
211
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
212
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
213
+			'listview' => __('List view', 'geodirectory'),
214
+		))
215
+	),
216 216
 
217
-    array(
218
-        'name' => __('Width of listing content section', 'geodirectory'),
219
-        'desc' => __('Enter the width of content section of listing page in %', 'geodirectory'),
220
-        'id' => 'geodir_width_listing_contant_section',
221
-        'type' => 'text',
222
-        'css' => 'min-width:300px;',
223
-        'std' => '63' // Default value to show home top section
224
-    ),
217
+	array(
218
+		'name' => __('Width of listing content section', 'geodirectory'),
219
+		'desc' => __('Enter the width of content section of listing page in %', 'geodirectory'),
220
+		'id' => 'geodir_width_listing_contant_section',
221
+		'type' => 'text',
222
+		'css' => 'min-width:300px;',
223
+		'std' => '63' // Default value to show home top section
224
+	),
225 225
 
226
-    array(
227
-        'name' => __('Listing left section', 'geodirectory'),
228
-        'desc' => __('Show the left section of listing page', 'geodirectory'),
229
-        'id' => 'geodir_show_listing_left_section',
230
-        'type' => 'checkbox',
231
-        'std' => '0' // Default value to show home top section
232
-    ),
226
+	array(
227
+		'name' => __('Listing left section', 'geodirectory'),
228
+		'desc' => __('Show the left section of listing page', 'geodirectory'),
229
+		'id' => 'geodir_show_listing_left_section',
230
+		'type' => 'checkbox',
231
+		'std' => '0' // Default value to show home top section
232
+	),
233 233
 
234
-    array(
235
-        'name' => __('Width of listing left section', 'geodirectory'),
236
-        'desc' => __('Enter the width of left section of listing in %', 'geodirectory'),
237
-        'id' => 'geodir_width_listing_left_section',
238
-        'type' => 'text',
239
-        'css' => 'min-width:300px;',
240
-        'std' => '30' // Default value to show home top section
241
-    ),
234
+	array(
235
+		'name' => __('Width of listing left section', 'geodirectory'),
236
+		'desc' => __('Enter the width of left section of listing in %', 'geodirectory'),
237
+		'id' => 'geodir_width_listing_left_section',
238
+		'type' => 'text',
239
+		'css' => 'min-width:300px;',
240
+		'std' => '30' // Default value to show home top section
241
+	),
242 242
 
243
-    array(
244
-        'name' => __('Listing bottom section', 'geodirectory'),
245
-        'desc' => __('Show the bottom section of listing page', 'geodirectory'),
246
-        'id' => 'geodir_show_listing_bottom_section',
247
-        'type' => 'checkbox',
248
-        'std' => '0' // Default value to show home top section
249
-    ),
243
+	array(
244
+		'name' => __('Listing bottom section', 'geodirectory'),
245
+		'desc' => __('Show the bottom section of listing page', 'geodirectory'),
246
+		'id' => 'geodir_show_listing_bottom_section',
247
+		'type' => 'checkbox',
248
+		'std' => '0' // Default value to show home top section
249
+	),
250 250
 
251
-    array(
252
-        'name' => __('Upload listing no image', 'geodirectory'),
253
-        'desc' => '',
254
-        'id' => 'geodir_listing_no_img',
255
-        'type' => 'file',
256
-        'std' => '0' // Default value to show home top section
257
-    ),
251
+	array(
252
+		'name' => __('Upload listing no image', 'geodirectory'),
253
+		'desc' => '',
254
+		'id' => 'geodir_listing_no_img',
255
+		'type' => 'file',
256
+		'std' => '0' // Default value to show home top section
257
+	),
258 258
 
259
-    array(
260
-        'name' => __('Description word limit', 'geodirectory'),
261
-        'desc' => '',
262
-        'id' => 'geodir_desc_word_limit',
263
-        'type' => 'text',
264
-        'css' => 'min-width:300px;',
265
-        'std' => '50' // Default value to show home top section
266
-    ),
259
+	array(
260
+		'name' => __('Description word limit', 'geodirectory'),
261
+		'desc' => '',
262
+		'id' => 'geodir_desc_word_limit',
263
+		'type' => 'text',
264
+		'css' => 'min-width:300px;',
265
+		'std' => '50' // Default value to show home top section
266
+	),
267 267
 
268
-    array(
269
-        'name' => __('Hover listing map animation', 'geodirectory'),
270
-        'desc' => __('Bounce map pin if listing hovered', 'geodirectory'),
271
-        'id' => 'geodir_listing_hover_bounce_map_pin',
272
-        'type' => 'checkbox',
273
-        'std' => '1' // Default value to show home top section
274
-    ),
268
+	array(
269
+		'name' => __('Hover listing map animation', 'geodirectory'),
270
+		'desc' => __('Bounce map pin if listing hovered', 'geodirectory'),
271
+		'id' => 'geodir_listing_hover_bounce_map_pin',
272
+		'type' => 'checkbox',
273
+		'std' => '1' // Default value to show home top section
274
+	),
275 275
 
276
-    array('type' => 'sectionend', 'id' => 'geodir_listing_layout'),
276
+	array('type' => 'sectionend', 'id' => 'geodir_listing_layout'),
277 277
 
278 278
 
279
-    array('name' => __('Listing General Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_listing_gen_settings '),
279
+	array('name' => __('Listing General Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_listing_gen_settings '),
280 280
 
281
-    array(
282
-        'name' => __('New listing default status', 'geodirectory'),
283
-        'desc' => __('Select new listing default status.', 'geodirectory'),
284
-        'tip' => '',
285
-        'id' => 'geodir_new_post_default_status',
286
-        'css' => 'min-width:300px;',
287
-        'std' => 'publish',
288
-        'type' => 'select',
289
-        'class' => 'chosen_select',
290
-        'options' => array_unique(array(
291
-            'publish' => __('publish', 'geodirectory'),
292
-            'draft' => __('draft', 'geodirectory'),
293
-        ))
294
-    ),
281
+	array(
282
+		'name' => __('New listing default status', 'geodirectory'),
283
+		'desc' => __('Select new listing default status.', 'geodirectory'),
284
+		'tip' => '',
285
+		'id' => 'geodir_new_post_default_status',
286
+		'css' => 'min-width:300px;',
287
+		'std' => 'publish',
288
+		'type' => 'select',
289
+		'class' => 'chosen_select',
290
+		'options' => array_unique(array(
291
+			'publish' => __('publish', 'geodirectory'),
292
+			'draft' => __('draft', 'geodirectory'),
293
+		))
294
+	),
295 295
 
296
-    array(
297
-        'name' => __('New listings settings', 'geodirectory'),
298
-        'desc' => __('Enter number of days a listing will appear new.(enter 0 to disable feature)', 'geodirectory'),
299
-        'id' => 'geodir_listing_new_days',
300
-        'type' => 'text',
301
-        'css' => 'min-width:300px;',
302
-        'std' => '30' // Default value for the page title - changed in settings
303
-    ),
296
+	array(
297
+		'name' => __('New listings settings', 'geodirectory'),
298
+		'desc' => __('Enter number of days a listing will appear new.(enter 0 to disable feature)', 'geodirectory'),
299
+		'id' => 'geodir_listing_new_days',
300
+		'type' => 'text',
301
+		'css' => 'min-width:300px;',
302
+		'std' => '30' // Default value for the page title - changed in settings
303
+	),
304 304
 
305
-    array('type' => 'sectionend', 'id' => 'geodir_listing_gen_settings'),
305
+	array('type' => 'sectionend', 'id' => 'geodir_listing_gen_settings'),
306 306
 
307 307
 
308
-    array('name' => __('Add Listing Form Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_add_listing_gen_settings'),
308
+	array('name' => __('Add Listing Form Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_add_listing_gen_settings'),
309 309
 
310
-    array(
311
-        'name' => __('Enable "Accept Terms and Conditions"', 'geodirectory'),
312
-        'desc' => __('Show the "Accept Terms and Conditions" field on add listing.', 'geodirectory'),
313
-        'id' => 'geodir_accept_term_condition',
314
-        'type' => 'checkbox',
315
-        'std' => '1' // Default value to show home top section
316
-    ),
310
+	array(
311
+		'name' => __('Enable "Accept Terms and Conditions"', 'geodirectory'),
312
+		'desc' => __('Show the "Accept Terms and Conditions" field on add listing.', 'geodirectory'),
313
+		'id' => 'geodir_accept_term_condition',
314
+		'type' => 'checkbox',
315
+		'std' => '1' // Default value to show home top section
316
+	),
317 317
 
318 318
 
319
-    array(
320
-        'name' => __('Show description field as editor', 'geodirectory'),
321
-        'desc' => __('Select post types to show advanced editor on add listing page.', 'geodirectory'),
322
-        'tip' => '',
323
-        'id' => 'geodir_tiny_editor_on_add_listing',
324
-        'css' => 'min-width:300px;',
325
-        'std' => array(),
326
-        'type' => 'multiselect',
327
-        'placeholder_text' => __('Select post types', 'geodirectory'),
328
-        'class' => 'chosen_select',
329
-        'options' => array_unique(geodir_post_type_setting_fun())
330
-    ),
319
+	array(
320
+		'name' => __('Show description field as editor', 'geodirectory'),
321
+		'desc' => __('Select post types to show advanced editor on add listing page.', 'geodirectory'),
322
+		'tip' => '',
323
+		'id' => 'geodir_tiny_editor_on_add_listing',
324
+		'css' => 'min-width:300px;',
325
+		'std' => array(),
326
+		'type' => 'multiselect',
327
+		'placeholder_text' => __('Select post types', 'geodirectory'),
328
+		'class' => 'chosen_select',
329
+		'options' => array_unique(geodir_post_type_setting_fun())
330
+	),
331 331
 
332
-    array('type' => 'sectionend', 'id' => 'geodir_add_listing_gen_settings'),
333
-    /* Listing Layout Settings end */
332
+	array('type' => 'sectionend', 'id' => 'geodir_add_listing_gen_settings'),
333
+	/* Listing Layout Settings end */
334 334
 
335 335
 
336
-    /* Search Layout Settings end */
336
+	/* Search Layout Settings end */
337 337
 
338
-    array('name' => __('Search', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_search_settings '),
338
+	array('name' => __('Search', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_search_settings '),
339 339
 
340 340
 
341
-    array('name' => __('Search Page Layout Settings', 'geodirectory'),
342
-        'type' => 'sectionstart',
343
-        'desc' => '',
344
-        'id' => 'geodir_search_layout'),
341
+	array('name' => __('Search Page Layout Settings', 'geodirectory'),
342
+		'type' => 'sectionstart',
343
+		'desc' => '',
344
+		'id' => 'geodir_search_layout'),
345 345
 
346
-    array(
347
-        'name' => __('Search top section', 'geodirectory'),
348
-        'desc' => __('Show the top section of search page', 'geodirectory'),
349
-        'id' => 'geodir_show_search_top_section',
350
-        'type' => 'checkbox',
351
-        'std' => '1' // Default value to show home top section
352
-    ),
346
+	array(
347
+		'name' => __('Search top section', 'geodirectory'),
348
+		'desc' => __('Show the top section of search page', 'geodirectory'),
349
+		'id' => 'geodir_show_search_top_section',
350
+		'type' => 'checkbox',
351
+		'std' => '1' // Default value to show home top section
352
+	),
353 353
 
354
-    array(
355
-        'name' => __('Search right section', 'geodirectory'),
356
-        'desc' => __('Show the right section of search page', 'geodirectory'),
357
-        'id' => 'geodir_show_search_right_section',
358
-        'type' => 'checkbox',
359
-        'std' => '1' // Default value to show home top section
360
-    ),
354
+	array(
355
+		'name' => __('Search right section', 'geodirectory'),
356
+		'desc' => __('Show the right section of search page', 'geodirectory'),
357
+		'id' => 'geodir_show_search_right_section',
358
+		'type' => 'checkbox',
359
+		'std' => '1' // Default value to show home top section
360
+	),
361 361
 
362
-    array(
363
-        'name' => __('Width of search right section', 'geodirectory'),
364
-        'desc' => __('Enter the width of right section of search page in %', 'geodirectory'),
365
-        'id' => 'geodir_width_search_right_section',
366
-        'type' => 'text',
367
-        'css' => 'min-width:300px;',
368
-        'std' => '30' // Default value to show home top section
369
-    ),
362
+	array(
363
+		'name' => __('Width of search right section', 'geodirectory'),
364
+		'desc' => __('Enter the width of right section of search page in %', 'geodirectory'),
365
+		'id' => 'geodir_width_search_right_section',
366
+		'type' => 'text',
367
+		'css' => 'min-width:300px;',
368
+		'std' => '30' // Default value to show home top section
369
+	),
370 370
 
371 371
 
372
-    array(
373
-        'name' => __('Search content section view', 'geodirectory'),
374
-        'desc' => __('Set the listing view of search page', 'geodirectory'),
375
-        'id' => 'geodir_search_view',
376
-        'css' => 'min-width:300px;',
377
-        'std' => 'gridview_onehalf',
378
-        'type' => 'select',
379
-        'class' => 'chosen_select',
380
-        'options' => array_unique(array(
381
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
382
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
383
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
384
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
385
-            'listview' => __('List view', 'geodirectory'),
386
-        ))
387
-    ),
372
+	array(
373
+		'name' => __('Search content section view', 'geodirectory'),
374
+		'desc' => __('Set the listing view of search page', 'geodirectory'),
375
+		'id' => 'geodir_search_view',
376
+		'css' => 'min-width:300px;',
377
+		'std' => 'gridview_onehalf',
378
+		'type' => 'select',
379
+		'class' => 'chosen_select',
380
+		'options' => array_unique(array(
381
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
382
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
383
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
384
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
385
+			'listview' => __('List view', 'geodirectory'),
386
+		))
387
+	),
388 388
 
389
-    array(
390
-        'name' => __('Width of search content section', 'geodirectory'),
391
-        'desc' => __('Enter the width of content section of search page in %', 'geodirectory'),
392
-        'id' => 'geodir_width_search_contant_section',
393
-        'type' => 'text',
394
-        'css' => 'min-width:300px;',
395
-        'std' => '63' // Default value to show home top section
396
-    ),
389
+	array(
390
+		'name' => __('Width of search content section', 'geodirectory'),
391
+		'desc' => __('Enter the width of content section of search page in %', 'geodirectory'),
392
+		'id' => 'geodir_width_search_contant_section',
393
+		'type' => 'text',
394
+		'css' => 'min-width:300px;',
395
+		'std' => '63' // Default value to show home top section
396
+	),
397 397
 
398
-    array(
399
-        'name' => __('Search left section', 'geodirectory'),
400
-        'desc' => __('Show the left section of search page', 'geodirectory'),
401
-        'id' => 'geodir_show_search_left_section',
402
-        'type' => 'checkbox',
403
-        'std' => '0' // Default value to show home top section
404
-    ),
398
+	array(
399
+		'name' => __('Search left section', 'geodirectory'),
400
+		'desc' => __('Show the left section of search page', 'geodirectory'),
401
+		'id' => 'geodir_show_search_left_section',
402
+		'type' => 'checkbox',
403
+		'std' => '0' // Default value to show home top section
404
+	),
405 405
 
406
-    array(
407
-        'name' => __('Width of search left section', 'geodirectory'),
408
-        'desc' => __('Enter the width of left section of search in %', 'geodirectory'),
409
-        'id' => 'geodir_width_search_left_section',
410
-        'type' => 'text',
411
-        'css' => 'min-width:300px;',
412
-        'std' => '30' // Default value to show home top section
413
-    ),
406
+	array(
407
+		'name' => __('Width of search left section', 'geodirectory'),
408
+		'desc' => __('Enter the width of left section of search in %', 'geodirectory'),
409
+		'id' => 'geodir_width_search_left_section',
410
+		'type' => 'text',
411
+		'css' => 'min-width:300px;',
412
+		'std' => '30' // Default value to show home top section
413
+	),
414 414
 
415
-    array(
416
-        'name' => __('Search bottom section', 'geodirectory'),
417
-        'desc' => __('Show the bottom section of search page', 'geodirectory'),
418
-        'id' => 'geodir_show_search_bottom_section',
419
-        'type' => 'checkbox',
420
-        'std' => '0' // Default value to show home top section
421
-    ),
415
+	array(
416
+		'name' => __('Search bottom section', 'geodirectory'),
417
+		'desc' => __('Show the bottom section of search page', 'geodirectory'),
418
+		'id' => 'geodir_show_search_bottom_section',
419
+		'type' => 'checkbox',
420
+		'std' => '0' // Default value to show home top section
421
+	),
422 422
 	
423 423
 	array(
424
-        'name' => __('Show advanced pagination details', 'geodirectory'),
425
-        'desc' => __('This will add extra pagination info like "Showing listings x-y of z" after/before pagination.', 'geodirectory'),
426
-        'id' => 'geodir_pagination_advance_info',
427
-        'css' => 'min-width:300px;',
428
-        'std' => '',
429
-        'type' => 'select',
430
-        'class' => 'chosen_select',
431
-        'options' => array(
424
+		'name' => __('Show advanced pagination details', 'geodirectory'),
425
+		'desc' => __('This will add extra pagination info like "Showing listings x-y of z" after/before pagination.', 'geodirectory'),
426
+		'id' => 'geodir_pagination_advance_info',
427
+		'css' => 'min-width:300px;',
428
+		'std' => '',
429
+		'type' => 'select',
430
+		'class' => 'chosen_select',
431
+		'options' => array(
432 432
 						'' => __('Never Display', 'geodirectory'),
433 433
 						'after' => __('After Pagination', 'geodirectory'),
434 434
 						'before' => __('Before Pagination', 'geodirectory')
435 435
 					)
436
-    ),
436
+	),
437 437
 
438
-    array('type' => 'sectionend', 'id' => 'geodir_search_layout'),
438
+	array('type' => 'sectionend', 'id' => 'geodir_search_layout'),
439 439
 
440 440
 
441
-    array('name' => __('Search form default text settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_search_form_default_text_settings'),
441
+	array('name' => __('Search form default text settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_search_form_default_text_settings'),
442 442
 
443
-    array(
444
-        'name' => __('Search field default value', 'geodirectory'),
445
-        'desc' => __('Show the search text box \'placeholder\' value on search form.', 'geodirectory'),
446
-        'id' => 'geodir_search_field_default_text',
447
-        'type' => 'text',
448
-        'css' => 'min-width:300px;',
449
-        'std' => 'Search for' // show on the listing page.
450
-    ),
443
+	array(
444
+		'name' => __('Search field default value', 'geodirectory'),
445
+		'desc' => __('Show the search text box \'placeholder\' value on search form.', 'geodirectory'),
446
+		'id' => 'geodir_search_field_default_text',
447
+		'type' => 'text',
448
+		'css' => 'min-width:300px;',
449
+		'std' => 'Search for' // show on the listing page.
450
+	),
451 451
 
452
-    array(
453
-        'name' => __('Near field default value', 'geodirectory'),
454
-        'desc' => __('Show the near text box \'placeholder\' value on search form.', 'geodirectory'),
455
-        'id' => 'geodir_near_field_default_text',
456
-        'type' => 'text',
457
-        'css' => 'min-width:300px;',
458
-        'std' => 'Near' // show on the listing page.
459
-    ),
452
+	array(
453
+		'name' => __('Near field default value', 'geodirectory'),
454
+		'desc' => __('Show the near text box \'placeholder\' value on search form.', 'geodirectory'),
455
+		'id' => 'geodir_near_field_default_text',
456
+		'type' => 'text',
457
+		'css' => 'min-width:300px;',
458
+		'std' => 'Near' // show on the listing page.
459
+	),
460 460
 
461
-    array(
462
-        'name' => __('Search button label', 'geodirectory'),
463
-        'desc' => __('Show the search button label on search form.', 'geodirectory'),
464
-        'id' => 'geodir_search_button_label',
465
-        'type' => 'text',
466
-        'css' => 'min-width:300px;',
467
-        'std' => 'Search' // show on the listing page.
468
-    ),
461
+	array(
462
+		'name' => __('Search button label', 'geodirectory'),
463
+		'desc' => __('Show the search button label on search form.', 'geodirectory'),
464
+		'id' => 'geodir_search_button_label',
465
+		'type' => 'text',
466
+		'css' => 'min-width:300px;',
467
+		'std' => 'Search' // show on the listing page.
468
+	),
469 469
 
470
-    array('type' => 'sectionend', 'id' => 'geodir_search_form_default_text_settings'),
470
+	array('type' => 'sectionend', 'id' => 'geodir_search_form_default_text_settings'),
471 471
 
472
-    /* Listing Layout Settings end */
472
+	/* Listing Layout Settings end */
473 473
 
474 474
 
475
-    /* Detail Layout Settings end */
475
+	/* Detail Layout Settings end */
476 476
 
477
-    array('name' => __('Detail', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_detail_settings '),
477
+	array('name' => __('Detail', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_detail_settings '),
478 478
 
479
-    array('name' => __('Detail/Single Page Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_settings '),
479
+	array('name' => __('Detail/Single Page Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_settings '),
480 480
 
481
-    array(
482
-        'name' => __('Detail top section', 'geodirectory'),
483
-        'desc' => __('Show the top section of listing page', 'geodirectory'),
484
-        'id' => 'geodir_show_detail_top_section',
485
-        'type' => 'checkbox',
486
-        'std' => '1' // Default value to show home top section
487
-    ),
481
+	array(
482
+		'name' => __('Detail top section', 'geodirectory'),
483
+		'desc' => __('Show the top section of listing page', 'geodirectory'),
484
+		'id' => 'geodir_show_detail_top_section',
485
+		'type' => 'checkbox',
486
+		'std' => '1' // Default value to show home top section
487
+	),
488 488
 
489
-    array(
490
-        'name' => __('Detail bottom section', 'geodirectory'),
491
-        'desc' => __('Show the bottom section of listing page', 'geodirectory'),
492
-        'id' => 'geodir_show_detail_bottom_section',
493
-        'type' => 'checkbox',
494
-        'std' => '1' // Default value to show home top section
495
-    ),
496
-    array(
497
-        'name' => __('Detail sidebar section on left side', 'geodirectory'),
498
-        'desc' => __('Display detail sidebar section on left side of the detail page', 'geodirectory'),
499
-        'id' => 'geodir_detail_sidebar_left_section',
500
-        'type' => 'checkbox',
501
-        'std' => '0'
502
-    ),
503
-    array(
504
-        'name' => __('Disable GD modal', 'geodirectory'),
505
-        'desc' => __('Disable GD modal that displays slideshow images in popup', 'geodirectory'),
506
-        'id' => 'geodir_disable_gb_modal',
507
-        'type' => 'checkbox',
508
-        'std' => '0'
509
-    ),
510
-    array(
511
-        'name' => __('Disable Tweet, Fb Like, Google+ buttons section', 'geodirectory'),
512
-        'desc' => __('Disable Tweet, Fb Like, Google+ buttons section that displays on Detail page sidebar', 'geodirectory'),
513
-        'id' => 'geodir_disable_tfg_buttons_section',
514
-        'type' => 'checkbox',
515
-        'std' => '0'
516
-    ),
517
-    array(
518
-        'name' => __('Disable share this button section', 'geodirectory'),
519
-        'desc' => __('Disable share this button section that displays on Detail page sidebar', 'geodirectory'),
520
-        'id' => 'geodir_disable_sharethis_button_section',
521
-        'type' => 'checkbox',
522
-        'std' => '0'
523
-    ),
524
-    array(
525
-        'name' => __('Disable Google Analytics section', 'geodirectory'),
526
-        'desc' => __('Disable Google Analytics section that displays on Detail page sidebar', 'geodirectory'),
527
-        'id' => 'geodir_disable_google_analytics_section',
528
-        'type' => 'checkbox',
529
-        'std' => '0'
530
-    ),
531
-    array(
532
-        'name' => __('Disable User Links section', 'geodirectory'),
533
-        'desc' => __('Disable User Links section (Edit post, Favorite etc..) that displays on Detail page sidebar', 'geodirectory'),
534
-        'id' => 'geodir_disable_user_links_section',
535
-        'type' => 'checkbox',
536
-        'std' => '0'
537
-    ),
538
-    array(
539
-        'name' => __('Disable Rating Info section', 'geodirectory'),
540
-        'desc' => __('Disable Rating Info section that displays on Detail page sidebar', 'geodirectory'),
541
-        'id' => 'geodir_disable_rating_info_section',
542
-        'type' => 'checkbox',
543
-        'std' => '0'
544
-    ),
545
-    array(
546
-        'name' => __('Disable Listing Info section', 'geodirectory'),
547
-        'desc' => __('Disable Listing Info section that displays on Detail page sidebar', 'geodirectory'),
548
-        'id' => 'geodir_disable_listing_info_section',
549
-        'type' => 'checkbox',
550
-        'std' => '0'
551
-    ),
489
+	array(
490
+		'name' => __('Detail bottom section', 'geodirectory'),
491
+		'desc' => __('Show the bottom section of listing page', 'geodirectory'),
492
+		'id' => 'geodir_show_detail_bottom_section',
493
+		'type' => 'checkbox',
494
+		'std' => '1' // Default value to show home top section
495
+	),
496
+	array(
497
+		'name' => __('Detail sidebar section on left side', 'geodirectory'),
498
+		'desc' => __('Display detail sidebar section on left side of the detail page', 'geodirectory'),
499
+		'id' => 'geodir_detail_sidebar_left_section',
500
+		'type' => 'checkbox',
501
+		'std' => '0'
502
+	),
503
+	array(
504
+		'name' => __('Disable GD modal', 'geodirectory'),
505
+		'desc' => __('Disable GD modal that displays slideshow images in popup', 'geodirectory'),
506
+		'id' => 'geodir_disable_gb_modal',
507
+		'type' => 'checkbox',
508
+		'std' => '0'
509
+	),
510
+	array(
511
+		'name' => __('Disable Tweet, Fb Like, Google+ buttons section', 'geodirectory'),
512
+		'desc' => __('Disable Tweet, Fb Like, Google+ buttons section that displays on Detail page sidebar', 'geodirectory'),
513
+		'id' => 'geodir_disable_tfg_buttons_section',
514
+		'type' => 'checkbox',
515
+		'std' => '0'
516
+	),
517
+	array(
518
+		'name' => __('Disable share this button section', 'geodirectory'),
519
+		'desc' => __('Disable share this button section that displays on Detail page sidebar', 'geodirectory'),
520
+		'id' => 'geodir_disable_sharethis_button_section',
521
+		'type' => 'checkbox',
522
+		'std' => '0'
523
+	),
524
+	array(
525
+		'name' => __('Disable Google Analytics section', 'geodirectory'),
526
+		'desc' => __('Disable Google Analytics section that displays on Detail page sidebar', 'geodirectory'),
527
+		'id' => 'geodir_disable_google_analytics_section',
528
+		'type' => 'checkbox',
529
+		'std' => '0'
530
+	),
531
+	array(
532
+		'name' => __('Disable User Links section', 'geodirectory'),
533
+		'desc' => __('Disable User Links section (Edit post, Favorite etc..) that displays on Detail page sidebar', 'geodirectory'),
534
+		'id' => 'geodir_disable_user_links_section',
535
+		'type' => 'checkbox',
536
+		'std' => '0'
537
+	),
538
+	array(
539
+		'name' => __('Disable Rating Info section', 'geodirectory'),
540
+		'desc' => __('Disable Rating Info section that displays on Detail page sidebar', 'geodirectory'),
541
+		'id' => 'geodir_disable_rating_info_section',
542
+		'type' => 'checkbox',
543
+		'std' => '0'
544
+	),
545
+	array(
546
+		'name' => __('Disable Listing Info section', 'geodirectory'),
547
+		'desc' => __('Disable Listing Info section that displays on Detail page sidebar', 'geodirectory'),
548
+		'id' => 'geodir_disable_listing_info_section',
549
+		'type' => 'checkbox',
550
+		'std' => '0'
551
+	),
552 552
 
553
-    array('type' => 'sectionend', 'id' => 'detail_page_settings'),
553
+	array('type' => 'sectionend', 'id' => 'detail_page_settings'),
554 554
 
555 555
 
556
-    /* ---------- DETAIL PAGE TAB SETTING START*/
556
+	/* ---------- DETAIL PAGE TAB SETTING START*/
557 557
 
558
-    array('name' => __('Detail Page Tab Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_detail_page_tab_settings '),
558
+	array('name' => __('Detail Page Tab Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_detail_page_tab_settings '),
559 559
 
560
-    array(
561
-        'name' => __('Exclude selected tabs from detail page', 'geodirectory'),
562
-        'desc' => __('Select tabs to exclude from the list of all appearing tabs on detail page.', 'geodirectory'),
563
-        'tip' => '',
564
-        'id' => 'geodir_detail_page_tabs_excluded',
565
-        'css' => 'min-width:300px;',
566
-        'std' => geodir_get_posttypes(),
567
-        'type' => 'multiselect',
568
-        'placeholder_text' => __('Select tabs', 'geodirectory'),
569
-        'class' => 'chosen_select',
570
-        'options' => array_unique(geodir_detail_page_tabs_key_value_array())
571
-    ),
560
+	array(
561
+		'name' => __('Exclude selected tabs from detail page', 'geodirectory'),
562
+		'desc' => __('Select tabs to exclude from the list of all appearing tabs on detail page.', 'geodirectory'),
563
+		'tip' => '',
564
+		'id' => 'geodir_detail_page_tabs_excluded',
565
+		'css' => 'min-width:300px;',
566
+		'std' => geodir_get_posttypes(),
567
+		'type' => 'multiselect',
568
+		'placeholder_text' => __('Select tabs', 'geodirectory'),
569
+		'class' => 'chosen_select',
570
+		'options' => array_unique(geodir_detail_page_tabs_key_value_array())
571
+	),
572 572
     
573
-    array(
574
-        'name' => __('Show as list', 'geodirectory'),
575
-        'desc' => __('Show as list instead of tabs', 'geodirectory'),
576
-        'id' => 'geodir_disable_tabs',
577
-        'type' => 'checkbox',
578
-        'std' => '0'
579
-    ),
573
+	array(
574
+		'name' => __('Show as list', 'geodirectory'),
575
+		'desc' => __('Show as list instead of tabs', 'geodirectory'),
576
+		'id' => 'geodir_disable_tabs',
577
+		'type' => 'checkbox',
578
+		'std' => '0'
579
+	),
580 580
 
581
-    array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
582
-    /* ---------- DETAIL PAGE TAB SETTING END*/
581
+	array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
582
+	/* ---------- DETAIL PAGE TAB SETTING END*/
583 583
 
584
-    /* START DEFAULT STAR IMAGE*/
585
-    array('name' => __('Default Rating Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_rating_settings '),
584
+	/* START DEFAULT STAR IMAGE*/
585
+	array('name' => __('Default Rating Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_rating_settings '),
586 586
 
587
-    array(
588
-        'name' => __('Upload default rating star icon', 'geodirectory'),
589
-        'desc' => '',
590
-        'id' => 'geodir_default_rating_star_icon',
591
-        'type' => 'file',
592
-        'std' => '0',
593
-        'value' => geodir_plugin_url() . '/geodirectory-assets/images/stars.png'// Default value to show home top section
594
-    ),
587
+	array(
588
+		'name' => __('Upload default rating star icon', 'geodirectory'),
589
+		'desc' => '',
590
+		'id' => 'geodir_default_rating_star_icon',
591
+		'type' => 'file',
592
+		'std' => '0',
593
+		'value' => geodir_plugin_url() . '/geodirectory-assets/images/stars.png'// Default value to show home top section
594
+	),
595 595
 	array(
596 596
 		'name' => __('Enable Font Awesome', 'geodirectory'),
597 597
 		'desc' => __('When enabled all rating images will be using font awesome rating icons as images.', 'geodirectory' ),
@@ -607,369 +607,369 @@  discard block
 block discarded – undo
607 607
 		'std' => '#757575'
608 608
 	),
609 609
 
610
-    array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
610
+	array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
611 611
 
612
-    /* END DEFAULT STAR IMAGE*/
612
+	/* END DEFAULT STAR IMAGE*/
613 613
 
614
-    /* Detail related post settings start */
614
+	/* Detail related post settings start */
615 615
 
616
-    array('name' => __('Related Post Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_related_post_settings '),
616
+	array('name' => __('Related Post Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_related_post_settings '),
617 617
 
618
-    array(
619
-        'name' => __('Show related post listing on', 'geodirectory'),
620
-        'desc' => __('Select the post types to display related listing on detail page.', 'geodirectory'),
621
-        'tip' => '',
622
-        'id' => 'geodir_add_related_listing_posttypes',
623
-        'css' => 'min-width:300px;',
624
-        'std' => geodir_get_posttypes(),
625
-        'type' => 'multiselect',
626
-        'placeholder_text' => __('Select post types', 'geodirectory'),
627
-        'class' => 'chosen_select',
628
-        'options' => array_unique(geodir_post_type_setting_fun())
629
-    ),
618
+	array(
619
+		'name' => __('Show related post listing on', 'geodirectory'),
620
+		'desc' => __('Select the post types to display related listing on detail page.', 'geodirectory'),
621
+		'tip' => '',
622
+		'id' => 'geodir_add_related_listing_posttypes',
623
+		'css' => 'min-width:300px;',
624
+		'std' => geodir_get_posttypes(),
625
+		'type' => 'multiselect',
626
+		'placeholder_text' => __('Select post types', 'geodirectory'),
627
+		'class' => 'chosen_select',
628
+		'options' => array_unique(geodir_post_type_setting_fun())
629
+	),
630 630
 
631
-    array(
632
-        'name' => __('Relate to', 'geodirectory'),
633
-        'desc' => __('Set the relation between current post to related posts.', 'geodirectory'),
634
-        'id' => 'geodir_related_post_relate_to',
635
-        'css' => 'min-width:300px;',
636
-        'std' => 'category',
637
-        'type' => 'select',
638
-        'class' => 'chosen_select',
639
-        'options' => array_unique(array(
640
-            'category' => __('Categories', 'geodirectory'),
641
-            'tags' => __('Tags', 'geodirectory'),
642
-        ))
643
-    ),
631
+	array(
632
+		'name' => __('Relate to', 'geodirectory'),
633
+		'desc' => __('Set the relation between current post to related posts.', 'geodirectory'),
634
+		'id' => 'geodir_related_post_relate_to',
635
+		'css' => 'min-width:300px;',
636
+		'std' => 'category',
637
+		'type' => 'select',
638
+		'class' => 'chosen_select',
639
+		'options' => array_unique(array(
640
+			'category' => __('Categories', 'geodirectory'),
641
+			'tags' => __('Tags', 'geodirectory'),
642
+		))
643
+	),
644 644
 
645
-    array(
646
-        'name' => __('Layout', 'geodirectory'),
647
-        'desc' => __('Set the listing view of relate post on detail page', 'geodirectory'),
648
-        'id' => 'geodir_related_post_listing_view',
649
-        'css' => 'min-width:300px;',
650
-        'std' => 'gridview_onehalf',
651
-        'type' => 'select',
652
-        'class' => 'chosen_select',
653
-        'options' => array_unique(array(
654
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
655
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
656
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
657
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
658
-            'listview' => __('List view', 'geodirectory'),
659
-        ))
660
-    ),
645
+	array(
646
+		'name' => __('Layout', 'geodirectory'),
647
+		'desc' => __('Set the listing view of relate post on detail page', 'geodirectory'),
648
+		'id' => 'geodir_related_post_listing_view',
649
+		'css' => 'min-width:300px;',
650
+		'std' => 'gridview_onehalf',
651
+		'type' => 'select',
652
+		'class' => 'chosen_select',
653
+		'options' => array_unique(array(
654
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
655
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
656
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
657
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
658
+			'listview' => __('List view', 'geodirectory'),
659
+		))
660
+	),
661 661
 
662
-    array(
663
-        'name' => __('Sort by', 'geodirectory'),
664
-        'desc' => __('Set the related post listing sort by view', 'geodirectory'),
665
-        'id' => 'geodir_related_post_sortby',
666
-        'css' => 'min-width:300px;',
667
-        'std' => 'latest',
668
-        'type' => 'select',
669
-        'class' => 'chosen_select',
670
-        'options' => array_unique(array(
671
-            'latest' => __('Latest', 'geodirectory'),
672
-            'featured' => __('Featured', 'geodirectory'),
673
-            'high_review' => __('Review', 'geodirectory'),
674
-            'high_rating' => __('Rating', 'geodirectory'),
675
-            'random' => __('Random', 'geodirectory'),
676
-            'nearest' => __('Nearest', 'geodirectory'),
677
-        ))
678
-    ),
662
+	array(
663
+		'name' => __('Sort by', 'geodirectory'),
664
+		'desc' => __('Set the related post listing sort by view', 'geodirectory'),
665
+		'id' => 'geodir_related_post_sortby',
666
+		'css' => 'min-width:300px;',
667
+		'std' => 'latest',
668
+		'type' => 'select',
669
+		'class' => 'chosen_select',
670
+		'options' => array_unique(array(
671
+			'latest' => __('Latest', 'geodirectory'),
672
+			'featured' => __('Featured', 'geodirectory'),
673
+			'high_review' => __('Review', 'geodirectory'),
674
+			'high_rating' => __('Rating', 'geodirectory'),
675
+			'random' => __('Random', 'geodirectory'),
676
+			'nearest' => __('Nearest', 'geodirectory'),
677
+		))
678
+	),
679 679
 
680
-    array(
681
-        'name' => __('Number of posts:', 'geodirectory'),
682
-        'desc' => __('Enter number of posts to display on related posts listing', 'geodirectory'),
683
-        'id' => 'geodir_related_post_count',
684
-        'type' => 'text',
685
-        'css' => 'min-width:300px;',
686
-        'std' => '5' // Default value to show home top section
687
-    ),
680
+	array(
681
+		'name' => __('Number of posts:', 'geodirectory'),
682
+		'desc' => __('Enter number of posts to display on related posts listing', 'geodirectory'),
683
+		'id' => 'geodir_related_post_count',
684
+		'type' => 'text',
685
+		'css' => 'min-width:300px;',
686
+		'std' => '5' // Default value to show home top section
687
+	),
688 688
 
689
-    array(
690
-        'name' => __('Post excerpt', 'geodirectory'),
691
-        'desc' => __('Post content excerpt character count', 'geodirectory'),
692
-        'id' => 'geodir_related_post_excerpt',
693
-        'type' => 'text',
694
-        'css' => 'min-width:300px;',
695
-        'std' => '20' // Default value to show home top section
696
-    ),
689
+	array(
690
+		'name' => __('Post excerpt', 'geodirectory'),
691
+		'desc' => __('Post content excerpt character count', 'geodirectory'),
692
+		'id' => 'geodir_related_post_excerpt',
693
+		'type' => 'text',
694
+		'css' => 'min-width:300px;',
695
+		'std' => '20' // Default value to show home top section
696
+	),
697 697
 
698 698
 
699
-    array('type' => 'sectionend', 'id' => 'detail_page_related_post_settings'),
700
-    /* Detail Layout Settings end */
699
+	array('type' => 'sectionend', 'id' => 'detail_page_related_post_settings'),
700
+	/* Detail Layout Settings end */
701 701
 
702
-    /* Author Layout Settings Start */
702
+	/* Author Layout Settings Start */
703 703
 
704
-    array('name' => __('Author', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_author_settings '),
704
+	array('name' => __('Author', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_author_settings '),
705 705
 
706 706
 
707
-    array('name' => __('Author Page Layout Settings', 'geodirectory'),
708
-        'type' => 'sectionstart',
709
-        'desc' => '',
710
-        'id' => 'geodir_author_layout'),
707
+	array('name' => __('Author Page Layout Settings', 'geodirectory'),
708
+		'type' => 'sectionstart',
709
+		'desc' => '',
710
+		'id' => 'geodir_author_layout'),
711 711
 
712
-    array(
713
-        'name' => __('Author top section', 'geodirectory'),
714
-        'desc' => __('Show the top section of author page', 'geodirectory'),
715
-        'id' => 'geodir_show_author_top_section',
716
-        'type' => 'checkbox',
717
-        'std' => '1' // Default value to show home top section
718
-    ),
712
+	array(
713
+		'name' => __('Author top section', 'geodirectory'),
714
+		'desc' => __('Show the top section of author page', 'geodirectory'),
715
+		'id' => 'geodir_show_author_top_section',
716
+		'type' => 'checkbox',
717
+		'std' => '1' // Default value to show home top section
718
+	),
719 719
 
720
-    array(
721
-        'name' => __('Author right section', 'geodirectory'),
722
-        'desc' => __('Show the right section of author page', 'geodirectory'),
723
-        'id' => 'geodir_show_author_right_section',
724
-        'type' => 'checkbox',
725
-        'std' => '1' // Default value to show home top section
726
-    ),
720
+	array(
721
+		'name' => __('Author right section', 'geodirectory'),
722
+		'desc' => __('Show the right section of author page', 'geodirectory'),
723
+		'id' => 'geodir_show_author_right_section',
724
+		'type' => 'checkbox',
725
+		'std' => '1' // Default value to show home top section
726
+	),
727 727
 
728
-    array(
729
-        'name' => __('Width of author right section', 'geodirectory'),
730
-        'desc' => __('Enter the width of right section of author page in %', 'geodirectory'),
731
-        'id' => 'geodir_width_author_right_section',
732
-        'type' => 'text',
733
-        'css' => 'min-width:300px;',
734
-        'std' => '30' // Default value to show home top section
735
-    ),
728
+	array(
729
+		'name' => __('Width of author right section', 'geodirectory'),
730
+		'desc' => __('Enter the width of right section of author page in %', 'geodirectory'),
731
+		'id' => 'geodir_width_author_right_section',
732
+		'type' => 'text',
733
+		'css' => 'min-width:300px;',
734
+		'std' => '30' // Default value to show home top section
735
+	),
736 736
 
737
-    array(
738
-        'name' => __('Author content section view', 'geodirectory'),
739
-        'desc' => __('Set the listing view of author page', 'geodirectory'),
740
-        'id' => 'geodir_author_view',
741
-        'css' => 'min-width:300px;',
742
-        'std' => 'gridview_onehalf',
743
-        'type' => 'select',
744
-        'class' => 'chosen_select',
745
-        'options' => array_unique(array(
746
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
747
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
748
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
749
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
750
-            'listview' => __('List view', 'geodirectory'),
751
-        ))
752
-    ),
737
+	array(
738
+		'name' => __('Author content section view', 'geodirectory'),
739
+		'desc' => __('Set the listing view of author page', 'geodirectory'),
740
+		'id' => 'geodir_author_view',
741
+		'css' => 'min-width:300px;',
742
+		'std' => 'gridview_onehalf',
743
+		'type' => 'select',
744
+		'class' => 'chosen_select',
745
+		'options' => array_unique(array(
746
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
747
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
748
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
749
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
750
+			'listview' => __('List view', 'geodirectory'),
751
+		))
752
+	),
753 753
 
754
-    array(
755
-        'name' => __('Width of author content section', 'geodirectory'),
756
-        'desc' => __('Enter the width of content section of author page in %', 'geodirectory'),
757
-        'id' => 'geodir_width_author_contant_section',
758
-        'type' => 'text',
759
-        'css' => 'min-width:300px;',
760
-        'std' => '63' // Default value to show home top section
761
-    ),
754
+	array(
755
+		'name' => __('Width of author content section', 'geodirectory'),
756
+		'desc' => __('Enter the width of content section of author page in %', 'geodirectory'),
757
+		'id' => 'geodir_width_author_contant_section',
758
+		'type' => 'text',
759
+		'css' => 'min-width:300px;',
760
+		'std' => '63' // Default value to show home top section
761
+	),
762 762
 
763
-    array(
764
-        'name' => __('Author left section', 'geodirectory'),
765
-        'desc' => __('Show the left section of author page', 'geodirectory'),
766
-        'id' => 'geodir_show_author_left_section',
767
-        'type' => 'checkbox',
768
-        'std' => '0' // Default value to show home top section
769
-    ),
763
+	array(
764
+		'name' => __('Author left section', 'geodirectory'),
765
+		'desc' => __('Show the left section of author page', 'geodirectory'),
766
+		'id' => 'geodir_show_author_left_section',
767
+		'type' => 'checkbox',
768
+		'std' => '0' // Default value to show home top section
769
+	),
770 770
 
771
-    array(
772
-        'name' => __('Width of author left section', 'geodirectory'),
773
-        'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
774
-        'id' => 'geodir_width_author_left_section',
775
-        'type' => 'text',
776
-        'css' => 'min-width:300px;',
777
-        'std' => '30' // Default value to show home top section
778
-    ),
771
+	array(
772
+		'name' => __('Width of author left section', 'geodirectory'),
773
+		'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
774
+		'id' => 'geodir_width_author_left_section',
775
+		'type' => 'text',
776
+		'css' => 'min-width:300px;',
777
+		'std' => '30' // Default value to show home top section
778
+	),
779 779
 
780
-    array(
781
-        'name' => __('Author bottom section', 'geodirectory'),
782
-        'desc' => __('Show the bottom section of author page', 'geodirectory'),
783
-        'id' => 'geodir_show_author_bottom_section',
784
-        'type' => 'checkbox',
785
-        'std' => '0' // Default value to show home top section
786
-    ),
780
+	array(
781
+		'name' => __('Author bottom section', 'geodirectory'),
782
+		'desc' => __('Show the bottom section of author page', 'geodirectory'),
783
+		'id' => 'geodir_show_author_bottom_section',
784
+		'type' => 'checkbox',
785
+		'std' => '0' // Default value to show home top section
786
+	),
787 787
 
788 788
 
789
-    array(
790
-        'name' => __('Description word limit', 'geodirectory'),
791
-        'desc' => '',
792
-        'id' => 'geodir_author_desc_word_limit',
793
-        'type' => 'text',
794
-        'css' => 'min-width:300px;',
795
-        'std' => '50' // Default value to show home top section
796
-    ),
789
+	array(
790
+		'name' => __('Description word limit', 'geodirectory'),
791
+		'desc' => '',
792
+		'id' => 'geodir_author_desc_word_limit',
793
+		'type' => 'text',
794
+		'css' => 'min-width:300px;',
795
+		'std' => '50' // Default value to show home top section
796
+	),
797 797
 
798
-    array('type' => 'sectionend', 'id' => 'geodir_author_layout'),
799
-    /* Author Layout Settings end */
798
+	array('type' => 'sectionend', 'id' => 'geodir_author_layout'),
799
+	/* Author Layout Settings end */
800 800
 
801 801
 
802
-    /* Post Type Navigation Settings Start */
803
-    array('name' => __('Navigation', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_navigation_settings'),
802
+	/* Post Type Navigation Settings Start */
803
+	array('name' => __('Navigation', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_navigation_settings'),
804 804
 
805 805
 
806
-    /* Post Type Navigation Settings Start */
806
+	/* Post Type Navigation Settings Start */
807 807
 
808
-    array('name' => __('Navigation Locations', 'geodirectory'),
809
-        'type' => 'sectionstart',
810
-        'desc' => '',
811
-        'id' => 'geodir_navigation_locations'),
808
+	array('name' => __('Navigation Locations', 'geodirectory'),
809
+		'type' => 'sectionstart',
810
+		'desc' => '',
811
+		'id' => 'geodir_navigation_locations'),
812 812
 
813
-    array(
814
-        'name' => __('Show geodirectory navigation in selected menu locations', 'geodirectory'),
815
-        'desc' => '',
816
-        'tip' => '',
817
-        'id' => 'geodir_theme_location_nav',
818
-        'css' => 'min-width:300px;',
819
-        'std' => array(),
820
-        'type' => 'multiselect',
821
-        'placeholder_text' => __('Select menu locations', 'geodirectory'),
822
-        'class' => 'chosen_select',
823
-        'options' => array_unique(geodir_theme_location_setting_fun())
824
-    ),
825
-    array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
826
-
827
-
828
-    array('name' => __('Navigation Settings', 'geodirectory'),
829
-        'type' => 'sectionstart',
830
-        'desc' => '',
831
-        'id' => 'geodir_navigation_options'),
813
+	array(
814
+		'name' => __('Show geodirectory navigation in selected menu locations', 'geodirectory'),
815
+		'desc' => '',
816
+		'tip' => '',
817
+		'id' => 'geodir_theme_location_nav',
818
+		'css' => 'min-width:300px;',
819
+		'std' => array(),
820
+		'type' => 'multiselect',
821
+		'placeholder_text' => __('Select menu locations', 'geodirectory'),
822
+		'class' => 'chosen_select',
823
+		'options' => array_unique(geodir_theme_location_setting_fun())
824
+	),
825
+	array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
832 826
 
833 827
 
834
-    array(
835
-        'name' => __('Show add listing navigation in menu', 'geodirectory'),
836
-        'desc' => sprintf(__('Show add listing navigation in main menu? (untick to disable) If you disable this option, none of the add listing link will appear in main navigation.', 'geodirectory')),
837
-        'id' => 'geodir_show_addlisting_nav',
838
-        'std' => '1',
839
-        'type' => 'checkbox'
840
-    ),
828
+	array('name' => __('Navigation Settings', 'geodirectory'),
829
+		'type' => 'sectionstart',
830
+		'desc' => '',
831
+		'id' => 'geodir_navigation_options'),
841 832
 
842
-    array(
843
-        'name' => __('Show listings navigation in menu', 'geodirectory'),
844
-        'desc' => sprintf(__('Show listing navigation in main menu? (untick to disable) If you disable this option, none of the listing link will appear in main navigation.', 'geodirectory')),
845
-        'id' => 'geodir_show_listing_nav',
846
-        'std' => '1',
847
-        'type' => 'checkbox'
848
-    ),
849 833
 
850
-    array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
834
+	array(
835
+		'name' => __('Show add listing navigation in menu', 'geodirectory'),
836
+		'desc' => sprintf(__('Show add listing navigation in main menu? (untick to disable) If you disable this option, none of the add listing link will appear in main navigation.', 'geodirectory')),
837
+		'id' => 'geodir_show_addlisting_nav',
838
+		'std' => '1',
839
+		'type' => 'checkbox'
840
+	),
851 841
 
842
+	array(
843
+		'name' => __('Show listings navigation in menu', 'geodirectory'),
844
+		'desc' => sprintf(__('Show listing navigation in main menu? (untick to disable) If you disable this option, none of the listing link will appear in main navigation.', 'geodirectory')),
845
+		'id' => 'geodir_show_listing_nav',
846
+		'std' => '1',
847
+		'type' => 'checkbox'
848
+	),
852 849
 
853
-    array('name' => __('Post Type Navigation Settings', 'geodirectory'),
854
-        'type' => 'sectionstart',
855
-        'desc' => '',
856
-        'id' => 'geodir_post_type_navigation_layout'),
857
-    array(
858
-        'name' => __('Show listing link in main navigation', 'geodirectory'),
859
-        'desc' => '',
860
-        'tip' => '',
861
-        'id' => 'geodir_add_posttype_in_main_nav',
862
-        'css' => 'min-width:300px;',
863
-        'std' => array(),
864
-        'type' => 'multiselect',
865
-        'placeholder_text' => __('Select post types', 'geodirectory'),
866
-        'class' => 'chosen_select',
867
-        'options' => array_unique(geodir_post_type_setting_fun())
868
-    ),
850
+	array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
869 851
 
870
-    array(
871
-        'name' => __('Show listing link in listing navigation', 'geodirectory'),
872
-        'desc' => '',
873
-        'tip' => '',
874
-        'id' => 'geodir_add_posttype_in_listing_nav',
875
-        'css' => 'min-width:300px;',
876
-        'std' => geodir_get_posttypes(),
877
-        'type' => 'multiselect',
878
-        'placeholder_text' => __('Select post types', 'geodirectory'),
879
-        'class' => 'chosen_select',
880
-        'options' => array_unique(geodir_post_type_setting_fun())
881
-    ),
882 852
 
883
-    array(
884
-        'name' => __('Allow post type to add from frontend', 'geodirectory'),
885
-        'desc' => '',
886
-        'tip' => '',
887
-        'id' => 'geodir_allow_posttype_frontend',
888
-        'css' => 'min-width:300px;',
889
-        'std' => geodir_get_posttypes(),
890
-        'type' => 'multiselect',
891
-        'placeholder_text' => __('Select post types', 'geodirectory'),
892
-        'class' => 'chosen_select',
893
-        'options' => array_unique(geodir_post_type_setting_fun())
894
-    ),
853
+	array('name' => __('Post Type Navigation Settings', 'geodirectory'),
854
+		'type' => 'sectionstart',
855
+		'desc' => '',
856
+		'id' => 'geodir_post_type_navigation_layout'),
857
+	array(
858
+		'name' => __('Show listing link in main navigation', 'geodirectory'),
859
+		'desc' => '',
860
+		'tip' => '',
861
+		'id' => 'geodir_add_posttype_in_main_nav',
862
+		'css' => 'min-width:300px;',
863
+		'std' => array(),
864
+		'type' => 'multiselect',
865
+		'placeholder_text' => __('Select post types', 'geodirectory'),
866
+		'class' => 'chosen_select',
867
+		'options' => array_unique(geodir_post_type_setting_fun())
868
+	),
895 869
 
896
-    array(
897
-        'name' => __('Show add listing link in main navigation', 'geodirectory'),
898
-        'desc' => '',
899
-        'tip' => '',
900
-        'id' => 'geodir_add_listing_link_main_nav',
901
-        'css' => 'min-width:300px;',
902
-        'std' => array(),
903
-        'type' => 'multiselect',
904
-        'placeholder_text' => __('Select post types', 'geodirectory'),
905
-        'class' => 'chosen_select',
906
-        'options' => array_unique(geodir_post_type_setting_fun())
907
-    ),
870
+	array(
871
+		'name' => __('Show listing link in listing navigation', 'geodirectory'),
872
+		'desc' => '',
873
+		'tip' => '',
874
+		'id' => 'geodir_add_posttype_in_listing_nav',
875
+		'css' => 'min-width:300px;',
876
+		'std' => geodir_get_posttypes(),
877
+		'type' => 'multiselect',
878
+		'placeholder_text' => __('Select post types', 'geodirectory'),
879
+		'class' => 'chosen_select',
880
+		'options' => array_unique(geodir_post_type_setting_fun())
881
+	),
908 882
 
909
-    array(
910
-        'name' => __('Show add listing link in add listing navigation', 'geodirectory'),
911
-        'desc' => '',
912
-        'tip' => '',
913
-        'id' => 'geodir_add_listing_link_add_listing_nav',
914
-        'css' => 'min-width:300px;',
915
-        'std' => geodir_get_posttypes(),
916
-        'type' => 'multiselect',
917
-        'class' => 'chosen_select',
918
-        'options' => array_unique(geodir_post_type_setting_fun())
919
-    ),
883
+	array(
884
+		'name' => __('Allow post type to add from frontend', 'geodirectory'),
885
+		'desc' => '',
886
+		'tip' => '',
887
+		'id' => 'geodir_allow_posttype_frontend',
888
+		'css' => 'min-width:300px;',
889
+		'std' => geodir_get_posttypes(),
890
+		'type' => 'multiselect',
891
+		'placeholder_text' => __('Select post types', 'geodirectory'),
892
+		'class' => 'chosen_select',
893
+		'options' => array_unique(geodir_post_type_setting_fun())
894
+	),
920 895
 
921
-    array('type' => 'sectionend', 'id' => 'geodir_post_type_navigation_layout'),
896
+	array(
897
+		'name' => __('Show add listing link in main navigation', 'geodirectory'),
898
+		'desc' => '',
899
+		'tip' => '',
900
+		'id' => 'geodir_add_listing_link_main_nav',
901
+		'css' => 'min-width:300px;',
902
+		'std' => array(),
903
+		'type' => 'multiselect',
904
+		'placeholder_text' => __('Select post types', 'geodirectory'),
905
+		'class' => 'chosen_select',
906
+		'options' => array_unique(geodir_post_type_setting_fun())
907
+	),
922 908
 
909
+	array(
910
+		'name' => __('Show add listing link in add listing navigation', 'geodirectory'),
911
+		'desc' => '',
912
+		'tip' => '',
913
+		'id' => 'geodir_add_listing_link_add_listing_nav',
914
+		'css' => 'min-width:300px;',
915
+		'std' => geodir_get_posttypes(),
916
+		'type' => 'multiselect',
917
+		'class' => 'chosen_select',
918
+		'options' => array_unique(geodir_post_type_setting_fun())
919
+	),
923 920
 
924
-    array('name' => __('User Dashboard Post Type Navigation Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_user_dashboard_post_type '),
921
+	array('type' => 'sectionend', 'id' => 'geodir_post_type_navigation_layout'),
925 922
 
926 923
 
927
-    array(
928
-        'name' => __('Show add listing link in user dashboard', 'geodirectory'),
929
-        'desc' => '',
930
-        'tip' => '',
931
-        'id' => 'geodir_add_listing_link_user_dashboard',
932
-        'css' => 'min-width:300px;',
933
-        'std' => geodir_get_posttypes(),
934
-        'type' => 'multiselect',
935
-        'placeholder_text' => __('Select post types', 'geodirectory'),
936
-        'class' => 'chosen_select',
937
-        'options' => array_unique(geodir_post_type_setting_fun())
938
-    ),
924
+	array('name' => __('User Dashboard Post Type Navigation Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_user_dashboard_post_type '),
939 925
 
940
-    array(
941
-        'name' => __('Show favorite link in user dashboard', 'geodirectory'),
942
-        'desc' => __('Option will not appear if user does not have a favorite of that post type', 'geodirectory'),
943
-        'tip' => '',
944
-        'id' => 'geodir_favorite_link_user_dashboard',
945
-        'css' => 'min-width:300px;',
946
-        'std' => geodir_get_posttypes(),
947
-        'type' => 'multiselect',
948
-        'placeholder_text' => __('Select post types', 'geodirectory'),
949
-        'class' => 'chosen_select',
950
-        'options' => array_unique(geodir_post_type_setting_fun())
951
-    ),
952 926
 
953
-    array(
954
-        'name' => __('Show listing link in user dashboard', 'geodirectory'),
955
-        'desc' => __('Option will not appear if user does not have his/her own listing of that post type', 'geodirectory'),
956
-        'tip' => '',
957
-        'id' => 'geodir_listing_link_user_dashboard',
958
-        'css' => 'min-width:300px;',
959
-        'std' => geodir_get_posttypes(),
960
-        'type' => 'multiselect',
961
-        'placeholder_text' => __('Select post types', 'geodirectory'),
962
-        'class' => 'chosen_select',
963
-        'options' => array_unique(geodir_post_type_setting_fun())
964
-    ),
965
-
966
-    array('type' => 'sectionend', 'id' => 'geodir_user_dashboard_post_type'),
967
-    /* Post Type Navigation Settings End */
968
-
969
-    /* Script Settings Start */
970
-    array('name' => __('Scripts', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_script_settings '),
971
-
972
-    /*
927
+	array(
928
+		'name' => __('Show add listing link in user dashboard', 'geodirectory'),
929
+		'desc' => '',
930
+		'tip' => '',
931
+		'id' => 'geodir_add_listing_link_user_dashboard',
932
+		'css' => 'min-width:300px;',
933
+		'std' => geodir_get_posttypes(),
934
+		'type' => 'multiselect',
935
+		'placeholder_text' => __('Select post types', 'geodirectory'),
936
+		'class' => 'chosen_select',
937
+		'options' => array_unique(geodir_post_type_setting_fun())
938
+	),
939
+
940
+	array(
941
+		'name' => __('Show favorite link in user dashboard', 'geodirectory'),
942
+		'desc' => __('Option will not appear if user does not have a favorite of that post type', 'geodirectory'),
943
+		'tip' => '',
944
+		'id' => 'geodir_favorite_link_user_dashboard',
945
+		'css' => 'min-width:300px;',
946
+		'std' => geodir_get_posttypes(),
947
+		'type' => 'multiselect',
948
+		'placeholder_text' => __('Select post types', 'geodirectory'),
949
+		'class' => 'chosen_select',
950
+		'options' => array_unique(geodir_post_type_setting_fun())
951
+	),
952
+
953
+	array(
954
+		'name' => __('Show listing link in user dashboard', 'geodirectory'),
955
+		'desc' => __('Option will not appear if user does not have his/her own listing of that post type', 'geodirectory'),
956
+		'tip' => '',
957
+		'id' => 'geodir_listing_link_user_dashboard',
958
+		'css' => 'min-width:300px;',
959
+		'std' => geodir_get_posttypes(),
960
+		'type' => 'multiselect',
961
+		'placeholder_text' => __('Select post types', 'geodirectory'),
962
+		'class' => 'chosen_select',
963
+		'options' => array_unique(geodir_post_type_setting_fun())
964
+	),
965
+
966
+	array('type' => 'sectionend', 'id' => 'geodir_user_dashboard_post_type'),
967
+	/* Post Type Navigation Settings End */
968
+
969
+	/* Script Settings Start */
970
+	array('name' => __('Scripts', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_script_settings '),
971
+
972
+	/*
973 973
     array( 	'name' => __( 'Add/Remove Scripts', 'geodirectory' ),
974 974
                 'type' => 'sectionstart',
975 975
                 'desc' => '',
@@ -995,190 +995,190 @@  discard block
 block discarded – undo
995 995
 
996 996
     */
997 997
 
998
-    array('name' => __('GD Lazy Load Images', 'geodirectory'),
999
-        'type' => 'sectionstart',
1000
-        'desc' => '',
1001
-        'id' => 'geodir_gdll_settings'),
998
+	array('name' => __('GD Lazy Load Images', 'geodirectory'),
999
+		'type' => 'sectionstart',
1000
+		'desc' => '',
1001
+		'id' => 'geodir_gdll_settings'),
1002 1002
 
1003
-    array(
1004
-        'name' => __('Enable lazy load images?', 'geodirectory'),
1005
-        'desc' => __('GD images will be loaded only when visible on the page', 'geodirectory'),
1006
-        'id' => 'geodir_lazy_load',
1007
-        'type' => 'checkbox',
1008
-        'std' => '1' // Default value to show home top section
1009
-    ),
1010
-    array('type' => 'sectionend', 'id' => 'geodir_gdll_settings'),
1003
+	array(
1004
+		'name' => __('Enable lazy load images?', 'geodirectory'),
1005
+		'desc' => __('GD images will be loaded only when visible on the page', 'geodirectory'),
1006
+		'id' => 'geodir_lazy_load',
1007
+		'type' => 'checkbox',
1008
+		'std' => '1' // Default value to show home top section
1009
+	),
1010
+	array('type' => 'sectionend', 'id' => 'geodir_gdll_settings'),
1011 1011
     
1012 1012
 
1013
-    array('name' => __('Script Settings', 'geodirectory'),
1014
-        'type' => 'sectionstart',
1015
-        'desc' => '',
1016
-        'id' => 'geodir_script_settings'),
1013
+	array('name' => __('Script Settings', 'geodirectory'),
1014
+		'type' => 'sectionstart',
1015
+		'desc' => '',
1016
+		'id' => 'geodir_script_settings'),
1017 1017
 
1018
-    array(
1019
-        'name' => __('Custom style css code', 'geodirectory'),
1020
-        'desc' => '',
1021
-        'id' => 'geodir_coustem_css',
1022
-        'type' => 'textarea',
1023
-        'css' => 'min-width:300px;',
1024
-        'std' => '' // Default value for the page title - changed in settings
1025
-    ),
1018
+	array(
1019
+		'name' => __('Custom style css code', 'geodirectory'),
1020
+		'desc' => '',
1021
+		'id' => 'geodir_coustem_css',
1022
+		'type' => 'textarea',
1023
+		'css' => 'min-width:300px;',
1024
+		'std' => '' // Default value for the page title - changed in settings
1025
+	),
1026 1026
 
1027
-    array(
1028
-        'name' => __('Header script code', 'geodirectory'),
1029
-        'desc' => '',
1030
-        'id' => 'geodir_header_scripts',
1031
-        'type' => 'textarea',
1032
-        'css' => 'min-width:300px;',
1033
-        'std' => '' // Default value for the page title - changed in settings
1034
-    ),
1027
+	array(
1028
+		'name' => __('Header script code', 'geodirectory'),
1029
+		'desc' => '',
1030
+		'id' => 'geodir_header_scripts',
1031
+		'type' => 'textarea',
1032
+		'css' => 'min-width:300px;',
1033
+		'std' => '' // Default value for the page title - changed in settings
1034
+	),
1035 1035
 
1036
-    array(
1037
-        'name' => __('Footer script code', 'geodirectory'),
1038
-        'desc' => '',
1039
-        'id' => 'geodir_footer_scripts',
1040
-        'type' => 'textarea',
1041
-        'css' => 'min-width:300px;',
1042
-        'std' => '' // Default value for the page title - changed in settings
1043
-    ),
1036
+	array(
1037
+		'name' => __('Footer script code', 'geodirectory'),
1038
+		'desc' => '',
1039
+		'id' => 'geodir_footer_scripts',
1040
+		'type' => 'textarea',
1041
+		'css' => 'min-width:300px;',
1042
+		'std' => '' // Default value for the page title - changed in settings
1043
+	),
1044 1044
 
1045
-    array('type' => 'sectionend', 'id' => 'geodir_script_settings'),
1046
-    /* Script Settings End */
1045
+	array('type' => 'sectionend', 'id' => 'geodir_script_settings'),
1046
+	/* Script Settings End */
1047 1047
 
1048
-    /* Map Settings Start */
1049
-    array('name' => __('Map', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_map_settings '),
1048
+	/* Map Settings Start */
1049
+	array('name' => __('Map', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_map_settings '),
1050 1050
 
1051 1051
 
1052
-    // Google API key
1053
-    array(
1054
-        'name' => __('Google Maps API KEY', 'geodirectory'),
1055
-        'type' => 'sectionstart',
1056
-        'desc' => '',
1057
-        'id' => 'geodir_google_api_key'
1058
-    ),
1059
-    array(
1060
-        'name' => __('Google Maps API KEY', 'geodirectory'),
1061
-        'desc' => sprintf(
1062
-            __('This is a requirement to use Google Maps, you can get a key from <a href="%s" target="_blank">here</a> OR you can set GD to use Open Street Maps below under Select Maps API setting.   (<a href="%s" target="_blank">How to add a Google API KEY?</a>)', 'geodirectory'),
1063
-            'https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true','https://wpgeodirectory.com/docs/add-google-api-key/' ),
1064
-        'tip' => '',
1065
-        'id' => 'geodir_google_api_key',
1066
-        'css' => 'min-width:300px;',
1067
-        'std' => '',
1068
-        'type' => 'text',
1069
-    ),
1070
-    array(
1071
-        'type' => 'sectionend',
1072
-        'id' => 'geodir_google_api_key'
1073
-    ),
1052
+	// Google API key
1053
+	array(
1054
+		'name' => __('Google Maps API KEY', 'geodirectory'),
1055
+		'type' => 'sectionstart',
1056
+		'desc' => '',
1057
+		'id' => 'geodir_google_api_key'
1058
+	),
1059
+	array(
1060
+		'name' => __('Google Maps API KEY', 'geodirectory'),
1061
+		'desc' => sprintf(
1062
+			__('This is a requirement to use Google Maps, you can get a key from <a href="%s" target="_blank">here</a> OR you can set GD to use Open Street Maps below under Select Maps API setting.   (<a href="%s" target="_blank">How to add a Google API KEY?</a>)', 'geodirectory'),
1063
+			'https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true','https://wpgeodirectory.com/docs/add-google-api-key/' ),
1064
+		'tip' => '',
1065
+		'id' => 'geodir_google_api_key',
1066
+		'css' => 'min-width:300px;',
1067
+		'std' => '',
1068
+		'type' => 'text',
1069
+	),
1070
+	array(
1071
+		'type' => 'sectionend',
1072
+		'id' => 'geodir_google_api_key'
1073
+	),
1074 1074
 
1075
-    /* Untick the category by default on home map */
1076
-    array(
1077
-        'name' => __('Home Map Settings', 'geodirectory'),
1078
-        'type' => 'sectionstart',
1079
-        'desc' => '',
1080
-        'id' => 'geodir_home_map_section'
1081
-    ),
1082
-    array(
1083
-        'name' => __('Select category to untick by default on map', 'geodirectory'),
1084
-        'desc' => __('Select category to untick by default on the home map.', 'geodirectory'),
1085
-        'tip' => '',
1086
-        'id' => 'geodir_home_map_untick',
1087
-        'css' => 'min-width:300px;',
1088
-        'std' => '',
1089
-        'type' => 'multiselect',
1090
-        'placeholder_text' => __('Select category', 'geodirectory'),
1091
-        'class' => 'chosen_select',
1092
-        'options' => geodir_home_map_cats_key_value_array()
1093
-    ),
1094
-    array(
1095
-        'type' => 'sectionend',
1096
-        'id' => 'geodir_home_map_section'
1097
-    ),
1075
+	/* Untick the category by default on home map */
1076
+	array(
1077
+		'name' => __('Home Map Settings', 'geodirectory'),
1078
+		'type' => 'sectionstart',
1079
+		'desc' => '',
1080
+		'id' => 'geodir_home_map_section'
1081
+	),
1082
+	array(
1083
+		'name' => __('Select category to untick by default on map', 'geodirectory'),
1084
+		'desc' => __('Select category to untick by default on the home map.', 'geodirectory'),
1085
+		'tip' => '',
1086
+		'id' => 'geodir_home_map_untick',
1087
+		'css' => 'min-width:300px;',
1088
+		'std' => '',
1089
+		'type' => 'multiselect',
1090
+		'placeholder_text' => __('Select category', 'geodirectory'),
1091
+		'class' => 'chosen_select',
1092
+		'options' => geodir_home_map_cats_key_value_array()
1093
+	),
1094
+	array(
1095
+		'type' => 'sectionend',
1096
+		'id' => 'geodir_home_map_section'
1097
+	),
1098 1098
 
1099
-    array(
1100
-        'name' => __('Add Listing Map Settings', 'geodirectory'),
1101
-        'type' => 'sectionstart',
1102
-        'desc' => '',
1103
-        'id' => 'geodir_add_listing_map_section'
1104
-    ),
1105
-    array(
1106
-        'name' => __('Disable mouse scroll', 'geodirectory'),
1107
-        'desc' => __('Stops the mouse scroll zooming the map', 'geodirectory'),
1108
-        'id' => 'geodir_add_listing_mouse_scroll',
1109
-        'type' => 'checkbox',
1110
-        'std' => '0' // Default value to show home top section
1111
-    ),
1112
-    array(
1113
-        'type' => 'sectionend',
1114
-        'id' => 'geodir_add_listing_map_section'
1115
-    ),
1099
+	array(
1100
+		'name' => __('Add Listing Map Settings', 'geodirectory'),
1101
+		'type' => 'sectionstart',
1102
+		'desc' => '',
1103
+		'id' => 'geodir_add_listing_map_section'
1104
+	),
1105
+	array(
1106
+		'name' => __('Disable mouse scroll', 'geodirectory'),
1107
+		'desc' => __('Stops the mouse scroll zooming the map', 'geodirectory'),
1108
+		'id' => 'geodir_add_listing_mouse_scroll',
1109
+		'type' => 'checkbox',
1110
+		'std' => '0' // Default value to show home top section
1111
+	),
1112
+	array(
1113
+		'type' => 'sectionend',
1114
+		'id' => 'geodir_add_listing_map_section'
1115
+	),
1116 1116
 
1117 1117
 
1118
-    array('name' => __('Default map settings', 'geodirectory'),
1119
-        'type' => 'sectionstart',
1120
-        'desc' => '',
1121
-        'id' => 'geodir_map_default_settings'),
1118
+	array('name' => __('Default map settings', 'geodirectory'),
1119
+		'type' => 'sectionstart',
1120
+		'desc' => '',
1121
+		'id' => 'geodir_map_default_settings'),
1122 1122
 
1123
-    array(
1124
-        'name' => '',
1125
-        'desc' => '',
1126
-        'id' => 'map_default_settings',
1127
-        'type' => 'map_default_settings',
1128
-        'css' => 'min-width:300px;',
1129
-        'std' => '' // Default value for the page title - changed in settings
1130
-    ),
1123
+	array(
1124
+		'name' => '',
1125
+		'desc' => '',
1126
+		'id' => 'map_default_settings',
1127
+		'type' => 'map_default_settings',
1128
+		'css' => 'min-width:300px;',
1129
+		'std' => '' // Default value for the page title - changed in settings
1130
+	),
1131 1131
 
1132
-    array(
1133
-        'name' => __('Upload map default marker icon', 'geodirectory'),
1134
-        'desc' => '',
1135
-        'id' => 'geodir_default_marker_icon',
1136
-        'type' => 'file',
1137
-        'std' => '0',
1138
-        'value' => geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png'// Default value to show home top section
1139
-    ),
1140
-    // add option that allows enable/disable map dragging to phone devices
1141
-    array(
1142
-        'name' => __('Show button control on map to enable/disable dragging', 'geodirectory'),
1143
-        'desc' => __('If checked, it displays button control to enable/disable dragging on google maps for phone devices', 'geodirectory'),
1144
-        'id' => 'geodir_map_onoff_dragging',
1145
-        'type' => 'checkbox',
1146
-        'std' => '0' // Default value to show home top section
1147
-    ),
1148
-    array(
1149
-        'name' => __('Select Maps API', 'geodirectory'),
1150
-        'desc' => __('- Google Maps API will force to load Google JS library only.<br>- OpenStreetMap API will force to load OpenStreetMap JS library only.<br>- Load Automatic will load Google JS library first, but if Google maps JS library not loaded it then loads the OpenStreetMap JS library to load the maps (recommended for regions where Google maps banned).<br>- Disable Maps will disable and hides maps for entire site.', 'geodirectory'),
1151
-        'tip' => '',
1152
-        'id' => 'geodir_load_map',
1153
-        'css' => 'min-width:300px;',
1154
-        'std' => 'auto',
1155
-        'type' => 'select',
1156
-        'placeholder_text' => __('Select Map', 'geodirectory'),
1157
-        'options' => array(
1158
-                        'auto' => __('Load Automatic', 'geodirectory'),
1159
-                        'google' => __('Load Google Maps API', 'geodirectory'),
1160
-                        'osm' => __('Load OpenStreetMap API', 'geodirectory'),
1161
-                        'none' => __('Disbale Maps', 'geodirectory')
1162
-                    )
1163
-    ),
1164
-
1165
-    array('type' => 'sectionend', 'id' => 'geodir_map_default_settings'),
1166
-
1167
-    array('name' => __('Show / hide post type and category on map', 'geodirectory'),
1168
-        'type' => 'sectionstart',
1169
-        'desc' => '',
1170
-        'id' => 'geodir_map_settings'),
1132
+	array(
1133
+		'name' => __('Upload map default marker icon', 'geodirectory'),
1134
+		'desc' => '',
1135
+		'id' => 'geodir_default_marker_icon',
1136
+		'type' => 'file',
1137
+		'std' => '0',
1138
+		'value' => geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png'// Default value to show home top section
1139
+	),
1140
+	// add option that allows enable/disable map dragging to phone devices
1141
+	array(
1142
+		'name' => __('Show button control on map to enable/disable dragging', 'geodirectory'),
1143
+		'desc' => __('If checked, it displays button control to enable/disable dragging on google maps for phone devices', 'geodirectory'),
1144
+		'id' => 'geodir_map_onoff_dragging',
1145
+		'type' => 'checkbox',
1146
+		'std' => '0' // Default value to show home top section
1147
+	),
1148
+	array(
1149
+		'name' => __('Select Maps API', 'geodirectory'),
1150
+		'desc' => __('- Google Maps API will force to load Google JS library only.<br>- OpenStreetMap API will force to load OpenStreetMap JS library only.<br>- Load Automatic will load Google JS library first, but if Google maps JS library not loaded it then loads the OpenStreetMap JS library to load the maps (recommended for regions where Google maps banned).<br>- Disable Maps will disable and hides maps for entire site.', 'geodirectory'),
1151
+		'tip' => '',
1152
+		'id' => 'geodir_load_map',
1153
+		'css' => 'min-width:300px;',
1154
+		'std' => 'auto',
1155
+		'type' => 'select',
1156
+		'placeholder_text' => __('Select Map', 'geodirectory'),
1157
+		'options' => array(
1158
+						'auto' => __('Load Automatic', 'geodirectory'),
1159
+						'google' => __('Load Google Maps API', 'geodirectory'),
1160
+						'osm' => __('Load OpenStreetMap API', 'geodirectory'),
1161
+						'none' => __('Disbale Maps', 'geodirectory')
1162
+					)
1163
+	),
1171 1164
 
1172
-    array(
1173
-        'name' => __('Select Map Category', 'geodirectory'),
1174
-        'desc' => '',
1175
-        'id' => 'geodir_map_settings',
1176
-        'type' => 'map',
1177
-        'css' => 'min-width:300px;',
1178
-        'std' => '' // Default value for the page title - changed in settings
1179
-    ),
1180
-
1181
-    array('type' => 'sectionend', 'id' => 'geodir_map_settings'),
1182
-    /* Map Settings End */
1165
+	array('type' => 'sectionend', 'id' => 'geodir_map_default_settings'),
1166
+
1167
+	array('name' => __('Show / hide post type and category on map', 'geodirectory'),
1168
+		'type' => 'sectionstart',
1169
+		'desc' => '',
1170
+		'id' => 'geodir_map_settings'),
1171
+
1172
+	array(
1173
+		'name' => __('Select Map Category', 'geodirectory'),
1174
+		'desc' => '',
1175
+		'id' => 'geodir_map_settings',
1176
+		'type' => 'map',
1177
+		'css' => 'min-width:300px;',
1178
+		'std' => '' // Default value for the page title - changed in settings
1179
+	),
1180
+
1181
+	array('type' => 'sectionend', 'id' => 'geodir_map_settings'),
1182
+	/* Map Settings End */
1183 1183
 
1184 1184
 )); // End Design settings
Please login to merge, or discard this patch.
geodirectory-functions/map-functions/map_functions.php 2 patches
Indentation   +207 added lines, -207 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,47 +50,47 @@  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 != '') {
56
-        $srcharr = array("'", "/", "-", '"', '\\');
57
-        $replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
55
+	if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') {
56
+		$srcharr = array("'", "/", "-", '"', '\\');
57
+		$replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
58 58
 
59 59
 
60
-        $geodir_cat_icons = geodir_get_term_icon();
61
-        $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$post->default_category]) ? $geodir_cat_icons[$post->default_category] : '';
60
+		$geodir_cat_icons = geodir_get_term_icon();
61
+		$icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$post->default_category]) ? $geodir_cat_icons[$post->default_category] : '';
62 62
 
63
-        $post_title = $post->post_title;
64
-        $title = str_replace($srcharr, $replarr, $post_title);
63
+		$post_title = $post->post_title;
64
+		$title = str_replace($srcharr, $replarr, $post_title);
65 65
 
66
-        if (is_ssl()) {
67
-            $icon = str_replace("http:","https:",$icon );
68
-        }
66
+		if (is_ssl()) {
67
+			$icon = str_replace("http:","https:",$icon );
68
+		}
69 69
         
70
-        if ($icon != '') {
71
-            $gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes;
70
+		if ($icon != '') {
71
+			$gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes;
72 72
             
73
-            if (isset($gd_marker_sizes[$icon])) {
74
-                $icon_size = $gd_marker_sizes[$icon];
75
-            } else {
76
-                $icon_size = geodir_get_marker_size($icon);
77
-                $gd_marker_sizes[$icon] = $icon_size;
78
-            }               
79
-        } else {
80
-            $icon_size = array('w' => 36, 'h' => 45);
81
-        }
82
-
83
-        $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
84
-
85
-        /**
86
-         * Filter the json data when creating output for post json marker..
87
-         *
88
-         * @since 1.5.7
89
-         * @param string $post_json JSON representation of the post marker info.
90
-         * @param object $post The post object.
91
-         */
92
-        $map_jason[] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
93
-    }
73
+			if (isset($gd_marker_sizes[$icon])) {
74
+				$icon_size = $gd_marker_sizes[$icon];
75
+			} else {
76
+				$icon_size = geodir_get_marker_size($icon);
77
+				$gd_marker_sizes[$icon] = $icon_size;
78
+			}               
79
+		} else {
80
+			$icon_size = array('w' => 36, 'h' => 45);
81
+		}
82
+
83
+		$post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
84
+
85
+		/**
86
+		 * Filter the json data when creating output for post json marker..
87
+		 *
88
+		 * @since 1.5.7
89
+		 * @param string $post_json JSON representation of the post marker info.
90
+		 * @param object $post The post object.
91
+		 */
92
+		$map_jason[] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
93
+	}
94 94
 }
95 95
 
96 96
 /**
@@ -103,70 +103,70 @@  discard block
 block discarded – undo
103 103
  */
104 104
 function send_marker_jason_to_js()
105 105
 {
106
-    global $map_jason, $map_canvas_arr;
107
-
108
-    if (is_array($map_canvas_arr) && !empty($map_canvas_arr)) {
109
-        foreach ($map_canvas_arr as $canvas => $jason) {
110
-            if (is_array($map_jason) && !empty($map_jason)) {
111
-                if ($canvas == 'detail_page_map_canvas') {
112
-                    global $post;
113
-                    foreach($map_jason as $key => $content)
114
-                    {
115
-                        $content = json_decode($content);
116
-                        if ( $content->id != $post->ID ) {
117
-                            unset($map_jason[$key]);
118
-                        }
119
-                    }
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); // 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
-
135
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
136
-
137
-                /**
138
-                 * Filter the send_marker_jason_to_js() function map canvas json args.
139
-                 *
140
-                 * You can use this filter to modify map canvas json args.
141
-                 *
142
-                 * @since 1.0.0
143
-                 * @package GeoDirectory
144
-                 * @param string $canvas Map canvas array key.
145
-                 * @param array $map_canvas_jason_args Map canvas args.
146
-                 */
147
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
148
-
149
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
150
-            } else {
151
-                $canvas_jason = '[{"totalcount":"0"}]';
152
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
153
-
154
-                /**
155
-                 * Filter the send_marker_jason_to_js() function map canvas json args.
156
-                 *
157
-                 * You can use this filter to modify map canvas json args.
158
-                 *
159
-                 * @since 1.0.0
160
-                 * @package GeoDirectory
161
-                 * @param string $canvas Map canvas array key.
162
-                 * @param array $map_canvas_jason_args Map canvas args.
163
-                 */
164
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
165
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
166
-            }
167
-        }
168
-
169
-    }
106
+	global $map_jason, $map_canvas_arr;
107
+
108
+	if (is_array($map_canvas_arr) && !empty($map_canvas_arr)) {
109
+		foreach ($map_canvas_arr as $canvas => $jason) {
110
+			if (is_array($map_jason) && !empty($map_jason)) {
111
+				if ($canvas == 'detail_page_map_canvas') {
112
+					global $post;
113
+					foreach($map_jason as $key => $content)
114
+					{
115
+						$content = json_decode($content);
116
+						if ( $content->id != $post->ID ) {
117
+							unset($map_jason[$key]);
118
+						}
119
+					}
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); // 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
+
135
+				$map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
136
+
137
+				/**
138
+				 * Filter the send_marker_jason_to_js() function map canvas json args.
139
+				 *
140
+				 * You can use this filter to modify map canvas json args.
141
+				 *
142
+				 * @since 1.0.0
143
+				 * @package GeoDirectory
144
+				 * @param string $canvas Map canvas array key.
145
+				 * @param array $map_canvas_jason_args Map canvas args.
146
+				 */
147
+				$map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
148
+
149
+				wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
150
+			} else {
151
+				$canvas_jason = '[{"totalcount":"0"}]';
152
+				$map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
153
+
154
+				/**
155
+				 * Filter the send_marker_jason_to_js() function map canvas json args.
156
+				 *
157
+				 * You can use this filter to modify map canvas json args.
158
+				 *
159
+				 * @since 1.0.0
160
+				 * @package GeoDirectory
161
+				 * @param string $canvas Map canvas array key.
162
+				 * @param array $map_canvas_jason_args Map canvas args.
163
+				 */
164
+				$map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
165
+				wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
166
+			}
167
+		}
168
+
169
+	}
170 170
 }
171 171
 
172 172
 /**
@@ -185,90 +185,90 @@  discard block
 block discarded – undo
185 185
  */
186 186
 function home_map_taxonomy_walker($cat_taxonomy, $cat_parent = 0, $hide_empty = true, $pading = 0, $map_canvas_name = '', $child_collapse, $is_home_map = false)
187 187
 {
188
-    global $cat_count, $geodir_cat_icons;
188
+	global $cat_count, $geodir_cat_icons;
189 189
 
190
-    $exclude_categories = get_option('geodir_exclude_cat_on_map');
191
-    $exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade');
190
+	$exclude_categories = get_option('geodir_exclude_cat_on_map');
191
+	$exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade');
192 192
 
193
-    // check if exclude categories saved before fix of categories identical names
194
-    if ($exclude_categories_new) {
195
-        $gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : '';
196
-        $exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array();
197
-    }
193
+	// check if exclude categories saved before fix of categories identical names
194
+	if ($exclude_categories_new) {
195
+		$gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : '';
196
+		$exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array();
197
+	}
198 198
 
199
-    $exclude_cat_str = implode(',', $exclude_categories);
199
+	$exclude_cat_str = implode(',', $exclude_categories);
200 200
 
201
-    if ($exclude_cat_str == '') {
202
-        $exclude_cat_str = '0';
203
-    }
201
+	if ($exclude_cat_str == '') {
202
+		$exclude_cat_str = '0';
203
+	}
204 204
 
205
-    $cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'exclude' => $exclude_cat_str, 'hide_empty ' => $hide_empty));
205
+	$cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'exclude' => $exclude_cat_str, 'hide_empty ' => $hide_empty));
206 206
 
207
-    if ($hide_empty) {
208
-        $cat_terms = geodir_filter_empty_terms($cat_terms);
209
-    }
207
+	if ($hide_empty) {
208
+		$cat_terms = geodir_filter_empty_terms($cat_terms);
209
+	}
210 210
 
211
-    $main_list_class = '';
212
-    //If there are terms, start displaying
213
-    if (count($cat_terms) > 0) {
214
-        //Displaying as a list
215
-        $p = $pading * 15;
216
-        $pading++;
211
+	$main_list_class = '';
212
+	//If there are terms, start displaying
213
+	if (count($cat_terms) > 0) {
214
+		//Displaying as a list
215
+		$p = $pading * 15;
216
+		$pading++;
217 217
 
218
-        if ($cat_parent == 0) {
219
-            $list_class = 'main_list';
220
-            $display = '';
221
-        } else {
222
-            $list_class = 'sub_list';
223
-            $display = !$child_collapse ? '' : 'display:none';
224
-        }
218
+		if ($cat_parent == 0) {
219
+			$list_class = 'main_list';
220
+			$display = '';
221
+		} else {
222
+			$list_class = 'sub_list';
223
+			$display = !$child_collapse ? '' : 'display:none';
224
+		}
225 225
 
226 226
 
227
-        $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
227
+		$out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
228 228
 
229
-        $geodir_cat_icons = geodir_get_term_icon();
229
+		$geodir_cat_icons = geodir_get_term_icon();
230 230
 
231
-        foreach ($cat_terms as $cat_term):
231
+		foreach ($cat_terms as $cat_term):
232 232
 
233
-            $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : 'gd_place';
233
+			$post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : 'gd_place';
234 234
 
235
-            $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$cat_term->term_id]) ? $geodir_cat_icons[$cat_term->term_id] : '';
235
+			$icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$cat_term->term_id]) ? $geodir_cat_icons[$cat_term->term_id] : '';
236 236
 
237
-            if (!in_array($cat_term->term_id, $exclude_categories)):
238
-                //Secret sauce.  Function calls itself to display child elements, if any
239
-                $checked = 'checked="checked"';
237
+			if (!in_array($cat_term->term_id, $exclude_categories)):
238
+				//Secret sauce.  Function calls itself to display child elements, if any
239
+				$checked = 'checked="checked"';
240 240
 
241
-                // Untick the category by default on home map
242
-                if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
243
-                    if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $cat_term->term_id, $geodir_home_map_untick)) {
244
-                        $checked = '';
245
-                    }
246
-                }
241
+				// Untick the category by default on home map
242
+				if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
243
+					if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $cat_term->term_id, $geodir_home_map_untick)) {
244
+						$checked = '';
245
+					}
246
+				}
247 247
 
248
-                $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
249
-                $term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
250
-                $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)">';
251
-                $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
252
-                $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>';
248
+				$term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
249
+				$term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
250
+				$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)">';
251
+				$term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
252
+				$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>';
253 253
 
254
-            endif;
254
+			endif;
255 255
 
256 256
 
257
-            // get sub category by recursion
258
-            $out .= home_map_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading, $map_canvas_name, $child_collapse, $is_home_map);
257
+			// get sub category by recursion
258
+			$out .= home_map_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading, $map_canvas_name, $child_collapse, $is_home_map);
259 259
 
260
-            $out .= '</li>';
260
+			$out .= '</li>';
261 261
 
262
-        endforeach;
262
+		endforeach;
263 263
 
264
-        $out .= '</ul>';
264
+		$out .= '</ul>';
265 265
 
266
-        return $out;
267
-    } else {
268
-        if ($cat_parent == 0)
269
-            return _e('No category', 'geodirectory');
270
-    }
271
-    return;
266
+		return $out;
267
+	} else {
268
+		if ($cat_parent == 0)
269
+			return _e('No category', 'geodirectory');
270
+	}
271
+	return;
272 272
 }
273 273
 
274 274
 /**
@@ -280,19 +280,19 @@  discard block
 block discarded – undo
280 280
  * @return string The map API provider name.
281 281
  */
282 282
 function geodir_map_name() {
283
-    $geodir_map_name = get_option('geodir_load_map', 'google');
283
+	$geodir_map_name = get_option('geodir_load_map', 'google');
284 284
     
285
-    if (!in_array($geodir_map_name, array('none', 'auto', 'google', 'osm'))) {
286
-        $geodir_map_name = 'auto';
287
-    }
288
-
289
-    /**
290
-     * Filter the map JS API provider name.
291
-     *
292
-     * @since 1.6.1
293
-     * @param string $geodir_map_name The map API provider name.
294
-     */
295
-    return apply_filters('geodir_map_name', $geodir_map_name);
285
+	if (!in_array($geodir_map_name, array('none', 'auto', 'google', 'osm'))) {
286
+		$geodir_map_name = 'auto';
287
+	}
288
+
289
+	/**
290
+	 * Filter the map JS API provider name.
291
+	 *
292
+	 * @since 1.6.1
293
+	 * @param string $geodir_map_name The map API provider name.
294
+	 */
295
+	return apply_filters('geodir_map_name', $geodir_map_name);
296 296
 }
297 297
 
298 298
 /**
@@ -308,48 +308,48 @@  discard block
 block discarded – undo
308 308
  * @return array The icon size.
309 309
  */
310 310
 function geodir_get_marker_size($icon, $default_size = array('w' => 36, 'h' => 45)) {
311
-    global $gd_marker_sizes;
311
+	global $gd_marker_sizes;
312 312
     
313
-    if (empty($gd_marker_sizes)) {
314
-        $gd_marker_sizes = array();
315
-    }
313
+	if (empty($gd_marker_sizes)) {
314
+		$gd_marker_sizes = array();
315
+	}
316 316
       
317
-    if (!empty($gd_marker_sizes[$icon])) {
318
-        return $gd_marker_sizes[$icon];
319
-    }
317
+	if (!empty($gd_marker_sizes[$icon])) {
318
+		return $gd_marker_sizes[$icon];
319
+	}
320 320
     
321
-    if (empty($icon)) {
322
-        $gd_marker_sizes[$icon] = $default_size;
321
+	if (empty($icon)) {
322
+		$gd_marker_sizes[$icon] = $default_size;
323 323
         
324
-        return $default_size;
325
-    }
324
+		return $default_size;
325
+	}
326 326
     
327
-    $icon_url = $icon;
327
+	$icon_url = $icon;
328 328
     
329
-    $uploads = wp_upload_dir(); // Array of key => value pairs
329
+	$uploads = wp_upload_dir(); // Array of key => value pairs
330 330
       
331
-    if (!path_is_absolute($icon)) {
332
-        $icon = str_replace($uploads['baseurl'], $uploads['basedir'], $icon);
333
-    }
331
+	if (!path_is_absolute($icon)) {
332
+		$icon = str_replace($uploads['baseurl'], $uploads['basedir'], $icon);
333
+	}
334 334
     
335
-    if (!path_is_absolute($icon) && strpos($icon, WP_CONTENT_URL) !== false) {
336
-        $icon = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $icon);
337
-    }
335
+	if (!path_is_absolute($icon) && strpos($icon, WP_CONTENT_URL) !== false) {
336
+		$icon = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $icon);
337
+	}
338 338
     
339
-    $sizes = array();
340
-    if (is_file($icon) && file_exists($icon)) {
341
-        $size = getimagesize(trim($icon));
339
+	$sizes = array();
340
+	if (is_file($icon) && file_exists($icon)) {
341
+		$size = getimagesize(trim($icon));
342 342
         
343
-        if (!empty($size[0]) && !empty($size[1])) {
344
-            $sizes = array('w' => $size[0], 'h' => $size[1]);
345
-        }
346
-    }
343
+		if (!empty($size[0]) && !empty($size[1])) {
344
+			$sizes = array('w' => $size[0], 'h' => $size[1]);
345
+		}
346
+	}
347 347
     
348
-    $sizes = !empty($sizes) ? $sizes : $default_size;
348
+	$sizes = !empty($sizes) ? $sizes : $default_size;
349 349
     
350
-    $gd_marker_sizes[$icon_url] = $sizes;
350
+	$gd_marker_sizes[$icon_url] = $sizes;
351 351
     
352
-    return $sizes;
352
+	return $sizes;
353 353
 }
354 354
 
355 355
 add_action('wp_head', 'geodir_map_load_style', 10);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
  * @package GeoDirectory
362 362
  */
363 363
 function geodir_map_load_style() {    
364
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
364
+	if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
365 365
 ?>
366 366
 <script type="text/javascript">
367 367
 if (!(window.google && typeof google.maps !== 'undefined')) {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 }
370 370
 </script>
371 371
 <?php
372
-    }
372
+	}
373 373
 }
374 374
 
375 375
 add_action('wp_footer', 'geodir_map_load_script', 10);
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
  * @package GeoDirectory
382 382
  */
383 383
 function geodir_map_load_script() {
384
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
384
+	if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
385 385
 ?>
386 386
 <script type="text/javascript">
387 387
 if (!(window.google && typeof google.maps !== 'undefined')) {
@@ -390,5 +390,5 @@  discard block
 block discarded – undo
390 390
 }
391 391
 </script>
392 392
 <?php
393
-    }
393
+	}
394 394
 }
395 395
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $title = str_replace($srcharr, $replarr, $post_title);
65 65
 
66 66
         if (is_ssl()) {
67
-            $icon = str_replace("http:","https:",$icon );
67
+            $icon = str_replace("http:", "https:", $icon);
68 68
         }
69 69
         
70 70
         if ($icon != '') {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $icon_size = array('w' => 36, 'h' => 45);
81 81
         }
82 82
 
83
-        $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}';
83
+        $post_json = '{"id":"'.$post->ID.'","t": "'.$title.'","lt": "'.$post->post_latitude.'","ln": "'.$post->post_longitude.'","mk_id":"'.$post->ID.'_'.$post->default_category.'","i":"'.$icon.'","w":"'.$icon_size['w'].'","h":"'.$icon_size['h'].'"}';
84 84
 
85 85
         /**
86 86
          * Filter the json data when creating output for post json marker..
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
          * @param string $post_json JSON representation of the post marker info.
90 90
          * @param object $post The post object.
91 91
          */
92
-        $map_jason[] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post);
92
+        $map_jason[] = apply_filters('geodir_create_marker_jason_of_posts', $post_json, $post);
93 93
     }
94 94
 }
95 95
 
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
             if (is_array($map_jason) && !empty($map_jason)) {
111 111
                 if ($canvas == 'detail_page_map_canvas') {
112 112
                     global $post;
113
-                    foreach($map_jason as $key => $content)
113
+                    foreach ($map_jason as $key => $content)
114 114
                     {
115 115
                         $content = json_decode($content);
116
-                        if ( $content->id != $post->ID ) {
116
+                        if ($content->id != $post->ID) {
117 117
                             unset($map_jason[$key]);
118 118
                         }
119 119
                     }
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,12 +127,12 @@  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); // 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 134
 
135
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
135
+                $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason);
136 136
 
137 137
                 /**
138 138
                  * Filter the send_marker_jason_to_js() function map canvas json args.
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
                  * @param string $canvas Map canvas array key.
145 145
                  * @param array $map_canvas_jason_args Map canvas args.
146 146
                  */
147
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
147
+                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args);
148 148
 
149
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
149
+                wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args);
150 150
             } else {
151 151
                 $canvas_jason = '[{"totalcount":"0"}]';
152
-                $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason);
152
+                $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason);
153 153
 
154 154
                 /**
155 155
                  * Filter the send_marker_jason_to_js() function map canvas json args.
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
                  * @param string $canvas Map canvas array key.
162 162
                  * @param array $map_canvas_jason_args Map canvas args.
163 163
                  */
164
-                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args);
165
-                wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args);
164
+                $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args);
165
+                wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args);
166 166
             }
167 167
         }
168 168
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         }
225 225
 
226 226
 
227
-        $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">';
227
+        $out = '<ul class="treeview '.$list_class.'" style="margin-left:'.$p.'px;'.$display.';">';
228 228
 
229 229
         $geodir_cat_icons = geodir_get_term_icon();
230 230
 
@@ -240,16 +240,16 @@  discard block
 block discarded – undo
240 240
 
241 241
                 // Untick the category by default on home map
242 242
                 if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
243
-                    if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $cat_term->term_id, $geodir_home_map_untick)) {
243
+                    if (!empty($geodir_home_map_untick) && in_array($post_type.'_'.$cat_term->term_id, $geodir_home_map_untick)) {
244 244
                         $checked = '';
245 245
                     }
246 246
                 }
247 247
 
248
-                $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"';
249
-                $term_check .= ' name="' . $map_canvas_name . '_cat[]" ';
250
-                $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)">';
251
-                $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>';
252
-                $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>';
248
+                $term_check = '<input type="checkbox" '.$checked.' id="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'" class="group_selector '.$main_list_class.'"';
249
+                $term_check .= ' name="'.$map_canvas_name.'_cat[]" ';
250
+                $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)">';
251
+                $term_img = '<img height="15" width="15" alt="'.$cat_term->taxonomy.'" src="'.$icon.'" title="'.ucfirst($cat_term->name).'"/>';
252
+                $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>';
253 253
 
254 254
             endif;
255 255
 
@@ -361,11 +361,11 @@  discard block
 block discarded – undo
361 361
  * @package GeoDirectory
362 362
  */
363 363
 function geodir_map_load_style() {    
364
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
364
+    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is('geodirectory-googlemap-script', 'done')) {
365 365
 ?>
366 366
 <script type="text/javascript">
367 367
 if (!(window.google && typeof google.maps !== 'undefined')) {
368
-    document.write('<' + 'link id="geodirectory-leaflet-style-css" media="all" type="text/css" href="<?php echo geodir_plugin_url();?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION;?>" rel="stylesheet"' + '>');
368
+    document.write('<' + 'link id="geodirectory-leaflet-style-css" media="all" type="text/css" href="<?php echo geodir_plugin_url(); ?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION; ?>" rel="stylesheet"' + '>');
369 369
 }
370 370
 </script>
371 371
 <?php
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
  * @package GeoDirectory
382 382
  */
383 383
 function geodir_map_load_script() {
384
-    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) {
384
+    if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is('geodirectory-googlemap-script', 'done')) {
385 385
 ?>
386 386
 <script type="text/javascript">
387 387
 if (!(window.google && typeof google.maps !== 'undefined')) {
388
-    document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo geodir_plugin_url();?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
389
-    document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo geodir_plugin_url();?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>');
388
+    document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo geodir_plugin_url(); ?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
389
+    document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo geodir_plugin_url(); ?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>');
390 390
 }
391 391
 </script>
392 392
 <?php
Please login to merge, or discard this patch.