Test Failed
Push — master ( c75bcd...10f8fe )
by
unknown
04:21
created
geodirectory-admin/option-pages/design_settings_array.php 3 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
     $geodir_active_nav_locations = get_nav_menu_locations();
41 41
     if (!empty($geodir_active_nav_locations) && is_array($geodir_active_nav_locations)) {
42 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];
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
+            }
45 46
         }
46 47
     }
47 48
 
Please login to merge, or discard this patch.
Indentation   +939 added lines, -939 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
 /**
@@ -56,536 +56,536 @@  discard block
 block discarded – undo
56 56
  */
57 57
 $geodir_settings['design_settings'] = apply_filters('geodir_design_settings', array(
58 58
 
59
-    /* Home Layout Settings start */
60
-    array('name' => __('Home', 'geodirectory'), 'type' => 'title', 'desc' => 'Setting to set home page layout', 'id' => 'home_page_settings '),
59
+	/* Home Layout Settings start */
60
+	array('name' => __('Home', 'geodirectory'), 'type' => 'title', 'desc' => 'Setting to set home page layout', 'id' => 'home_page_settings '),
61 61
 
62 62
 
63
-    array('name' => __('Home Top Section Settings', 'geodirectory'),
64
-        'type' => 'sectionstart',
65
-        'desc' => '',
66
-        'id' => 'geodir_home_top_section'),
63
+	array('name' => __('Home Top Section Settings', 'geodirectory'),
64
+		'type' => 'sectionstart',
65
+		'desc' => '',
66
+		'id' => 'geodir_home_top_section'),
67 67
 
68
-    array(
69
-        'name' => __('Home top section', 'geodirectory'),
70
-        'desc' => __('Show the top section of home page', 'geodirectory'),
71
-        'id' => 'geodir_show_home_top_section',
72
-        'type' => 'checkbox',
73
-        'std' => '1' // Default value to show home top section
74
-    ),
68
+	array(
69
+		'name' => __('Home top section', 'geodirectory'),
70
+		'desc' => __('Show the top section of home page', 'geodirectory'),
71
+		'id' => 'geodir_show_home_top_section',
72
+		'type' => 'checkbox',
73
+		'std' => '1' // Default value to show home top section
74
+	),
75 75
 
76 76
 
77
-    array('type' => 'sectionend', 'id' => 'geodir_home_top_section'),
77
+	array('type' => 'sectionend', 'id' => 'geodir_home_top_section'),
78 78
 
79 79
 
80
-    array('name' => __('Home Page Layout Settings', 'geodirectory'),
81
-        'type' => 'sectionstart',
82
-        'desc' => '',
83
-        'id' => 'geodir_home_layout'),
80
+	array('name' => __('Home Page Layout Settings', 'geodirectory'),
81
+		'type' => 'sectionstart',
82
+		'desc' => '',
83
+		'id' => 'geodir_home_layout'),
84 84
 
85
-    array(
86
-        'name' => __('Home right section', 'geodirectory'),
87
-        'desc' => __('Show the right section of home page', 'geodirectory'),
88
-        'id' => 'geodir_show_home_right_section',
89
-        'type' => 'checkbox',
90
-        'std' => '1' // Default value to show home top section
91
-    ),
85
+	array(
86
+		'name' => __('Home right section', 'geodirectory'),
87
+		'desc' => __('Show the right section of home page', 'geodirectory'),
88
+		'id' => 'geodir_show_home_right_section',
89
+		'type' => 'checkbox',
90
+		'std' => '1' // Default value to show home top section
91
+	),
92 92
 
93
-    array(
94
-        'name' => __('Width of home right section', 'geodirectory'),
95
-        'desc' => __('Enter the width of right section of home page in %', 'geodirectory'),
96
-        'id' => 'geodir_width_home_right_section',
97
-        'type' => 'text',
98
-        'css' => 'min-width:300px;',
99
-        'std' => '30' // Default value to show home top section
100
-    ),
93
+	array(
94
+		'name' => __('Width of home right section', 'geodirectory'),
95
+		'desc' => __('Enter the width of right section of home page in %', 'geodirectory'),
96
+		'id' => 'geodir_width_home_right_section',
97
+		'type' => 'text',
98
+		'css' => 'min-width:300px;',
99
+		'std' => '30' // Default value to show home top section
100
+	),
101 101
 
102
-    array(
103
-        'name' => __('Home content section', 'geodirectory'),
104
-        'desc' => __('Show the content section of home page', 'geodirectory'),
105
-        'id' => 'geodir_show_home_contant_section',
106
-        'type' => 'checkbox',
107
-        'std' => '1' // Default value to show home top section
108
-    ),
102
+	array(
103
+		'name' => __('Home content section', 'geodirectory'),
104
+		'desc' => __('Show the content section of home page', 'geodirectory'),
105
+		'id' => 'geodir_show_home_contant_section',
106
+		'type' => 'checkbox',
107
+		'std' => '1' // Default value to show home top section
108
+	),
109 109
 
110
-    array(
111
-        'name' => __('Width of home content section', 'geodirectory'),
112
-        'desc' => __('Enter the width of content section of home page in %', 'geodirectory'),
113
-        'id' => 'geodir_width_home_contant_section',
114
-        'type' => 'text',
115
-        'css' => 'min-width:300px;',
116
-        'std' => '63' // Default value to show home top section
117
-    ),
110
+	array(
111
+		'name' => __('Width of home content section', 'geodirectory'),
112
+		'desc' => __('Enter the width of content section of home page in %', 'geodirectory'),
113
+		'id' => 'geodir_width_home_contant_section',
114
+		'type' => 'text',
115
+		'css' => 'min-width:300px;',
116
+		'std' => '63' // Default value to show home top section
117
+	),
118 118
 
119
-    array(
120
-        'name' => __('Home left section', 'geodirectory'),
121
-        'desc' => __('Show the left section of home page', 'geodirectory'),
122
-        'id' => 'geodir_show_home_left_section',
123
-        'type' => 'checkbox',
124
-        'std' => '0' // Default value to show home top section
125
-    ),
119
+	array(
120
+		'name' => __('Home left section', 'geodirectory'),
121
+		'desc' => __('Show the left section of home page', 'geodirectory'),
122
+		'id' => 'geodir_show_home_left_section',
123
+		'type' => 'checkbox',
124
+		'std' => '0' // Default value to show home top section
125
+	),
126 126
 
127
-    array(
128
-        'name' => __('Width of home left section', 'geodirectory'),
129
-        'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
130
-        'id' => 'geodir_width_home_left_section',
131
-        'type' => 'text',
132
-        'css' => 'min-width:300px;',
133
-        'std' => '30' // Default value to show home top section
134
-    ),
127
+	array(
128
+		'name' => __('Width of home left section', 'geodirectory'),
129
+		'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
130
+		'id' => 'geodir_width_home_left_section',
131
+		'type' => 'text',
132
+		'css' => 'min-width:300px;',
133
+		'std' => '30' // Default value to show home top section
134
+	),
135 135
 
136
-    array(
137
-        'name' => __('Home bottom section', 'geodirectory'),
138
-        'desc' => __('Show the bottom section of home page', 'geodirectory'),
139
-        'id' => 'geodir_show_home_bottom_section',
140
-        'type' => 'checkbox',
141
-        'std' => '0' // Default value to show home top section
142
-    ),
143
-    array(
144
-        'name' => __('Resize image large size', 'geodirectory'),
145
-        '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')),
146
-        'id' => 'geodir_use_wp_media_large_size',
147
-        'type' => 'checkbox',
148
-        'std' => '0'
149
-    ),
136
+	array(
137
+		'name' => __('Home bottom section', 'geodirectory'),
138
+		'desc' => __('Show the bottom section of home page', 'geodirectory'),
139
+		'id' => 'geodir_show_home_bottom_section',
140
+		'type' => 'checkbox',
141
+		'std' => '0' // Default value to show home top section
142
+	),
143
+	array(
144
+		'name' => __('Resize image large size', 'geodirectory'),
145
+		'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')),
146
+		'id' => 'geodir_use_wp_media_large_size',
147
+		'type' => 'checkbox',
148
+		'std' => '0'
149
+	),
150 150
 
151
-    array('type' => 'sectionend', 'id' => 'geodir_home_layout'),
151
+	array('type' => 'sectionend', 'id' => 'geodir_home_layout'),
152 152
 
153 153
 
154
-    /* Home Layout Settings end */
154
+	/* Home Layout Settings end */
155 155
 
156 156
 
157
-    /* Listing Layout Settings end */
157
+	/* Listing Layout Settings end */
158 158
 
159
-    array('name' => __('Listings', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_listing_settings '),
159
+	array('name' => __('Listings', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_listing_settings '),
160 160
 
161 161
 
162
-    array('name' => __('Listing Page Layout Settings', 'geodirectory'),
163
-        'type' => 'sectionstart',
164
-        'desc' => '',
165
-        'id' => 'geodir_listing_layout'),
162
+	array('name' => __('Listing Page Layout Settings', 'geodirectory'),
163
+		'type' => 'sectionstart',
164
+		'desc' => '',
165
+		'id' => 'geodir_listing_layout'),
166 166
 
167
-    array(
168
-        'name' => __('Listing top section', 'geodirectory'),
169
-        'desc' => __('Show the top section of listing page', 'geodirectory'),
170
-        'id' => 'geodir_show_listing_top_section',
171
-        'type' => 'checkbox',
172
-        'std' => '1' // Default value to show home top section
173
-    ),
167
+	array(
168
+		'name' => __('Listing top section', 'geodirectory'),
169
+		'desc' => __('Show the top section of listing page', 'geodirectory'),
170
+		'id' => 'geodir_show_listing_top_section',
171
+		'type' => 'checkbox',
172
+		'std' => '1' // Default value to show home top section
173
+	),
174 174
 
175
-    array(
176
-        'name' => __('Listing right section', 'geodirectory'),
177
-        'desc' => __('Show the right section of listing page', 'geodirectory'),
178
-        'id' => 'geodir_show_listing_right_section',
179
-        'type' => 'checkbox',
180
-        'std' => '1' // Default value to show home top section
181
-    ),
175
+	array(
176
+		'name' => __('Listing right section', 'geodirectory'),
177
+		'desc' => __('Show the right section of listing page', 'geodirectory'),
178
+		'id' => 'geodir_show_listing_right_section',
179
+		'type' => 'checkbox',
180
+		'std' => '1' // Default value to show home top section
181
+	),
182 182
 
183
-    array(
184
-        'name' => __('Width of listing right section', 'geodirectory'),
185
-        'desc' => __('Enter the width of right section of listing page in %', 'geodirectory'),
186
-        'id' => 'geodir_width_listing_right_section',
187
-        'type' => 'text',
188
-        'css' => 'min-width:300px;',
189
-        'std' => '30' // Default value to show home top section
190
-    ),
183
+	array(
184
+		'name' => __('Width of listing right section', 'geodirectory'),
185
+		'desc' => __('Enter the width of right section of listing page in %', 'geodirectory'),
186
+		'id' => 'geodir_width_listing_right_section',
187
+		'type' => 'text',
188
+		'css' => 'min-width:300px;',
189
+		'std' => '30' // Default value to show home top section
190
+	),
191 191
 
192 192
 
193
-    array(
194
-        'name' => __('Listing content section view', 'geodirectory'),
195
-        'desc' => __('Set the listing view of listing page', 'geodirectory'),
196
-        'id' => 'geodir_listing_view',
197
-        'css' => 'min-width:300px;',
198
-        'std' => 'gridview_onehalf',
199
-        'type' => 'select',
200
-        'class' => 'chosen_select',
201
-        'options' => array_unique(array(
202
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
203
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
204
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
205
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
206
-            'listview' => __('List view', 'geodirectory'),
207
-        ))
208
-    ),
193
+	array(
194
+		'name' => __('Listing content section view', 'geodirectory'),
195
+		'desc' => __('Set the listing view of listing page', 'geodirectory'),
196
+		'id' => 'geodir_listing_view',
197
+		'css' => 'min-width:300px;',
198
+		'std' => 'gridview_onehalf',
199
+		'type' => 'select',
200
+		'class' => 'chosen_select',
201
+		'options' => array_unique(array(
202
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
203
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
204
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
205
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
206
+			'listview' => __('List view', 'geodirectory'),
207
+		))
208
+	),
209 209
 
210
-    array(
211
-        'name' => __('Width of listing content section', 'geodirectory'),
212
-        'desc' => __('Enter the width of content section of listing page in %', 'geodirectory'),
213
-        'id' => 'geodir_width_listing_contant_section',
214
-        'type' => 'text',
215
-        'css' => 'min-width:300px;',
216
-        'std' => '63' // Default value to show home top section
217
-    ),
210
+	array(
211
+		'name' => __('Width of listing content section', 'geodirectory'),
212
+		'desc' => __('Enter the width of content section of listing page in %', 'geodirectory'),
213
+		'id' => 'geodir_width_listing_contant_section',
214
+		'type' => 'text',
215
+		'css' => 'min-width:300px;',
216
+		'std' => '63' // Default value to show home top section
217
+	),
218 218
 
219
-    array(
220
-        'name' => __('Listing left section', 'geodirectory'),
221
-        'desc' => __('Show the left section of listing page', 'geodirectory'),
222
-        'id' => 'geodir_show_listing_left_section',
223
-        'type' => 'checkbox',
224
-        'std' => '0' // Default value to show home top section
225
-    ),
219
+	array(
220
+		'name' => __('Listing left section', 'geodirectory'),
221
+		'desc' => __('Show the left section of listing page', 'geodirectory'),
222
+		'id' => 'geodir_show_listing_left_section',
223
+		'type' => 'checkbox',
224
+		'std' => '0' // Default value to show home top section
225
+	),
226 226
 
227
-    array(
228
-        'name' => __('Width of listing left section', 'geodirectory'),
229
-        'desc' => __('Enter the width of left section of listing in %', 'geodirectory'),
230
-        'id' => 'geodir_width_listing_left_section',
231
-        'type' => 'text',
232
-        'css' => 'min-width:300px;',
233
-        'std' => '30' // Default value to show home top section
234
-    ),
227
+	array(
228
+		'name' => __('Width of listing left section', 'geodirectory'),
229
+		'desc' => __('Enter the width of left section of listing in %', 'geodirectory'),
230
+		'id' => 'geodir_width_listing_left_section',
231
+		'type' => 'text',
232
+		'css' => 'min-width:300px;',
233
+		'std' => '30' // Default value to show home top section
234
+	),
235 235
 
236
-    array(
237
-        'name' => __('Listing bottom section', 'geodirectory'),
238
-        'desc' => __('Show the bottom section of listing page', 'geodirectory'),
239
-        'id' => 'geodir_show_listing_bottom_section',
240
-        'type' => 'checkbox',
241
-        'std' => '0' // Default value to show home top section
242
-    ),
236
+	array(
237
+		'name' => __('Listing bottom section', 'geodirectory'),
238
+		'desc' => __('Show the bottom section of listing page', 'geodirectory'),
239
+		'id' => 'geodir_show_listing_bottom_section',
240
+		'type' => 'checkbox',
241
+		'std' => '0' // Default value to show home top section
242
+	),
243 243
 
244
-    array(
245
-        'name' => __('Upload listing no image', 'geodirectory'),
246
-        'desc' => '',
247
-        'id' => 'geodir_listing_no_img',
248
-        'type' => 'file',
249
-        'std' => '0' // Default value to show home top section
250
-    ),
244
+	array(
245
+		'name' => __('Upload listing no image', 'geodirectory'),
246
+		'desc' => '',
247
+		'id' => 'geodir_listing_no_img',
248
+		'type' => 'file',
249
+		'std' => '0' // Default value to show home top section
250
+	),
251 251
 
252
-    array(
253
-        'name' => __('Description word limit', 'geodirectory'),
254
-        'desc' => '',
255
-        'id' => 'geodir_desc_word_limit',
256
-        'type' => 'text',
257
-        'css' => 'min-width:300px;',
258
-        'std' => '50' // Default value to show home top section
259
-    ),
252
+	array(
253
+		'name' => __('Description word limit', 'geodirectory'),
254
+		'desc' => '',
255
+		'id' => 'geodir_desc_word_limit',
256
+		'type' => 'text',
257
+		'css' => 'min-width:300px;',
258
+		'std' => '50' // Default value to show home top section
259
+	),
260 260
 
261
-    array(
262
-        'name' => __('Hover listing map animation', 'geodirectory'),
263
-        'desc' => __('Bounce map pin if listing hovered', 'geodirectory'),
264
-        'id' => 'geodir_listing_hover_bounce_map_pin',
265
-        'type' => 'checkbox',
266
-        'std' => '1' // Default value to show home top section
267
-    ),
261
+	array(
262
+		'name' => __('Hover listing map animation', 'geodirectory'),
263
+		'desc' => __('Bounce map pin if listing hovered', 'geodirectory'),
264
+		'id' => 'geodir_listing_hover_bounce_map_pin',
265
+		'type' => 'checkbox',
266
+		'std' => '1' // Default value to show home top section
267
+	),
268 268
 
269
-    array('type' => 'sectionend', 'id' => 'geodir_listing_layout'),
269
+	array('type' => 'sectionend', 'id' => 'geodir_listing_layout'),
270 270
 
271 271
 
272
-    array('name' => __('Listing General Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_listing_gen_settings '),
272
+	array('name' => __('Listing General Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_listing_gen_settings '),
273 273
 
274
-    array(
275
-        'name' => __('New listing default status', 'geodirectory'),
276
-        'desc' => __('Select new listing default status.', 'geodirectory'),
277
-        'tip' => '',
278
-        'id' => 'geodir_new_post_default_status',
279
-        'css' => 'min-width:300px;',
280
-        'std' => 'publish',
281
-        'type' => 'select',
282
-        'class' => 'chosen_select',
283
-        'options' => array_unique(array(
284
-            'publish' => __('publish', 'geodirectory'),
285
-            'draft' => __('draft', 'geodirectory'),
286
-        ))
287
-    ),
274
+	array(
275
+		'name' => __('New listing default status', 'geodirectory'),
276
+		'desc' => __('Select new listing default status.', 'geodirectory'),
277
+		'tip' => '',
278
+		'id' => 'geodir_new_post_default_status',
279
+		'css' => 'min-width:300px;',
280
+		'std' => 'publish',
281
+		'type' => 'select',
282
+		'class' => 'chosen_select',
283
+		'options' => array_unique(array(
284
+			'publish' => __('publish', 'geodirectory'),
285
+			'draft' => __('draft', 'geodirectory'),
286
+		))
287
+	),
288 288
 
289
-    array(
290
-        'name' => __('New listings settings', 'geodirectory'),
291
-        'desc' => __('Enter number of days a listing will appear new.(enter 0 to disable feature)', 'geodirectory'),
292
-        'id' => 'geodir_listing_new_days',
293
-        'type' => 'text',
294
-        'css' => 'min-width:300px;',
295
-        'std' => '30' // Default value for the page title - changed in settings
296
-    ),
289
+	array(
290
+		'name' => __('New listings settings', 'geodirectory'),
291
+		'desc' => __('Enter number of days a listing will appear new.(enter 0 to disable feature)', 'geodirectory'),
292
+		'id' => 'geodir_listing_new_days',
293
+		'type' => 'text',
294
+		'css' => 'min-width:300px;',
295
+		'std' => '30' // Default value for the page title - changed in settings
296
+	),
297 297
 
298
-    array('type' => 'sectionend', 'id' => 'geodir_listing_gen_settings'),
298
+	array('type' => 'sectionend', 'id' => 'geodir_listing_gen_settings'),
299 299
 
300 300
 
301
-    array('name' => __('Add Listing Form Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_add_listing_gen_settings'),
301
+	array('name' => __('Add Listing Form Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_add_listing_gen_settings'),
302 302
 
303
-    array(
304
-        'name' => __('Enable "Accept Terms and Conditions"', 'geodirectory'),
305
-        'desc' => __('Show the "Accept Terms and Conditions" field on add listing.', 'geodirectory'),
306
-        'id' => 'geodir_accept_term_condition',
307
-        'type' => 'checkbox',
308
-        'std' => '1' // Default value to show home top section
309
-    ),
303
+	array(
304
+		'name' => __('Enable "Accept Terms and Conditions"', 'geodirectory'),
305
+		'desc' => __('Show the "Accept Terms and Conditions" field on add listing.', 'geodirectory'),
306
+		'id' => 'geodir_accept_term_condition',
307
+		'type' => 'checkbox',
308
+		'std' => '1' // Default value to show home top section
309
+	),
310 310
 
311 311
 
312
-    array(
313
-        'name' => __('Show description field as editor', 'geodirectory'),
314
-        'desc' => __('Select post types to show advanced editor on add listing page.', 'geodirectory'),
315
-        'tip' => '',
316
-        'id' => 'geodir_tiny_editor_on_add_listing',
317
-        'css' => 'min-width:300px;',
318
-        'std' => array(),
319
-        'type' => 'multiselect',
320
-        'placeholder_text' => __('Select post types', 'geodirectory'),
321
-        'class' => 'chosen_select',
322
-        'options' => array_unique(geodir_post_type_setting_fun())
323
-    ),
312
+	array(
313
+		'name' => __('Show description field as editor', 'geodirectory'),
314
+		'desc' => __('Select post types to show advanced editor on add listing page.', 'geodirectory'),
315
+		'tip' => '',
316
+		'id' => 'geodir_tiny_editor_on_add_listing',
317
+		'css' => 'min-width:300px;',
318
+		'std' => array(),
319
+		'type' => 'multiselect',
320
+		'placeholder_text' => __('Select post types', 'geodirectory'),
321
+		'class' => 'chosen_select',
322
+		'options' => array_unique(geodir_post_type_setting_fun())
323
+	),
324 324
 
325
-    array('type' => 'sectionend', 'id' => 'geodir_add_listing_gen_settings'),
326
-    /* Listing Layout Settings end */
325
+	array('type' => 'sectionend', 'id' => 'geodir_add_listing_gen_settings'),
326
+	/* Listing Layout Settings end */
327 327
 
328 328
 
329
-    /* Search Layout Settings end */
329
+	/* Search Layout Settings end */
330 330
 
331
-    array('name' => __('Search', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_search_settings '),
331
+	array('name' => __('Search', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_search_settings '),
332 332
 
333 333
 
334
-    array('name' => __('Search Page Layout Settings', 'geodirectory'),
335
-        'type' => 'sectionstart',
336
-        'desc' => '',
337
-        'id' => 'geodir_search_layout'),
334
+	array('name' => __('Search Page Layout Settings', 'geodirectory'),
335
+		'type' => 'sectionstart',
336
+		'desc' => '',
337
+		'id' => 'geodir_search_layout'),
338 338
 
339
-    array(
340
-        'name' => __('Search top section', 'geodirectory'),
341
-        'desc' => __('Show the top section of search page', 'geodirectory'),
342
-        'id' => 'geodir_show_search_top_section',
343
-        'type' => 'checkbox',
344
-        'std' => '1' // Default value to show home top section
345
-    ),
339
+	array(
340
+		'name' => __('Search top section', 'geodirectory'),
341
+		'desc' => __('Show the top section of search page', 'geodirectory'),
342
+		'id' => 'geodir_show_search_top_section',
343
+		'type' => 'checkbox',
344
+		'std' => '1' // Default value to show home top section
345
+	),
346 346
 
347
-    array(
348
-        'name' => __('Search right section', 'geodirectory'),
349
-        'desc' => __('Show the right section of search page', 'geodirectory'),
350
-        'id' => 'geodir_show_search_right_section',
351
-        'type' => 'checkbox',
352
-        'std' => '1' // Default value to show home top section
353
-    ),
347
+	array(
348
+		'name' => __('Search right section', 'geodirectory'),
349
+		'desc' => __('Show the right section of search page', 'geodirectory'),
350
+		'id' => 'geodir_show_search_right_section',
351
+		'type' => 'checkbox',
352
+		'std' => '1' // Default value to show home top section
353
+	),
354 354
 
355
-    array(
356
-        'name' => __('Width of search right section', 'geodirectory'),
357
-        'desc' => __('Enter the width of right section of search page in %', 'geodirectory'),
358
-        'id' => 'geodir_width_search_right_section',
359
-        'type' => 'text',
360
-        'css' => 'min-width:300px;',
361
-        'std' => '30' // Default value to show home top section
362
-    ),
355
+	array(
356
+		'name' => __('Width of search right section', 'geodirectory'),
357
+		'desc' => __('Enter the width of right section of search page in %', 'geodirectory'),
358
+		'id' => 'geodir_width_search_right_section',
359
+		'type' => 'text',
360
+		'css' => 'min-width:300px;',
361
+		'std' => '30' // Default value to show home top section
362
+	),
363 363
 
364 364
 
365
-    array(
366
-        'name' => __('Search content section view', 'geodirectory'),
367
-        'desc' => __('Set the listing view of search page', 'geodirectory'),
368
-        'id' => 'geodir_search_view',
369
-        'css' => 'min-width:300px;',
370
-        'std' => 'gridview_onehalf',
371
-        'type' => 'select',
372
-        'class' => 'chosen_select',
373
-        'options' => array_unique(array(
374
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
375
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
376
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
377
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
378
-            'listview' => __('List view', 'geodirectory'),
379
-        ))
380
-    ),
365
+	array(
366
+		'name' => __('Search content section view', 'geodirectory'),
367
+		'desc' => __('Set the listing view of search page', 'geodirectory'),
368
+		'id' => 'geodir_search_view',
369
+		'css' => 'min-width:300px;',
370
+		'std' => 'gridview_onehalf',
371
+		'type' => 'select',
372
+		'class' => 'chosen_select',
373
+		'options' => array_unique(array(
374
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
375
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
376
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
377
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
378
+			'listview' => __('List view', 'geodirectory'),
379
+		))
380
+	),
381 381
 
382
-    array(
383
-        'name' => __('Width of search content section', 'geodirectory'),
384
-        'desc' => __('Enter the width of content section of search page in %', 'geodirectory'),
385
-        'id' => 'geodir_width_search_contant_section',
386
-        'type' => 'text',
387
-        'css' => 'min-width:300px;',
388
-        'std' => '63' // Default value to show home top section
389
-    ),
382
+	array(
383
+		'name' => __('Width of search content section', 'geodirectory'),
384
+		'desc' => __('Enter the width of content section of search page in %', 'geodirectory'),
385
+		'id' => 'geodir_width_search_contant_section',
386
+		'type' => 'text',
387
+		'css' => 'min-width:300px;',
388
+		'std' => '63' // Default value to show home top section
389
+	),
390 390
 
391
-    array(
392
-        'name' => __('Search left section', 'geodirectory'),
393
-        'desc' => __('Show the left section of search page', 'geodirectory'),
394
-        'id' => 'geodir_show_search_left_section',
395
-        'type' => 'checkbox',
396
-        'std' => '0' // Default value to show home top section
397
-    ),
391
+	array(
392
+		'name' => __('Search left section', 'geodirectory'),
393
+		'desc' => __('Show the left section of search page', 'geodirectory'),
394
+		'id' => 'geodir_show_search_left_section',
395
+		'type' => 'checkbox',
396
+		'std' => '0' // Default value to show home top section
397
+	),
398 398
 
399
-    array(
400
-        'name' => __('Width of search left section', 'geodirectory'),
401
-        'desc' => __('Enter the width of left section of search in %', 'geodirectory'),
402
-        'id' => 'geodir_width_search_left_section',
403
-        'type' => 'text',
404
-        'css' => 'min-width:300px;',
405
-        'std' => '30' // Default value to show home top section
406
-    ),
399
+	array(
400
+		'name' => __('Width of search left section', 'geodirectory'),
401
+		'desc' => __('Enter the width of left section of search in %', 'geodirectory'),
402
+		'id' => 'geodir_width_search_left_section',
403
+		'type' => 'text',
404
+		'css' => 'min-width:300px;',
405
+		'std' => '30' // Default value to show home top section
406
+	),
407 407
 
408
-    array(
409
-        'name' => __('Search bottom section', 'geodirectory'),
410
-        'desc' => __('Show the bottom section of search page', 'geodirectory'),
411
-        'id' => 'geodir_show_search_bottom_section',
412
-        'type' => 'checkbox',
413
-        'std' => '0' // Default value to show home top section
414
-    ),
408
+	array(
409
+		'name' => __('Search bottom section', 'geodirectory'),
410
+		'desc' => __('Show the bottom section of search page', 'geodirectory'),
411
+		'id' => 'geodir_show_search_bottom_section',
412
+		'type' => 'checkbox',
413
+		'std' => '0' // Default value to show home top section
414
+	),
415 415
 	
416 416
 	array(
417
-        'name' => __('Show advanced pagination details', 'geodirectory'),
418
-        'desc' => __('This will add extra pagination info like "Showing listings x-y of z" after/before pagination.', 'geodirectory'),
419
-        'id' => 'geodir_pagination_advance_info',
420
-        'css' => 'min-width:300px;',
421
-        'std' => '',
422
-        'type' => 'select',
423
-        'class' => 'chosen_select',
424
-        'options' => array(
417
+		'name' => __('Show advanced pagination details', 'geodirectory'),
418
+		'desc' => __('This will add extra pagination info like "Showing listings x-y of z" after/before pagination.', 'geodirectory'),
419
+		'id' => 'geodir_pagination_advance_info',
420
+		'css' => 'min-width:300px;',
421
+		'std' => '',
422
+		'type' => 'select',
423
+		'class' => 'chosen_select',
424
+		'options' => array(
425 425
 						'' => __('Never Display', 'geodirectory'),
426 426
 						'after' => __('After Pagination', 'geodirectory'),
427 427
 						'before' => __('Before Pagination', 'geodirectory')
428 428
 					)
429
-    ),
429
+	),
430 430
 
431
-    array('type' => 'sectionend', 'id' => 'geodir_search_layout'),
431
+	array('type' => 'sectionend', 'id' => 'geodir_search_layout'),
432 432
 
433 433
 
434
-    array('name' => __('Search form settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_search_form_default_text_settings'),
434
+	array('name' => __('Search form settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_search_form_default_text_settings'),
435 435
 
436
-    array(
437
-        'name' => __('Use old non-styled form', 'geodirectory'),
438
-        'desc' => __('Will show the old type form (not recommended unless you had added your own styles)', 'geodirectory'),
439
-        'id' => 'geodir_show_search_old_search_from',
440
-        'type' => 'checkbox',
441
-        'std' => '0' // Default value to show
442
-    ),
436
+	array(
437
+		'name' => __('Use old non-styled form', 'geodirectory'),
438
+		'desc' => __('Will show the old type form (not recommended unless you had added your own styles)', 'geodirectory'),
439
+		'id' => 'geodir_show_search_old_search_from',
440
+		'type' => 'checkbox',
441
+		'std' => '0' // Default value to show
442
+	),
443 443
 
444
-    array(
445
-        'name' => __('Search field default value', 'geodirectory'),
446
-        'desc' => __('Show the search text box \'placeholder\' value on search form.', 'geodirectory'),
447
-        'id' => 'geodir_search_field_default_text',
448
-        'type' => 'text',
449
-        'css' => 'min-width:300px;',
450
-        'std' => 'Search for' // show on the listing page.
451
-    ),
444
+	array(
445
+		'name' => __('Search field default value', 'geodirectory'),
446
+		'desc' => __('Show the search text box \'placeholder\' value on search form.', 'geodirectory'),
447
+		'id' => 'geodir_search_field_default_text',
448
+		'type' => 'text',
449
+		'css' => 'min-width:300px;',
450
+		'std' => 'Search for' // show on the listing page.
451
+	),
452 452
 
453
-    array(
454
-        'name' => __('Near field default value', 'geodirectory'),
455
-        'desc' => __('Show the near text box \'placeholder\' value on search form.', 'geodirectory'),
456
-        'id' => 'geodir_near_field_default_text',
457
-        'type' => 'text',
458
-        'css' => 'min-width:300px;',
459
-        'std' => 'Near' // show on the listing page.
460
-    ),
453
+	array(
454
+		'name' => __('Near field default value', 'geodirectory'),
455
+		'desc' => __('Show the near text box \'placeholder\' value on search form.', 'geodirectory'),
456
+		'id' => 'geodir_near_field_default_text',
457
+		'type' => 'text',
458
+		'css' => 'min-width:300px;',
459
+		'std' => 'Near' // show on the listing page.
460
+	),
461 461
 
462
-    array(
463
-        'name' => __('Search button label', 'geodirectory'),
464
-        'desc' => __('Show the search button label on search form.', 'geodirectory'),
465
-        'id' => 'geodir_search_button_label',
466
-        'type' => 'text',
467
-        'css' => 'min-width:300px;',
468
-        'std' => 'Search' // show on the listing page.
469
-    ),
462
+	array(
463
+		'name' => __('Search button label', 'geodirectory'),
464
+		'desc' => __('Show the search button label on search form.', 'geodirectory'),
465
+		'id' => 'geodir_search_button_label',
466
+		'type' => 'text',
467
+		'css' => 'min-width:300px;',
468
+		'std' => 'Search' // show on the listing page.
469
+	),
470 470
 
471
-    array('type' => 'sectionend', 'id' => 'geodir_search_form_default_text_settings'),
471
+	array('type' => 'sectionend', 'id' => 'geodir_search_form_default_text_settings'),
472 472
 
473
-    /* Listing Layout Settings end */
473
+	/* Listing Layout Settings end */
474 474
 
475 475
 
476
-    /* Detail Layout Settings end */
476
+	/* Detail Layout Settings end */
477 477
 
478
-    array('name' => __('Detail', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_detail_settings '),
478
+	array('name' => __('Detail', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_detail_settings '),
479 479
 
480
-    array('name' => __('Detail/Single Page Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_settings '),
480
+	array('name' => __('Detail/Single Page Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_settings '),
481 481
 
482
-    array(
483
-        'name' => __('Detail top section', 'geodirectory'),
484
-        'desc' => __('Show the top section of listing page', 'geodirectory'),
485
-        'id' => 'geodir_show_detail_top_section',
486
-        'type' => 'checkbox',
487
-        'std' => '1' // Default value to show home top section
488
-    ),
482
+	array(
483
+		'name' => __('Detail top section', 'geodirectory'),
484
+		'desc' => __('Show the top section of listing page', 'geodirectory'),
485
+		'id' => 'geodir_show_detail_top_section',
486
+		'type' => 'checkbox',
487
+		'std' => '1' // Default value to show home top section
488
+	),
489 489
 
490
-    array(
491
-        'name' => __('Detail bottom section', 'geodirectory'),
492
-        'desc' => __('Show the bottom section of listing page', 'geodirectory'),
493
-        'id' => 'geodir_show_detail_bottom_section',
494
-        'type' => 'checkbox',
495
-        'std' => '1' // Default value to show home top section
496
-    ),
497
-    array(
498
-        'name' => __('Detail sidebar section on left side', 'geodirectory'),
499
-        'desc' => __('Display detail sidebar section on left side of the detail page', 'geodirectory'),
500
-        'id' => 'geodir_detail_sidebar_left_section',
501
-        'type' => 'checkbox',
502
-        'std' => '0'
503
-    ),
504
-    array(
505
-        'name' => __('Disable GD modal', 'geodirectory'),
506
-        'desc' => __('Disable GD modal that displays slideshow images in popup', 'geodirectory'),
507
-        'id' => 'geodir_disable_gb_modal',
508
-        'type' => 'checkbox',
509
-        'std' => '0'
510
-    ),
511
-    array(
512
-        'name' => __('Disable Tweet, Fb Like, Google+ buttons section', 'geodirectory'),
513
-        'desc' => __('Disable Tweet, Fb Like, Google+ buttons section that displays on Detail page sidebar', 'geodirectory'),
514
-        'id' => 'geodir_disable_tfg_buttons_section',
515
-        'type' => 'checkbox',
516
-        'std' => '0'
517
-    ),
518
-    array(
519
-        'name' => __('Disable Google Analytics section', 'geodirectory'),
520
-        'desc' => __('Disable Google Analytics section that displays on Detail page sidebar', 'geodirectory'),
521
-        'id' => 'geodir_disable_google_analytics_section',
522
-        'type' => 'checkbox',
523
-        'std' => '0'
524
-    ),
525
-    array(
526
-        'name' => __('Disable User Links section', 'geodirectory'),
527
-        'desc' => __('Disable User Links section (Edit post, Favorite etc..) that displays on Detail page sidebar', 'geodirectory'),
528
-        'id' => 'geodir_disable_user_links_section',
529
-        'type' => 'checkbox',
530
-        'std' => '0'
531
-    ),
532
-    array(
533
-        'name' => __('Disable Rating Info section', 'geodirectory'),
534
-        'desc' => __('Disable Rating Info section that displays on Detail page sidebar', 'geodirectory'),
535
-        'id' => 'geodir_disable_rating_info_section',
536
-        'type' => 'checkbox',
537
-        'std' => '0'
538
-    ),
539
-    array(
540
-        'name' => __('Disable Listing Info section', 'geodirectory'),
541
-        'desc' => __('Disable Listing Info section that displays on Detail page sidebar', 'geodirectory'),
542
-        'id' => 'geodir_disable_listing_info_section',
543
-        'type' => 'checkbox',
544
-        'std' => '0'
545
-    ),
490
+	array(
491
+		'name' => __('Detail bottom section', 'geodirectory'),
492
+		'desc' => __('Show the bottom section of listing page', 'geodirectory'),
493
+		'id' => 'geodir_show_detail_bottom_section',
494
+		'type' => 'checkbox',
495
+		'std' => '1' // Default value to show home top section
496
+	),
497
+	array(
498
+		'name' => __('Detail sidebar section on left side', 'geodirectory'),
499
+		'desc' => __('Display detail sidebar section on left side of the detail page', 'geodirectory'),
500
+		'id' => 'geodir_detail_sidebar_left_section',
501
+		'type' => 'checkbox',
502
+		'std' => '0'
503
+	),
504
+	array(
505
+		'name' => __('Disable GD modal', 'geodirectory'),
506
+		'desc' => __('Disable GD modal that displays slideshow images in popup', 'geodirectory'),
507
+		'id' => 'geodir_disable_gb_modal',
508
+		'type' => 'checkbox',
509
+		'std' => '0'
510
+	),
511
+	array(
512
+		'name' => __('Disable Tweet, Fb Like, Google+ buttons section', 'geodirectory'),
513
+		'desc' => __('Disable Tweet, Fb Like, Google+ buttons section that displays on Detail page sidebar', 'geodirectory'),
514
+		'id' => 'geodir_disable_tfg_buttons_section',
515
+		'type' => 'checkbox',
516
+		'std' => '0'
517
+	),
518
+	array(
519
+		'name' => __('Disable Google Analytics section', 'geodirectory'),
520
+		'desc' => __('Disable Google Analytics section that displays on Detail page sidebar', 'geodirectory'),
521
+		'id' => 'geodir_disable_google_analytics_section',
522
+		'type' => 'checkbox',
523
+		'std' => '0'
524
+	),
525
+	array(
526
+		'name' => __('Disable User Links section', 'geodirectory'),
527
+		'desc' => __('Disable User Links section (Edit post, Favorite etc..) that displays on Detail page sidebar', 'geodirectory'),
528
+		'id' => 'geodir_disable_user_links_section',
529
+		'type' => 'checkbox',
530
+		'std' => '0'
531
+	),
532
+	array(
533
+		'name' => __('Disable Rating Info section', 'geodirectory'),
534
+		'desc' => __('Disable Rating Info section that displays on Detail page sidebar', 'geodirectory'),
535
+		'id' => 'geodir_disable_rating_info_section',
536
+		'type' => 'checkbox',
537
+		'std' => '0'
538
+	),
539
+	array(
540
+		'name' => __('Disable Listing Info section', 'geodirectory'),
541
+		'desc' => __('Disable Listing Info section that displays on Detail page sidebar', 'geodirectory'),
542
+		'id' => 'geodir_disable_listing_info_section',
543
+		'type' => 'checkbox',
544
+		'std' => '0'
545
+	),
546 546
 
547
-    array('type' => 'sectionend', 'id' => 'detail_page_settings'),
547
+	array('type' => 'sectionend', 'id' => 'detail_page_settings'),
548 548
 
549 549
 
550
-    /* ---------- DETAIL PAGE TAB SETTING START*/
550
+	/* ---------- DETAIL PAGE TAB SETTING START*/
551 551
 
552
-    array('name' => __('Detail Page Tab Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_detail_page_tab_settings '),
552
+	array('name' => __('Detail Page Tab Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_detail_page_tab_settings '),
553 553
 
554
-    array(
555
-        'name' => __('Exclude selected tabs from detail page', 'geodirectory'),
556
-        'desc' => __('Select tabs to exclude from the list of all appearing tabs on detail page.', 'geodirectory'),
557
-        'tip' => '',
558
-        'id' => 'geodir_detail_page_tabs_excluded',
559
-        'css' => 'min-width:300px;',
560
-        'std' => geodir_get_posttypes(),
561
-        'type' => 'multiselect',
562
-        'placeholder_text' => __('Select tabs', 'geodirectory'),
563
-        'class' => 'chosen_select',
564
-        'options' => array_unique(geodir_detail_page_tabs_key_value_array())
565
-    ),
554
+	array(
555
+		'name' => __('Exclude selected tabs from detail page', 'geodirectory'),
556
+		'desc' => __('Select tabs to exclude from the list of all appearing tabs on detail page.', 'geodirectory'),
557
+		'tip' => '',
558
+		'id' => 'geodir_detail_page_tabs_excluded',
559
+		'css' => 'min-width:300px;',
560
+		'std' => geodir_get_posttypes(),
561
+		'type' => 'multiselect',
562
+		'placeholder_text' => __('Select tabs', 'geodirectory'),
563
+		'class' => 'chosen_select',
564
+		'options' => array_unique(geodir_detail_page_tabs_key_value_array())
565
+	),
566 566
     
567
-    array(
568
-        'name' => __('Show as list', 'geodirectory'),
569
-        'desc' => __('Show as list instead of tabs', 'geodirectory'),
570
-        'id' => 'geodir_disable_tabs',
571
-        'type' => 'checkbox',
572
-        'std' => '0'
573
-    ),
567
+	array(
568
+		'name' => __('Show as list', 'geodirectory'),
569
+		'desc' => __('Show as list instead of tabs', 'geodirectory'),
570
+		'id' => 'geodir_disable_tabs',
571
+		'type' => 'checkbox',
572
+		'std' => '0'
573
+	),
574 574
 
575
-    array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
576
-    /* ---------- DETAIL PAGE TAB SETTING END*/
575
+	array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
576
+	/* ---------- DETAIL PAGE TAB SETTING END*/
577 577
 
578
-    /* START DEFAULT STAR IMAGE*/
579
-    array('name' => __('Default Rating Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_rating_settings '),
578
+	/* START DEFAULT STAR IMAGE*/
579
+	array('name' => __('Default Rating Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_rating_settings '),
580 580
 
581
-    array(
582
-        'name' => __('Upload default rating star icon', 'geodirectory'),
583
-        'desc' => '',
584
-        'id' => 'geodir_default_rating_star_icon',
585
-        'type' => 'file',
586
-        'std' => '0',
587
-        'value' => geodir_plugin_url() . '/geodirectory-assets/images/stars.png'// Default value to show home top section
588
-    ),
581
+	array(
582
+		'name' => __('Upload default rating star icon', 'geodirectory'),
583
+		'desc' => '',
584
+		'id' => 'geodir_default_rating_star_icon',
585
+		'type' => 'file',
586
+		'std' => '0',
587
+		'value' => geodir_plugin_url() . '/geodirectory-assets/images/stars.png'// Default value to show home top section
588
+	),
589 589
 	array(
590 590
 		'name' => __('Enable Font Awesome', 'geodirectory'),
591 591
 		'desc' => __('When enabled all rating images will be using font awesome rating icons as images.', 'geodirectory' ),
@@ -601,369 +601,369 @@  discard block
 block discarded – undo
601 601
 		'std' => '#757575'
602 602
 	),
603 603
 
604
-    array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
604
+	array('type' => 'sectionend', 'id' => 'geodir_detail_page_tab_settings'),
605 605
 
606
-    /* END DEFAULT STAR IMAGE*/
606
+	/* END DEFAULT STAR IMAGE*/
607 607
 
608
-    /* Detail related post settings start */
608
+	/* Detail related post settings start */
609 609
 
610
-    array('name' => __('Related Post Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_related_post_settings '),
610
+	array('name' => __('Related Post Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'detail_page_related_post_settings '),
611 611
 
612
-    array(
613
-        'name' => __('Show related post listing on', 'geodirectory'),
614
-        'desc' => __('Select the post types to display related listing on detail page.', 'geodirectory'),
615
-        'tip' => '',
616
-        'id' => 'geodir_add_related_listing_posttypes',
617
-        'css' => 'min-width:300px;',
618
-        'std' => geodir_get_posttypes(),
619
-        'type' => 'multiselect',
620
-        'placeholder_text' => __('Select post types', 'geodirectory'),
621
-        'class' => 'chosen_select',
622
-        'options' => array_unique(geodir_post_type_setting_fun())
623
-    ),
612
+	array(
613
+		'name' => __('Show related post listing on', 'geodirectory'),
614
+		'desc' => __('Select the post types to display related listing on detail page.', 'geodirectory'),
615
+		'tip' => '',
616
+		'id' => 'geodir_add_related_listing_posttypes',
617
+		'css' => 'min-width:300px;',
618
+		'std' => geodir_get_posttypes(),
619
+		'type' => 'multiselect',
620
+		'placeholder_text' => __('Select post types', 'geodirectory'),
621
+		'class' => 'chosen_select',
622
+		'options' => array_unique(geodir_post_type_setting_fun())
623
+	),
624 624
 
625
-    array(
626
-        'name' => __('Relate to', 'geodirectory'),
627
-        'desc' => __('Set the relation between current post to related posts.', 'geodirectory'),
628
-        'id' => 'geodir_related_post_relate_to',
629
-        'css' => 'min-width:300px;',
630
-        'std' => 'category',
631
-        'type' => 'select',
632
-        'class' => 'chosen_select',
633
-        'options' => array_unique(array(
634
-            'category' => __('Categories', 'geodirectory'),
635
-            'tags' => __('Tags', 'geodirectory'),
636
-        ))
637
-    ),
625
+	array(
626
+		'name' => __('Relate to', 'geodirectory'),
627
+		'desc' => __('Set the relation between current post to related posts.', 'geodirectory'),
628
+		'id' => 'geodir_related_post_relate_to',
629
+		'css' => 'min-width:300px;',
630
+		'std' => 'category',
631
+		'type' => 'select',
632
+		'class' => 'chosen_select',
633
+		'options' => array_unique(array(
634
+			'category' => __('Categories', 'geodirectory'),
635
+			'tags' => __('Tags', 'geodirectory'),
636
+		))
637
+	),
638 638
 
639
-    array(
640
-        'name' => __('Layout', 'geodirectory'),
641
-        'desc' => __('Set the listing view of relate post on detail page', 'geodirectory'),
642
-        'id' => 'geodir_related_post_listing_view',
643
-        'css' => 'min-width:300px;',
644
-        'std' => 'gridview_onehalf',
645
-        'type' => 'select',
646
-        'class' => 'chosen_select',
647
-        'options' => array_unique(array(
648
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
649
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
650
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
651
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
652
-            'listview' => __('List view', 'geodirectory'),
653
-        ))
654
-    ),
639
+	array(
640
+		'name' => __('Layout', 'geodirectory'),
641
+		'desc' => __('Set the listing view of relate post on detail page', 'geodirectory'),
642
+		'id' => 'geodir_related_post_listing_view',
643
+		'css' => 'min-width:300px;',
644
+		'std' => 'gridview_onehalf',
645
+		'type' => 'select',
646
+		'class' => 'chosen_select',
647
+		'options' => array_unique(array(
648
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
649
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
650
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
651
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
652
+			'listview' => __('List view', 'geodirectory'),
653
+		))
654
+	),
655 655
 
656
-    array(
657
-        'name' => __('Sort by', 'geodirectory'),
658
-        'desc' => __('Set the related post listing sort by view', 'geodirectory'),
659
-        'id' => 'geodir_related_post_sortby',
660
-        'css' => 'min-width:300px;',
661
-        'std' => 'latest',
662
-        'type' => 'select',
663
-        'class' => 'chosen_select',
664
-        'options' => array_unique(array(
665
-            'latest' => __('Latest', 'geodirectory'),
666
-            'featured' => __('Featured', 'geodirectory'),
667
-            'high_review' => __('Review', 'geodirectory'),
668
-            'high_rating' => __('Rating', 'geodirectory'),
669
-            'random' => __('Random', 'geodirectory'),
670
-            'nearest' => __('Nearest', 'geodirectory'),
671
-        ))
672
-    ),
656
+	array(
657
+		'name' => __('Sort by', 'geodirectory'),
658
+		'desc' => __('Set the related post listing sort by view', 'geodirectory'),
659
+		'id' => 'geodir_related_post_sortby',
660
+		'css' => 'min-width:300px;',
661
+		'std' => 'latest',
662
+		'type' => 'select',
663
+		'class' => 'chosen_select',
664
+		'options' => array_unique(array(
665
+			'latest' => __('Latest', 'geodirectory'),
666
+			'featured' => __('Featured', 'geodirectory'),
667
+			'high_review' => __('Review', 'geodirectory'),
668
+			'high_rating' => __('Rating', 'geodirectory'),
669
+			'random' => __('Random', 'geodirectory'),
670
+			'nearest' => __('Nearest', 'geodirectory'),
671
+		))
672
+	),
673 673
 
674
-    array(
675
-        'name' => __('Number of posts:', 'geodirectory'),
676
-        'desc' => __('Enter number of posts to display on related posts listing', 'geodirectory'),
677
-        'id' => 'geodir_related_post_count',
678
-        'type' => 'text',
679
-        'css' => 'min-width:300px;',
680
-        'std' => '5' // Default value to show home top section
681
-    ),
674
+	array(
675
+		'name' => __('Number of posts:', 'geodirectory'),
676
+		'desc' => __('Enter number of posts to display on related posts listing', 'geodirectory'),
677
+		'id' => 'geodir_related_post_count',
678
+		'type' => 'text',
679
+		'css' => 'min-width:300px;',
680
+		'std' => '5' // Default value to show home top section
681
+	),
682 682
 
683
-    array(
684
-        'name' => __('Post excerpt', 'geodirectory'),
685
-        'desc' => __('Post content excerpt character count', 'geodirectory'),
686
-        'id' => 'geodir_related_post_excerpt',
687
-        'type' => 'text',
688
-        'css' => 'min-width:300px;',
689
-        'std' => '20' // Default value to show home top section
690
-    ),
683
+	array(
684
+		'name' => __('Post excerpt', 'geodirectory'),
685
+		'desc' => __('Post content excerpt character count', 'geodirectory'),
686
+		'id' => 'geodir_related_post_excerpt',
687
+		'type' => 'text',
688
+		'css' => 'min-width:300px;',
689
+		'std' => '20' // Default value to show home top section
690
+	),
691 691
 
692 692
 
693
-    array('type' => 'sectionend', 'id' => 'detail_page_related_post_settings'),
694
-    /* Detail Layout Settings end */
693
+	array('type' => 'sectionend', 'id' => 'detail_page_related_post_settings'),
694
+	/* Detail Layout Settings end */
695 695
 
696
-    /* Author Layout Settings Start */
696
+	/* Author Layout Settings Start */
697 697
 
698
-    array('name' => __('Author', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_author_settings '),
698
+	array('name' => __('Author', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_author_settings '),
699 699
 
700 700
 
701
-    array('name' => __('Author Page Layout Settings', 'geodirectory'),
702
-        'type' => 'sectionstart',
703
-        'desc' => '',
704
-        'id' => 'geodir_author_layout'),
701
+	array('name' => __('Author Page Layout Settings', 'geodirectory'),
702
+		'type' => 'sectionstart',
703
+		'desc' => '',
704
+		'id' => 'geodir_author_layout'),
705 705
 
706
-    array(
707
-        'name' => __('Author top section', 'geodirectory'),
708
-        'desc' => __('Show the top section of author page', 'geodirectory'),
709
-        'id' => 'geodir_show_author_top_section',
710
-        'type' => 'checkbox',
711
-        'std' => '1' // Default value to show home top section
712
-    ),
706
+	array(
707
+		'name' => __('Author top section', 'geodirectory'),
708
+		'desc' => __('Show the top section of author page', 'geodirectory'),
709
+		'id' => 'geodir_show_author_top_section',
710
+		'type' => 'checkbox',
711
+		'std' => '1' // Default value to show home top section
712
+	),
713 713
 
714
-    array(
715
-        'name' => __('Author right section', 'geodirectory'),
716
-        'desc' => __('Show the right section of author page', 'geodirectory'),
717
-        'id' => 'geodir_show_author_right_section',
718
-        'type' => 'checkbox',
719
-        'std' => '1' // Default value to show home top section
720
-    ),
714
+	array(
715
+		'name' => __('Author right section', 'geodirectory'),
716
+		'desc' => __('Show the right section of author page', 'geodirectory'),
717
+		'id' => 'geodir_show_author_right_section',
718
+		'type' => 'checkbox',
719
+		'std' => '1' // Default value to show home top section
720
+	),
721 721
 
722
-    array(
723
-        'name' => __('Width of author right section', 'geodirectory'),
724
-        'desc' => __('Enter the width of right section of author page in %', 'geodirectory'),
725
-        'id' => 'geodir_width_author_right_section',
726
-        'type' => 'text',
727
-        'css' => 'min-width:300px;',
728
-        'std' => '30' // Default value to show home top section
729
-    ),
722
+	array(
723
+		'name' => __('Width of author right section', 'geodirectory'),
724
+		'desc' => __('Enter the width of right section of author page in %', 'geodirectory'),
725
+		'id' => 'geodir_width_author_right_section',
726
+		'type' => 'text',
727
+		'css' => 'min-width:300px;',
728
+		'std' => '30' // Default value to show home top section
729
+	),
730 730
 
731
-    array(
732
-        'name' => __('Author content section view', 'geodirectory'),
733
-        'desc' => __('Set the listing view of author page', 'geodirectory'),
734
-        'id' => 'geodir_author_view',
735
-        'css' => 'min-width:300px;',
736
-        'std' => 'gridview_onehalf',
737
-        'type' => 'select',
738
-        'class' => 'chosen_select',
739
-        'options' => array_unique(array(
740
-            'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
741
-            'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
742
-            'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
743
-            'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
744
-            'listview' => __('List view', 'geodirectory'),
745
-        ))
746
-    ),
731
+	array(
732
+		'name' => __('Author content section view', 'geodirectory'),
733
+		'desc' => __('Set the listing view of author page', 'geodirectory'),
734
+		'id' => 'geodir_author_view',
735
+		'css' => 'min-width:300px;',
736
+		'std' => 'gridview_onehalf',
737
+		'type' => 'select',
738
+		'class' => 'chosen_select',
739
+		'options' => array_unique(array(
740
+			'gridview_onehalf' => __('Grid View (Two Columns)', 'geodirectory'),
741
+			'gridview_onethird' => __('Grid View (Three Columns)', 'geodirectory'),
742
+			'gridview_onefourth' => __('Grid View (Four Columns)', 'geodirectory'),
743
+			'gridview_onefifth' => __('Grid View (Five Columns)', 'geodirectory'),
744
+			'listview' => __('List view', 'geodirectory'),
745
+		))
746
+	),
747 747
 
748
-    array(
749
-        'name' => __('Width of author content section', 'geodirectory'),
750
-        'desc' => __('Enter the width of content section of author page in %', 'geodirectory'),
751
-        'id' => 'geodir_width_author_contant_section',
752
-        'type' => 'text',
753
-        'css' => 'min-width:300px;',
754
-        'std' => '63' // Default value to show home top section
755
-    ),
748
+	array(
749
+		'name' => __('Width of author content section', 'geodirectory'),
750
+		'desc' => __('Enter the width of content section of author page in %', 'geodirectory'),
751
+		'id' => 'geodir_width_author_contant_section',
752
+		'type' => 'text',
753
+		'css' => 'min-width:300px;',
754
+		'std' => '63' // Default value to show home top section
755
+	),
756 756
 
757
-    array(
758
-        'name' => __('Author left section', 'geodirectory'),
759
-        'desc' => __('Show the left section of author page', 'geodirectory'),
760
-        'id' => 'geodir_show_author_left_section',
761
-        'type' => 'checkbox',
762
-        'std' => '0' // Default value to show home top section
763
-    ),
757
+	array(
758
+		'name' => __('Author left section', 'geodirectory'),
759
+		'desc' => __('Show the left section of author page', 'geodirectory'),
760
+		'id' => 'geodir_show_author_left_section',
761
+		'type' => 'checkbox',
762
+		'std' => '0' // Default value to show home top section
763
+	),
764 764
 
765
-    array(
766
-        'name' => __('Width of author left section', 'geodirectory'),
767
-        'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
768
-        'id' => 'geodir_width_author_left_section',
769
-        'type' => 'text',
770
-        'css' => 'min-width:300px;',
771
-        'std' => '30' // Default value to show home top section
772
-    ),
765
+	array(
766
+		'name' => __('Width of author left section', 'geodirectory'),
767
+		'desc' => __('Enter the width of left section of home page in %', 'geodirectory'),
768
+		'id' => 'geodir_width_author_left_section',
769
+		'type' => 'text',
770
+		'css' => 'min-width:300px;',
771
+		'std' => '30' // Default value to show home top section
772
+	),
773 773
 
774
-    array(
775
-        'name' => __('Author bottom section', 'geodirectory'),
776
-        'desc' => __('Show the bottom section of author page', 'geodirectory'),
777
-        'id' => 'geodir_show_author_bottom_section',
778
-        'type' => 'checkbox',
779
-        'std' => '0' // Default value to show home top section
780
-    ),
774
+	array(
775
+		'name' => __('Author bottom section', 'geodirectory'),
776
+		'desc' => __('Show the bottom section of author page', 'geodirectory'),
777
+		'id' => 'geodir_show_author_bottom_section',
778
+		'type' => 'checkbox',
779
+		'std' => '0' // Default value to show home top section
780
+	),
781 781
 
782 782
 
783
-    array(
784
-        'name' => __('Description word limit', 'geodirectory'),
785
-        'desc' => '',
786
-        'id' => 'geodir_author_desc_word_limit',
787
-        'type' => 'text',
788
-        'css' => 'min-width:300px;',
789
-        'std' => '50' // Default value to show home top section
790
-    ),
783
+	array(
784
+		'name' => __('Description word limit', 'geodirectory'),
785
+		'desc' => '',
786
+		'id' => 'geodir_author_desc_word_limit',
787
+		'type' => 'text',
788
+		'css' => 'min-width:300px;',
789
+		'std' => '50' // Default value to show home top section
790
+	),
791 791
 
792
-    array('type' => 'sectionend', 'id' => 'geodir_author_layout'),
793
-    /* Author Layout Settings end */
792
+	array('type' => 'sectionend', 'id' => 'geodir_author_layout'),
793
+	/* Author Layout Settings end */
794 794
 
795 795
 
796
-    /* Post Type Navigation Settings Start */
797
-    array('name' => __('Navigation', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_navigation_settings'),
796
+	/* Post Type Navigation Settings Start */
797
+	array('name' => __('Navigation', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_navigation_settings'),
798 798
 
799 799
 
800
-    /* Post Type Navigation Settings Start */
800
+	/* Post Type Navigation Settings Start */
801 801
 
802
-    array('name' => __('Navigation Locations', 'geodirectory'),
803
-        'type' => 'sectionstart',
804
-        'desc' => '',
805
-        'id' => 'geodir_navigation_locations'),
802
+	array('name' => __('Navigation Locations', 'geodirectory'),
803
+		'type' => 'sectionstart',
804
+		'desc' => '',
805
+		'id' => 'geodir_navigation_locations'),
806 806
 
807
-    array(
808
-        'name' => __('Show geodirectory navigation in selected menu locations', 'geodirectory'),
809
-        'desc' => '',
810
-        'tip' => '',
811
-        'id' => 'geodir_theme_location_nav',
812
-        'css' => 'min-width:300px;',
813
-        'std' => array(),
814
-        'type' => 'multiselect',
815
-        'placeholder_text' => __('Select menu locations', 'geodirectory'),
816
-        'class' => 'chosen_select',
817
-        'options' => array_unique(geodir_theme_location_setting_fun())
818
-    ),
819
-    array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
820
-
821
-
822
-    array('name' => __('Navigation Settings', 'geodirectory'),
823
-        'type' => 'sectionstart',
824
-        'desc' => '',
825
-        'id' => 'geodir_navigation_options'),
807
+	array(
808
+		'name' => __('Show geodirectory navigation in selected menu locations', 'geodirectory'),
809
+		'desc' => '',
810
+		'tip' => '',
811
+		'id' => 'geodir_theme_location_nav',
812
+		'css' => 'min-width:300px;',
813
+		'std' => array(),
814
+		'type' => 'multiselect',
815
+		'placeholder_text' => __('Select menu locations', 'geodirectory'),
816
+		'class' => 'chosen_select',
817
+		'options' => array_unique(geodir_theme_location_setting_fun())
818
+	),
819
+	array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
826 820
 
827 821
 
828
-    array(
829
-        'name' => __('Show add listing navigation in menu', 'geodirectory'),
830
-        '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')),
831
-        'id' => 'geodir_show_addlisting_nav',
832
-        'std' => '1',
833
-        'type' => 'checkbox'
834
-    ),
822
+	array('name' => __('Navigation Settings', 'geodirectory'),
823
+		'type' => 'sectionstart',
824
+		'desc' => '',
825
+		'id' => 'geodir_navigation_options'),
835 826
 
836
-    array(
837
-        'name' => __('Show listings navigation in menu', 'geodirectory'),
838
-        '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')),
839
-        'id' => 'geodir_show_listing_nav',
840
-        'std' => '1',
841
-        'type' => 'checkbox'
842
-    ),
843 827
 
844
-    array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
828
+	array(
829
+		'name' => __('Show add listing navigation in menu', 'geodirectory'),
830
+		'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')),
831
+		'id' => 'geodir_show_addlisting_nav',
832
+		'std' => '1',
833
+		'type' => 'checkbox'
834
+	),
845 835
 
836
+	array(
837
+		'name' => __('Show listings navigation in menu', 'geodirectory'),
838
+		'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')),
839
+		'id' => 'geodir_show_listing_nav',
840
+		'std' => '1',
841
+		'type' => 'checkbox'
842
+	),
846 843
 
847
-    array('name' => __('Post Type Navigation Settings', 'geodirectory'),
848
-        'type' => 'sectionstart',
849
-        'desc' => '',
850
-        'id' => 'geodir_post_type_navigation_layout'),
851
-    array(
852
-        'name' => __('Show listing link in main navigation', 'geodirectory'),
853
-        'desc' => '',
854
-        'tip' => '',
855
-        'id' => 'geodir_add_posttype_in_main_nav',
856
-        'css' => 'min-width:300px;',
857
-        'std' => array(),
858
-        'type' => 'multiselect',
859
-        'placeholder_text' => __('Select post types', 'geodirectory'),
860
-        'class' => 'chosen_select',
861
-        'options' => array_unique(geodir_post_type_setting_fun())
862
-    ),
844
+	array('type' => 'sectionend', 'id' => 'geodir_navigation_options'),
863 845
 
864
-    array(
865
-        'name' => __('Show listing link in listing navigation', 'geodirectory'),
866
-        'desc' => '',
867
-        'tip' => '',
868
-        'id' => 'geodir_add_posttype_in_listing_nav',
869
-        'css' => 'min-width:300px;',
870
-        'std' => geodir_get_posttypes(),
871
-        'type' => 'multiselect',
872
-        'placeholder_text' => __('Select post types', 'geodirectory'),
873
-        'class' => 'chosen_select',
874
-        'options' => array_unique(geodir_post_type_setting_fun())
875
-    ),
876 846
 
877
-    array(
878
-        'name' => __('Allow post type to add from frontend', 'geodirectory'),
879
-        'desc' => '',
880
-        'tip' => '',
881
-        'id' => 'geodir_allow_posttype_frontend',
882
-        'css' => 'min-width:300px;',
883
-        'std' => geodir_get_posttypes(),
884
-        'type' => 'multiselect',
885
-        'placeholder_text' => __('Select post types', 'geodirectory'),
886
-        'class' => 'chosen_select',
887
-        'options' => array_unique(geodir_post_type_setting_fun())
888
-    ),
847
+	array('name' => __('Post Type Navigation Settings', 'geodirectory'),
848
+		'type' => 'sectionstart',
849
+		'desc' => '',
850
+		'id' => 'geodir_post_type_navigation_layout'),
851
+	array(
852
+		'name' => __('Show listing link in main navigation', 'geodirectory'),
853
+		'desc' => '',
854
+		'tip' => '',
855
+		'id' => 'geodir_add_posttype_in_main_nav',
856
+		'css' => 'min-width:300px;',
857
+		'std' => array(),
858
+		'type' => 'multiselect',
859
+		'placeholder_text' => __('Select post types', 'geodirectory'),
860
+		'class' => 'chosen_select',
861
+		'options' => array_unique(geodir_post_type_setting_fun())
862
+	),
889 863
 
890
-    array(
891
-        'name' => __('Show add listing link in main navigation', 'geodirectory'),
892
-        'desc' => '',
893
-        'tip' => '',
894
-        'id' => 'geodir_add_listing_link_main_nav',
895
-        'css' => 'min-width:300px;',
896
-        'std' => array(),
897
-        'type' => 'multiselect',
898
-        'placeholder_text' => __('Select post types', 'geodirectory'),
899
-        'class' => 'chosen_select',
900
-        'options' => array_unique(geodir_post_type_setting_fun())
901
-    ),
864
+	array(
865
+		'name' => __('Show listing link in listing navigation', 'geodirectory'),
866
+		'desc' => '',
867
+		'tip' => '',
868
+		'id' => 'geodir_add_posttype_in_listing_nav',
869
+		'css' => 'min-width:300px;',
870
+		'std' => geodir_get_posttypes(),
871
+		'type' => 'multiselect',
872
+		'placeholder_text' => __('Select post types', 'geodirectory'),
873
+		'class' => 'chosen_select',
874
+		'options' => array_unique(geodir_post_type_setting_fun())
875
+	),
902 876
 
903
-    array(
904
-        'name' => __('Show add listing link in add listing navigation', 'geodirectory'),
905
-        'desc' => '',
906
-        'tip' => '',
907
-        'id' => 'geodir_add_listing_link_add_listing_nav',
908
-        'css' => 'min-width:300px;',
909
-        'std' => geodir_get_posttypes(),
910
-        'type' => 'multiselect',
911
-        'class' => 'chosen_select',
912
-        'options' => array_unique(geodir_post_type_setting_fun())
913
-    ),
877
+	array(
878
+		'name' => __('Allow post type to add from frontend', 'geodirectory'),
879
+		'desc' => '',
880
+		'tip' => '',
881
+		'id' => 'geodir_allow_posttype_frontend',
882
+		'css' => 'min-width:300px;',
883
+		'std' => geodir_get_posttypes(),
884
+		'type' => 'multiselect',
885
+		'placeholder_text' => __('Select post types', 'geodirectory'),
886
+		'class' => 'chosen_select',
887
+		'options' => array_unique(geodir_post_type_setting_fun())
888
+	),
914 889
 
915
-    array('type' => 'sectionend', 'id' => 'geodir_post_type_navigation_layout'),
890
+	array(
891
+		'name' => __('Show add listing link in main navigation', 'geodirectory'),
892
+		'desc' => '',
893
+		'tip' => '',
894
+		'id' => 'geodir_add_listing_link_main_nav',
895
+		'css' => 'min-width:300px;',
896
+		'std' => array(),
897
+		'type' => 'multiselect',
898
+		'placeholder_text' => __('Select post types', 'geodirectory'),
899
+		'class' => 'chosen_select',
900
+		'options' => array_unique(geodir_post_type_setting_fun())
901
+	),
916 902
 
903
+	array(
904
+		'name' => __('Show add listing link in add listing navigation', 'geodirectory'),
905
+		'desc' => '',
906
+		'tip' => '',
907
+		'id' => 'geodir_add_listing_link_add_listing_nav',
908
+		'css' => 'min-width:300px;',
909
+		'std' => geodir_get_posttypes(),
910
+		'type' => 'multiselect',
911
+		'class' => 'chosen_select',
912
+		'options' => array_unique(geodir_post_type_setting_fun())
913
+	),
917 914
 
918
-    array('name' => __('User Dashboard Post Type Navigation Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_user_dashboard_post_type '),
915
+	array('type' => 'sectionend', 'id' => 'geodir_post_type_navigation_layout'),
919 916
 
920 917
 
921
-    array(
922
-        'name' => __('Show add listing link in user dashboard', 'geodirectory'),
923
-        'desc' => '',
924
-        'tip' => '',
925
-        'id' => 'geodir_add_listing_link_user_dashboard',
926
-        'css' => 'min-width:300px;',
927
-        'std' => geodir_get_posttypes(),
928
-        'type' => 'multiselect',
929
-        'placeholder_text' => __('Select post types', 'geodirectory'),
930
-        'class' => 'chosen_select',
931
-        'options' => array_unique(geodir_post_type_setting_fun())
932
-    ),
918
+	array('name' => __('User Dashboard Post Type Navigation Settings', 'geodirectory'), 'type' => 'sectionstart', 'desc' => '', 'id' => 'geodir_user_dashboard_post_type '),
933 919
 
934
-    array(
935
-        'name' => __('Show favorite link in user dashboard', 'geodirectory'),
936
-        'desc' => __('Option will not appear if user does not have a favorite of that post type', 'geodirectory'),
937
-        'tip' => '',
938
-        'id' => 'geodir_favorite_link_user_dashboard',
939
-        'css' => 'min-width:300px;',
940
-        'std' => geodir_get_posttypes(),
941
-        'type' => 'multiselect',
942
-        'placeholder_text' => __('Select post types', 'geodirectory'),
943
-        'class' => 'chosen_select',
944
-        'options' => array_unique(geodir_post_type_setting_fun())
945
-    ),
946 920
 
947
-    array(
948
-        'name' => __('Show listing link in user dashboard', 'geodirectory'),
949
-        'desc' => __('Option will not appear if user does not have his/her own listing of that post type', 'geodirectory'),
950
-        'tip' => '',
951
-        'id' => 'geodir_listing_link_user_dashboard',
952
-        'css' => 'min-width:300px;',
953
-        'std' => geodir_get_posttypes(),
954
-        'type' => 'multiselect',
955
-        'placeholder_text' => __('Select post types', 'geodirectory'),
956
-        'class' => 'chosen_select',
957
-        'options' => array_unique(geodir_post_type_setting_fun())
958
-    ),
959
-
960
-    array('type' => 'sectionend', 'id' => 'geodir_user_dashboard_post_type'),
961
-    /* Post Type Navigation Settings End */
962
-
963
-    /* Script Settings Start */
964
-    array('name' => __('Scripts', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_script_settings '),
965
-
966
-    /*
921
+	array(
922
+		'name' => __('Show add listing link in user dashboard', 'geodirectory'),
923
+		'desc' => '',
924
+		'tip' => '',
925
+		'id' => 'geodir_add_listing_link_user_dashboard',
926
+		'css' => 'min-width:300px;',
927
+		'std' => geodir_get_posttypes(),
928
+		'type' => 'multiselect',
929
+		'placeholder_text' => __('Select post types', 'geodirectory'),
930
+		'class' => 'chosen_select',
931
+		'options' => array_unique(geodir_post_type_setting_fun())
932
+	),
933
+
934
+	array(
935
+		'name' => __('Show favorite link in user dashboard', 'geodirectory'),
936
+		'desc' => __('Option will not appear if user does not have a favorite of that post type', 'geodirectory'),
937
+		'tip' => '',
938
+		'id' => 'geodir_favorite_link_user_dashboard',
939
+		'css' => 'min-width:300px;',
940
+		'std' => geodir_get_posttypes(),
941
+		'type' => 'multiselect',
942
+		'placeholder_text' => __('Select post types', 'geodirectory'),
943
+		'class' => 'chosen_select',
944
+		'options' => array_unique(geodir_post_type_setting_fun())
945
+	),
946
+
947
+	array(
948
+		'name' => __('Show listing link in user dashboard', 'geodirectory'),
949
+		'desc' => __('Option will not appear if user does not have his/her own listing of that post type', 'geodirectory'),
950
+		'tip' => '',
951
+		'id' => 'geodir_listing_link_user_dashboard',
952
+		'css' => 'min-width:300px;',
953
+		'std' => geodir_get_posttypes(),
954
+		'type' => 'multiselect',
955
+		'placeholder_text' => __('Select post types', 'geodirectory'),
956
+		'class' => 'chosen_select',
957
+		'options' => array_unique(geodir_post_type_setting_fun())
958
+	),
959
+
960
+	array('type' => 'sectionend', 'id' => 'geodir_user_dashboard_post_type'),
961
+	/* Post Type Navigation Settings End */
962
+
963
+	/* Script Settings Start */
964
+	array('name' => __('Scripts', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_script_settings '),
965
+
966
+	/*
967 967
     array( 	'name' => __( 'Add/Remove Scripts', 'geodirectory' ),
968 968
                 'type' => 'sectionstart',
969 969
                 'desc' => '',
@@ -989,190 +989,190 @@  discard block
 block discarded – undo
989 989
 
990 990
     */
991 991
 
992
-    array('name' => __('GD Lazy Load Images', 'geodirectory'),
993
-        'type' => 'sectionstart',
994
-        'desc' => '',
995
-        'id' => 'geodir_gdll_settings'),
992
+	array('name' => __('GD Lazy Load Images', 'geodirectory'),
993
+		'type' => 'sectionstart',
994
+		'desc' => '',
995
+		'id' => 'geodir_gdll_settings'),
996 996
 
997
-    array(
998
-        'name' => __('Enable lazy load images?', 'geodirectory'),
999
-        'desc' => __('GD images will be loaded only when visible on the page', 'geodirectory'),
1000
-        'id' => 'geodir_lazy_load',
1001
-        'type' => 'checkbox',
1002
-        'std' => '1' // Default value to show home top section
1003
-    ),
1004
-    array('type' => 'sectionend', 'id' => 'geodir_gdll_settings'),
997
+	array(
998
+		'name' => __('Enable lazy load images?', 'geodirectory'),
999
+		'desc' => __('GD images will be loaded only when visible on the page', 'geodirectory'),
1000
+		'id' => 'geodir_lazy_load',
1001
+		'type' => 'checkbox',
1002
+		'std' => '1' // Default value to show home top section
1003
+	),
1004
+	array('type' => 'sectionend', 'id' => 'geodir_gdll_settings'),
1005 1005
     
1006 1006
 
1007
-    array('name' => __('Script Settings', 'geodirectory'),
1008
-        'type' => 'sectionstart',
1009
-        'desc' => '',
1010
-        'id' => 'geodir_script_settings'),
1007
+	array('name' => __('Script Settings', 'geodirectory'),
1008
+		'type' => 'sectionstart',
1009
+		'desc' => '',
1010
+		'id' => 'geodir_script_settings'),
1011 1011
 
1012
-    array(
1013
-        'name' => __('Custom style css code', 'geodirectory'),
1014
-        'desc' => '',
1015
-        'id' => 'geodir_coustem_css',
1016
-        'type' => 'textarea',
1017
-        'css' => 'min-width:300px;',
1018
-        'std' => '' // Default value for the page title - changed in settings
1019
-    ),
1012
+	array(
1013
+		'name' => __('Custom style css code', 'geodirectory'),
1014
+		'desc' => '',
1015
+		'id' => 'geodir_coustem_css',
1016
+		'type' => 'textarea',
1017
+		'css' => 'min-width:300px;',
1018
+		'std' => '' // Default value for the page title - changed in settings
1019
+	),
1020 1020
 
1021
-    array(
1022
-        'name' => __('Header script code', 'geodirectory'),
1023
-        'desc' => '',
1024
-        'id' => 'geodir_header_scripts',
1025
-        'type' => 'textarea',
1026
-        'css' => 'min-width:300px;',
1027
-        'std' => '' // Default value for the page title - changed in settings
1028
-    ),
1021
+	array(
1022
+		'name' => __('Header script code', 'geodirectory'),
1023
+		'desc' => '',
1024
+		'id' => 'geodir_header_scripts',
1025
+		'type' => 'textarea',
1026
+		'css' => 'min-width:300px;',
1027
+		'std' => '' // Default value for the page title - changed in settings
1028
+	),
1029 1029
 
1030
-    array(
1031
-        'name' => __('Footer script code', 'geodirectory'),
1032
-        'desc' => '',
1033
-        'id' => 'geodir_footer_scripts',
1034
-        'type' => 'textarea',
1035
-        'css' => 'min-width:300px;',
1036
-        'std' => '' // Default value for the page title - changed in settings
1037
-    ),
1030
+	array(
1031
+		'name' => __('Footer script code', 'geodirectory'),
1032
+		'desc' => '',
1033
+		'id' => 'geodir_footer_scripts',
1034
+		'type' => 'textarea',
1035
+		'css' => 'min-width:300px;',
1036
+		'std' => '' // Default value for the page title - changed in settings
1037
+	),
1038 1038
 
1039
-    array('type' => 'sectionend', 'id' => 'geodir_script_settings'),
1040
-    /* Script Settings End */
1039
+	array('type' => 'sectionend', 'id' => 'geodir_script_settings'),
1040
+	/* Script Settings End */
1041 1041
 
1042
-    /* Map Settings Start */
1043
-    array('name' => __('Map', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_map_settings '),
1042
+	/* Map Settings Start */
1043
+	array('name' => __('Map', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'geodir_map_settings '),
1044 1044
 
1045 1045
 
1046
-    // Google API key
1047
-    array(
1048
-        'name' => __('Google Maps API KEY', 'geodirectory'),
1049
-        'type' => 'sectionstart',
1050
-        'desc' => '',
1051
-        'id' => 'geodir_google_api_key'
1052
-    ),
1053
-    array(
1054
-        'name' => __('Google Maps API KEY', 'geodirectory'),
1055
-        'desc' => sprintf(
1056
-            __('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'),
1057
-            'https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend,street_view_image_backend,maps_embed_backend,places_backend,geocoding_backend,directions_backend,distance_matrix_backend,geolocation,elevation_backend,timezone_backend,maps_backend&keyType=CLIENT_SIDE&reusekey=true','https://wpgeodirectory.com/docs/add-google-api-key/' ),
1058
-        'tip' => '',
1059
-        'id' => 'geodir_google_api_key',
1060
-        'css' => 'min-width:300px;',
1061
-        'std' => '',
1062
-        'type' => 'map-key',
1063
-    ),
1064
-    array(
1065
-        'type' => 'sectionend',
1066
-        'id' => 'geodir_google_api_key'
1067
-    ),
1046
+	// Google API key
1047
+	array(
1048
+		'name' => __('Google Maps API KEY', 'geodirectory'),
1049
+		'type' => 'sectionstart',
1050
+		'desc' => '',
1051
+		'id' => 'geodir_google_api_key'
1052
+	),
1053
+	array(
1054
+		'name' => __('Google Maps API KEY', 'geodirectory'),
1055
+		'desc' => sprintf(
1056
+			__('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'),
1057
+			'https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend,street_view_image_backend,maps_embed_backend,places_backend,geocoding_backend,directions_backend,distance_matrix_backend,geolocation,elevation_backend,timezone_backend,maps_backend&keyType=CLIENT_SIDE&reusekey=true','https://wpgeodirectory.com/docs/add-google-api-key/' ),
1058
+		'tip' => '',
1059
+		'id' => 'geodir_google_api_key',
1060
+		'css' => 'min-width:300px;',
1061
+		'std' => '',
1062
+		'type' => 'map-key',
1063
+	),
1064
+	array(
1065
+		'type' => 'sectionend',
1066
+		'id' => 'geodir_google_api_key'
1067
+	),
1068 1068
 
1069
-    /* Untick the category by default on home map */
1070
-    array(
1071
-        'name' => __('Home Map Settings', 'geodirectory'),
1072
-        'type' => 'sectionstart',
1073
-        'desc' => '',
1074
-        'id' => 'geodir_home_map_section'
1075
-    ),
1076
-    array(
1077
-        'name' => __('Select category to untick by default on map', 'geodirectory'),
1078
-        'desc' => __('Select category to untick by default on the home map.', 'geodirectory'),
1079
-        'tip' => '',
1080
-        'id' => 'geodir_home_map_untick',
1081
-        'css' => 'min-width:300px;',
1082
-        'std' => '',
1083
-        'type' => 'multiselect',
1084
-        'placeholder_text' => __('Select category', 'geodirectory'),
1085
-        'class' => 'chosen_select',
1086
-        'options' => geodir_home_map_cats_key_value_array()
1087
-    ),
1088
-    array(
1089
-        'type' => 'sectionend',
1090
-        'id' => 'geodir_home_map_section'
1091
-    ),
1069
+	/* Untick the category by default on home map */
1070
+	array(
1071
+		'name' => __('Home Map Settings', 'geodirectory'),
1072
+		'type' => 'sectionstart',
1073
+		'desc' => '',
1074
+		'id' => 'geodir_home_map_section'
1075
+	),
1076
+	array(
1077
+		'name' => __('Select category to untick by default on map', 'geodirectory'),
1078
+		'desc' => __('Select category to untick by default on the home map.', 'geodirectory'),
1079
+		'tip' => '',
1080
+		'id' => 'geodir_home_map_untick',
1081
+		'css' => 'min-width:300px;',
1082
+		'std' => '',
1083
+		'type' => 'multiselect',
1084
+		'placeholder_text' => __('Select category', 'geodirectory'),
1085
+		'class' => 'chosen_select',
1086
+		'options' => geodir_home_map_cats_key_value_array()
1087
+	),
1088
+	array(
1089
+		'type' => 'sectionend',
1090
+		'id' => 'geodir_home_map_section'
1091
+	),
1092 1092
 
1093
-    array(
1094
-        'name' => __('Add Listing Map Settings', 'geodirectory'),
1095
-        'type' => 'sectionstart',
1096
-        'desc' => '',
1097
-        'id' => 'geodir_add_listing_map_section'
1098
-    ),
1099
-    array(
1100
-        'name' => __('Disable mouse scroll on details page map tab', 'geodirectory'),
1101
-        'desc' => __('Stops the mouse scroll zooming the map (home and listings settings set from widget)', 'geodirectory'),
1102
-        'id' => 'geodir_add_listing_mouse_scroll',
1103
-        'type' => 'checkbox',
1104
-        'std' => '0' // Default value to show home top section
1105
-    ),
1106
-    array(
1107
-        'type' => 'sectionend',
1108
-        'id' => 'geodir_add_listing_map_section'
1109
-    ),
1093
+	array(
1094
+		'name' => __('Add Listing Map Settings', 'geodirectory'),
1095
+		'type' => 'sectionstart',
1096
+		'desc' => '',
1097
+		'id' => 'geodir_add_listing_map_section'
1098
+	),
1099
+	array(
1100
+		'name' => __('Disable mouse scroll on details page map tab', 'geodirectory'),
1101
+		'desc' => __('Stops the mouse scroll zooming the map (home and listings settings set from widget)', 'geodirectory'),
1102
+		'id' => 'geodir_add_listing_mouse_scroll',
1103
+		'type' => 'checkbox',
1104
+		'std' => '0' // Default value to show home top section
1105
+	),
1106
+	array(
1107
+		'type' => 'sectionend',
1108
+		'id' => 'geodir_add_listing_map_section'
1109
+	),
1110 1110
 
1111 1111
 
1112
-    array('name' => __('Default map settings', 'geodirectory'),
1113
-        'type' => 'sectionstart',
1114
-        'desc' => '',
1115
-        'id' => 'geodir_map_default_settings'),
1112
+	array('name' => __('Default map settings', 'geodirectory'),
1113
+		'type' => 'sectionstart',
1114
+		'desc' => '',
1115
+		'id' => 'geodir_map_default_settings'),
1116 1116
 
1117
-    array(
1118
-        'name' => '',
1119
-        'desc' => '',
1120
-        'id' => 'map_default_settings',
1121
-        'type' => 'map_default_settings',
1122
-        'css' => 'min-width:300px;',
1123
-        'std' => '' // Default value for the page title - changed in settings
1124
-    ),
1117
+	array(
1118
+		'name' => '',
1119
+		'desc' => '',
1120
+		'id' => 'map_default_settings',
1121
+		'type' => 'map_default_settings',
1122
+		'css' => 'min-width:300px;',
1123
+		'std' => '' // Default value for the page title - changed in settings
1124
+	),
1125 1125
 
1126
-    array(
1127
-        'name' => __('Upload map default marker icon', 'geodirectory'),
1128
-        'desc' => '',
1129
-        'id' => 'geodir_default_marker_icon',
1130
-        'type' => 'file',
1131
-        'std' => '0',
1132
-        'value' => geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png'// Default value to show home top section
1133
-    ),
1134
-    // add option that allows enable/disable map dragging to phone devices
1135
-    array(
1136
-        'name' => __('Show button control on map to enable/disable dragging', 'geodirectory'),
1137
-        'desc' => __('If checked, it displays button control to enable/disable dragging on google maps for phone devices', 'geodirectory'),
1138
-        'id' => 'geodir_map_onoff_dragging',
1139
-        'type' => 'checkbox',
1140
-        'std' => '0' // Default value to show home top section
1141
-    ),
1142
-    array(
1143
-        'name' => __('Select Maps API', 'geodirectory'),
1144
-        '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'),
1145
-        'tip' => '',
1146
-        'id' => 'geodir_load_map',
1147
-        'css' => 'min-width:300px;',
1148
-        'std' => 'auto',
1149
-        'type' => 'select',
1150
-        'placeholder_text' => __('Select Map', 'geodirectory'),
1151
-        'options' => array(
1152
-                        'auto' => __('Load Automatic', 'geodirectory'),
1153
-                        'google' => __('Load Google Maps API', 'geodirectory'),
1154
-                        'osm' => __('Load OpenStreetMap API', 'geodirectory'),
1155
-                        'none' => __('Disable Maps', 'geodirectory')
1156
-                    )
1157
-    ),
1158
-
1159
-    array('type' => 'sectionend', 'id' => 'geodir_map_default_settings'),
1160
-
1161
-    array('name' => __('Show / hide post type and category on map', 'geodirectory'),
1162
-        'type' => 'sectionstart',
1163
-        'desc' => '',
1164
-        'id' => 'geodir_map_settings'),
1126
+	array(
1127
+		'name' => __('Upload map default marker icon', 'geodirectory'),
1128
+		'desc' => '',
1129
+		'id' => 'geodir_default_marker_icon',
1130
+		'type' => 'file',
1131
+		'std' => '0',
1132
+		'value' => geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png'// Default value to show home top section
1133
+	),
1134
+	// add option that allows enable/disable map dragging to phone devices
1135
+	array(
1136
+		'name' => __('Show button control on map to enable/disable dragging', 'geodirectory'),
1137
+		'desc' => __('If checked, it displays button control to enable/disable dragging on google maps for phone devices', 'geodirectory'),
1138
+		'id' => 'geodir_map_onoff_dragging',
1139
+		'type' => 'checkbox',
1140
+		'std' => '0' // Default value to show home top section
1141
+	),
1142
+	array(
1143
+		'name' => __('Select Maps API', 'geodirectory'),
1144
+		'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'),
1145
+		'tip' => '',
1146
+		'id' => 'geodir_load_map',
1147
+		'css' => 'min-width:300px;',
1148
+		'std' => 'auto',
1149
+		'type' => 'select',
1150
+		'placeholder_text' => __('Select Map', 'geodirectory'),
1151
+		'options' => array(
1152
+						'auto' => __('Load Automatic', 'geodirectory'),
1153
+						'google' => __('Load Google Maps API', 'geodirectory'),
1154
+						'osm' => __('Load OpenStreetMap API', 'geodirectory'),
1155
+						'none' => __('Disable Maps', 'geodirectory')
1156
+					)
1157
+	),
1165 1158
 
1166
-    array(
1167
-        'name' => __('Select Map Category', 'geodirectory'),
1168
-        'desc' => '',
1169
-        'id' => 'geodir_map_settings',
1170
-        'type' => 'map',
1171
-        'css' => 'min-width:300px;',
1172
-        'std' => '' // Default value for the page title - changed in settings
1173
-    ),
1174
-
1175
-    array('type' => 'sectionend', 'id' => 'geodir_map_settings'),
1176
-    /* Map Settings End */
1159
+	array('type' => 'sectionend', 'id' => 'geodir_map_default_settings'),
1160
+
1161
+	array('name' => __('Show / hide post type and category on map', 'geodirectory'),
1162
+		'type' => 'sectionstart',
1163
+		'desc' => '',
1164
+		'id' => 'geodir_map_settings'),
1165
+
1166
+	array(
1167
+		'name' => __('Select Map Category', 'geodirectory'),
1168
+		'desc' => '',
1169
+		'id' => 'geodir_map_settings',
1170
+		'type' => 'map',
1171
+		'css' => 'min-width:300px;',
1172
+		'std' => '' // Default value for the page title - changed in settings
1173
+	),
1174
+
1175
+	array('type' => 'sectionend', 'id' => 'geodir_map_settings'),
1176
+	/* Map Settings End */
1177 1177
 
1178 1178
 )); // End Design settings
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     ),
143 143
     array(
144 144
         'name' => __('Resize image large size', 'geodirectory'),
145
-        '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')),
145
+        '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')),
146 146
         'id' => 'geodir_use_wp_media_large_size',
147 147
         'type' => 'checkbox',
148 148
         'std' => '0'
@@ -584,11 +584,11 @@  discard block
 block discarded – undo
584 584
         'id' => 'geodir_default_rating_star_icon',
585 585
         'type' => 'file',
586 586
         'std' => '0',
587
-        'value' => geodir_plugin_url() . '/geodirectory-assets/images/stars.png'// Default value to show home top section
587
+        'value' => geodir_plugin_url().'/geodirectory-assets/images/stars.png'// Default value to show home top section
588 588
     ),
589 589
 	array(
590 590
 		'name' => __('Enable Font Awesome', 'geodirectory'),
591
-		'desc' => __('When enabled all rating images will be using font awesome rating icons as images.', 'geodirectory' ),
591
+		'desc' => __('When enabled all rating images will be using font awesome rating icons as images.', 'geodirectory'),
592 592
 		'id' => 'geodir_reviewrating_enable_font_awesome',
593 593
 		'type' => 'checkbox',
594 594
 		'std' => '0'
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
         'name' => __('Google Maps API KEY', 'geodirectory'),
1055 1055
         'desc' => sprintf(
1056 1056
             __('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'),
1057
-            'https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend,street_view_image_backend,maps_embed_backend,places_backend,geocoding_backend,directions_backend,distance_matrix_backend,geolocation,elevation_backend,timezone_backend,maps_backend&keyType=CLIENT_SIDE&reusekey=true','https://wpgeodirectory.com/docs/add-google-api-key/' ),
1057
+            'https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend,street_view_image_backend,maps_embed_backend,places_backend,geocoding_backend,directions_backend,distance_matrix_backend,geolocation,elevation_backend,timezone_backend,maps_backend&keyType=CLIENT_SIDE&reusekey=true', 'https://wpgeodirectory.com/docs/add-google-api-key/' ),
1058 1058
         'tip' => '',
1059 1059
         'id' => 'geodir_google_api_key',
1060 1060
         'css' => 'min-width:300px;',
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
         'id' => 'geodir_default_marker_icon',
1130 1130
         'type' => 'file',
1131 1131
         'std' => '0',
1132
-        'value' => geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png'// Default value to show home top section
1132
+        'value' => geodir_plugin_url().'/geodirectory-functions/map-functions/icons/pin.png'// Default value to show home top section
1133 1133
     ),
1134 1134
     // add option that allows enable/disable map dragging to phone devices
1135 1135
     array(
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/general_settings_array.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 
123 123
     array('type' => 'sectionend', 'id' => 'general_options'),
124 124
 
125
-));/* General Options End*/
125
+)); /* General Options End*/
126 126
 
127 127
 /**
128 128
  * Filter GD Google Analytic Settings array.
Please login to merge, or discard this patch.
Indentation   +268 added lines, -268 removed lines patch added patch discarded remove patch
@@ -16,87 +16,87 @@  discard block
 block discarded – undo
16 16
  */
17 17
 $general_options = apply_filters('geodir_general_options', array(
18 18
 
19
-    array('name' => __('General', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'general_options'),
20
-
21
-    array('name' => __('General Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'general_options'),
22
-
23
-    array(
24
-        'name' => __('Sender name', 'geodirectory'),
25
-        'desc' => __('(Name that will be shown as email sender when users receive emails from this site)', 'geodirectory'),
26
-        'id' => 'site_email_name',
27
-        'type' => 'text',
28
-        'css' => 'min-width:300px;',
29
-        'std' => get_bloginfo('name') // Default value for the page title - changed in settings
30
-    ),
31
-
32
-    array(
33
-        'name' => __('Email address', 'geodirectory'),
34
-        'desc' => __('(Emails to users will be sent via this mail ID)', 'geodirectory'),
35
-        'id' => 'site_email',
36
-        'type' => 'text',
37
-        'css' => 'min-width:300px;',
38
-        'std' => get_bloginfo('admin_email') // Default value for the page title - changed in settings
39
-    ),
40
-    array(
41
-        'name' => __('Allow user to see wp-admin area', 'geodirectory'),
42
-        'desc' => __('Yes', 'geodirectory'),
43
-        'id' => 'geodir_allow_wpadmin',
44
-        'std' => '1',
45
-        'type' => 'radio',
46
-        'value' => '1',
47
-        'radiogroup' => 'start'
48
-    ),
49
-    array(
50
-        'name' => __('Allow user to see wp-admin area', 'geodirectory'),
51
-        'desc' => __('No', 'geodirectory'),
52
-        'id' => 'geodir_allow_wpadmin',
53
-        'std' => '0',
54
-        'type' => 'radio',
55
-        'value' => '0',
56
-        'radiogroup' => 'end'
57
-    ),
58
-
59
-    array(
60
-        'name' => __('Allow user to choose own password', 'geodirectory'),
61
-        'desc' => __('Yes', 'geodirectory'),
62
-        'id' => 'geodir_allow_cpass',
63
-        'std' => '1',
64
-        'type' => 'radio',
65
-        'value' => '1',
66
-        'radiogroup' => 'start'
67
-    ),
68
-    array(
69
-        'name' => __('Allow user to choose own password', 'geodirectory'),
70
-        'desc' => __('No', 'geodirectory'),
71
-        'id' => 'geodir_allow_cpass',
72
-        'std' => '0',
73
-        'type' => 'radio',
74
-        'value' => '0',
75
-        'radiogroup' => 'end'
76
-    ),
77
-    array(
78
-        'name' => __('Disable rating on comments', 'geodirectory'),
79
-        'desc' => __('Disable rating without disabling comments on listings', 'geodirectory'),
80
-        'id' => 'geodir_disable_rating',
81
-        'type' => 'checkbox',
82
-        'std' => '0'
83
-    ),
84
-    array(
85
-        'name' => __('User deleted posts go to trash', 'geodirectory'),
86
-        'desc' => __('If checked a user deleted post will go to trash, otherwise it will be permanently deleted', 'geodirectory'),
87
-        'id' => 'geodir_disable_perm_delete',
88
-        'type' => 'checkbox',
89
-        'std' => '1'
90
-    ),
91
-    array(
92
-        'name' => __('Max upload file size(in mb)', 'geodirectory'),
93
-        'desc' => __('(Maximum upload file size in MB, 1 MB = 1024 KB. Must be greater then 0(ZERO), for ex: 2. This setting will overwrite the max upload file size limit in image/file upload & import listings for entire GeoDirectory core + GeoDirectory plugins.)', 'geodirectory'),
94
-        'id' => 'geodir_upload_max_filesize',
95
-        'type' => 'text',
96
-        'css' => 'min-width:300px;',
97
-        'std' => '2'
98
-    ),
99
-    array('type' => 'sectionend', 'id' => 'general_options'),
19
+	array('name' => __('General', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'general_options'),
20
+
21
+	array('name' => __('General Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'general_options'),
22
+
23
+	array(
24
+		'name' => __('Sender name', 'geodirectory'),
25
+		'desc' => __('(Name that will be shown as email sender when users receive emails from this site)', 'geodirectory'),
26
+		'id' => 'site_email_name',
27
+		'type' => 'text',
28
+		'css' => 'min-width:300px;',
29
+		'std' => get_bloginfo('name') // Default value for the page title - changed in settings
30
+	),
31
+
32
+	array(
33
+		'name' => __('Email address', 'geodirectory'),
34
+		'desc' => __('(Emails to users will be sent via this mail ID)', 'geodirectory'),
35
+		'id' => 'site_email',
36
+		'type' => 'text',
37
+		'css' => 'min-width:300px;',
38
+		'std' => get_bloginfo('admin_email') // Default value for the page title - changed in settings
39
+	),
40
+	array(
41
+		'name' => __('Allow user to see wp-admin area', 'geodirectory'),
42
+		'desc' => __('Yes', 'geodirectory'),
43
+		'id' => 'geodir_allow_wpadmin',
44
+		'std' => '1',
45
+		'type' => 'radio',
46
+		'value' => '1',
47
+		'radiogroup' => 'start'
48
+	),
49
+	array(
50
+		'name' => __('Allow user to see wp-admin area', 'geodirectory'),
51
+		'desc' => __('No', 'geodirectory'),
52
+		'id' => 'geodir_allow_wpadmin',
53
+		'std' => '0',
54
+		'type' => 'radio',
55
+		'value' => '0',
56
+		'radiogroup' => 'end'
57
+	),
58
+
59
+	array(
60
+		'name' => __('Allow user to choose own password', 'geodirectory'),
61
+		'desc' => __('Yes', 'geodirectory'),
62
+		'id' => 'geodir_allow_cpass',
63
+		'std' => '1',
64
+		'type' => 'radio',
65
+		'value' => '1',
66
+		'radiogroup' => 'start'
67
+	),
68
+	array(
69
+		'name' => __('Allow user to choose own password', 'geodirectory'),
70
+		'desc' => __('No', 'geodirectory'),
71
+		'id' => 'geodir_allow_cpass',
72
+		'std' => '0',
73
+		'type' => 'radio',
74
+		'value' => '0',
75
+		'radiogroup' => 'end'
76
+	),
77
+	array(
78
+		'name' => __('Disable rating on comments', 'geodirectory'),
79
+		'desc' => __('Disable rating without disabling comments on listings', 'geodirectory'),
80
+		'id' => 'geodir_disable_rating',
81
+		'type' => 'checkbox',
82
+		'std' => '0'
83
+	),
84
+	array(
85
+		'name' => __('User deleted posts go to trash', 'geodirectory'),
86
+		'desc' => __('If checked a user deleted post will go to trash, otherwise it will be permanently deleted', 'geodirectory'),
87
+		'id' => 'geodir_disable_perm_delete',
88
+		'type' => 'checkbox',
89
+		'std' => '1'
90
+	),
91
+	array(
92
+		'name' => __('Max upload file size(in mb)', 'geodirectory'),
93
+		'desc' => __('(Maximum upload file size in MB, 1 MB = 1024 KB. Must be greater then 0(ZERO), for ex: 2. This setting will overwrite the max upload file size limit in image/file upload & import listings for entire GeoDirectory core + GeoDirectory plugins.)', 'geodirectory'),
94
+		'id' => 'geodir_upload_max_filesize',
95
+		'type' => 'text',
96
+		'css' => 'min-width:300px;',
97
+		'std' => '2'
98
+	),
99
+	array('type' => 'sectionend', 'id' => 'general_options'),
100 100
 
101 101
 ));/* General Options End*/
102 102
 
@@ -108,104 +108,104 @@  discard block
 block discarded – undo
108 108
  */
109 109
 $google_analytic_settings = apply_filters('geodir_google_analytic_settings', array(
110 110
 
111
-    array('name' => __('Google Analytics', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'google_analytic_settings'),
112
-
113
-    array('name' => __('Google Analytic Settings', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'google_analytic_settings'),
114
-
115
-
116
-
117
-    array(
118
-        'name' => __('Show business owner google analytics stats?', 'geodirectory'),
119
-        'desc' => __('Yes', 'geodirectory'),
120
-        'id' => 'geodir_ga_stats',
121
-        'std' => '0',
122
-        'type' => 'radio',
123
-        'value' => '1',
124
-        'radiogroup' => 'start'
125
-    ),
126
-    array(
127
-        'name' => __('Show business owner Google Analytics stats?', 'geodirectory'),
128
-        'desc' => __('No', 'geodirectory'),
129
-        'id' => 'geodir_ga_stats',
130
-        'std' => '1',
131
-        'type' => 'radio',
132
-        'value' => '0',
133
-        'radiogroup' => 'end'
134
-    ),
135
-
136
-    array(
137
-        'name' => __('Google analytics access', 'geodirectory'),
138
-        'desc' => '',
139
-        'id' => 'geodir_ga_token',
140
-        'type' => 'google_analytics',
141
-        'css' => 'min-width:300px;',
142
-        'std' => '' // Default value for the page title - changed in settings
143
-    ),
144
-
145
-    array(
146
-        'name' => __('Google analytics Auth Code', 'geodirectory'),
147
-        'desc' => __('You must save this setting before accounts will show.', 'geodirectory'),
148
-        'id' => 'geodir_ga_auth_code',
149
-        'type' => 'text',
150
-        'css' => 'min-width:300px;',
151
-        'std' => '' // Default value for the page title - changed in settings
152
-    ),
153
-
154
-    array(
155
-        'name' => __('Analytics Account', 'geodirectory'),
156
-        'desc' => __('Select the account that you setup for this site.', 'geodirectory'),
157
-        'id' => 'geodir_ga_account_id',
158
-        'css' => 'min-width:300px;',
159
-        'std' => 'gridview_onehalf',
160
-        'type' => 'select',
161
-        'class' => 'chosen_select',
162
-        'options' => geodir_gd_accounts()
163
-    ),
164
-
165
-
166
-    array(
167
-        'name' => __('Add Google analytics tracking code to site?', 'geodirectory'),
168
-        'desc' => __('Yes <small>(this will automatically add the correct tracking code to your site)</small>', 'geodirectory'),
169
-        'id' => 'geodir_ga_add_tracking_code',
170
-        'std' => '0',
171
-        'type' => 'radio',
172
-        'value' => '1',
173
-        'radiogroup' => 'start'
174
-    ),
175
-    array(
176
-        'name' => __('Add Google analytics tracking code to site?', 'geodirectory'),
177
-        'desc' => __('No <small>(if you already have tracking code added you should not add it again)</small>', 'geodirectory'),
178
-        'id' => 'geodir_ga_add_tracking_code',
179
-        'std' => '1',
180
-        'type' => 'radio',
181
-        'value' => '0',
182
-        'radiogroup' => 'end'
183
-    ),
184
-
185
-    array(
186
-        'name' => __('Anonymize user IP?', 'geodirectory'),
187
-        'desc' => __('In most cases this is not required, this is to comply with certain country laws such as Germany.', 'geodirectory'),
188
-        'id' => 'geodir_ga_anonymize_ip',
189
-        'type' => 'checkbox',
190
-        'std' => '0'
191
-    ),
192
-
193
-    array(
194
-        'name' => __('Auto refresh active users?', 'geodirectory'),
195
-        'desc' => __('If ticked it uses the auto refresh time below, if not it never refreshes unless the refresh button is clicked.', 'geodirectory'),
196
-        'id' => 'geodir_ga_auto_refresh',
197
-        'type' => 'checkbox',
198
-        'std' => '0'
199
-    ),
200
-    array(
201
-        'name' => __('Time interval for auto refresh active users', 'geodirectory'),
202
-        'desc' => __('Time interval in seconds to auto refresh active users. The active users will be auto refreshed after this time interval. Leave blank or use 0(zero) to disable auto refresh. Default: 5', 'geodirectory'),
203
-        'id' => 'geodir_ga_refresh_time',
204
-        'type' => 'text',
205
-        'std' => '5'
206
-    ),
207
-
208
-    array('type' => 'sectionend', 'id' => 'google_analytic_settings'),
111
+	array('name' => __('Google Analytics', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'google_analytic_settings'),
112
+
113
+	array('name' => __('Google Analytic Settings', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'google_analytic_settings'),
114
+
115
+
116
+
117
+	array(
118
+		'name' => __('Show business owner google analytics stats?', 'geodirectory'),
119
+		'desc' => __('Yes', 'geodirectory'),
120
+		'id' => 'geodir_ga_stats',
121
+		'std' => '0',
122
+		'type' => 'radio',
123
+		'value' => '1',
124
+		'radiogroup' => 'start'
125
+	),
126
+	array(
127
+		'name' => __('Show business owner Google Analytics stats?', 'geodirectory'),
128
+		'desc' => __('No', 'geodirectory'),
129
+		'id' => 'geodir_ga_stats',
130
+		'std' => '1',
131
+		'type' => 'radio',
132
+		'value' => '0',
133
+		'radiogroup' => 'end'
134
+	),
135
+
136
+	array(
137
+		'name' => __('Google analytics access', 'geodirectory'),
138
+		'desc' => '',
139
+		'id' => 'geodir_ga_token',
140
+		'type' => 'google_analytics',
141
+		'css' => 'min-width:300px;',
142
+		'std' => '' // Default value for the page title - changed in settings
143
+	),
144
+
145
+	array(
146
+		'name' => __('Google analytics Auth Code', 'geodirectory'),
147
+		'desc' => __('You must save this setting before accounts will show.', 'geodirectory'),
148
+		'id' => 'geodir_ga_auth_code',
149
+		'type' => 'text',
150
+		'css' => 'min-width:300px;',
151
+		'std' => '' // Default value for the page title - changed in settings
152
+	),
153
+
154
+	array(
155
+		'name' => __('Analytics Account', 'geodirectory'),
156
+		'desc' => __('Select the account that you setup for this site.', 'geodirectory'),
157
+		'id' => 'geodir_ga_account_id',
158
+		'css' => 'min-width:300px;',
159
+		'std' => 'gridview_onehalf',
160
+		'type' => 'select',
161
+		'class' => 'chosen_select',
162
+		'options' => geodir_gd_accounts()
163
+	),
164
+
165
+
166
+	array(
167
+		'name' => __('Add Google analytics tracking code to site?', 'geodirectory'),
168
+		'desc' => __('Yes <small>(this will automatically add the correct tracking code to your site)</small>', 'geodirectory'),
169
+		'id' => 'geodir_ga_add_tracking_code',
170
+		'std' => '0',
171
+		'type' => 'radio',
172
+		'value' => '1',
173
+		'radiogroup' => 'start'
174
+	),
175
+	array(
176
+		'name' => __('Add Google analytics tracking code to site?', 'geodirectory'),
177
+		'desc' => __('No <small>(if you already have tracking code added you should not add it again)</small>', 'geodirectory'),
178
+		'id' => 'geodir_ga_add_tracking_code',
179
+		'std' => '1',
180
+		'type' => 'radio',
181
+		'value' => '0',
182
+		'radiogroup' => 'end'
183
+	),
184
+
185
+	array(
186
+		'name' => __('Anonymize user IP?', 'geodirectory'),
187
+		'desc' => __('In most cases this is not required, this is to comply with certain country laws such as Germany.', 'geodirectory'),
188
+		'id' => 'geodir_ga_anonymize_ip',
189
+		'type' => 'checkbox',
190
+		'std' => '0'
191
+	),
192
+
193
+	array(
194
+		'name' => __('Auto refresh active users?', 'geodirectory'),
195
+		'desc' => __('If ticked it uses the auto refresh time below, if not it never refreshes unless the refresh button is clicked.', 'geodirectory'),
196
+		'id' => 'geodir_ga_auto_refresh',
197
+		'type' => 'checkbox',
198
+		'std' => '0'
199
+	),
200
+	array(
201
+		'name' => __('Time interval for auto refresh active users', 'geodirectory'),
202
+		'desc' => __('Time interval in seconds to auto refresh active users. The active users will be auto refreshed after this time interval. Leave blank or use 0(zero) to disable auto refresh. Default: 5', 'geodirectory'),
203
+		'id' => 'geodir_ga_refresh_time',
204
+		'type' => 'text',
205
+		'std' => '5'
206
+	),
207
+
208
+	array('type' => 'sectionend', 'id' => 'google_analytic_settings'),
209 209
 
210 210
 )); // google_analytic_settings End
211 211
 
@@ -217,84 +217,84 @@  discard block
 block discarded – undo
217 217
  */
218 218
 $search_settings = apply_filters('geodir_search_settings', array(
219 219
 
220
-    array('name' => __('Search', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'search_settings'),
221
-
222
-    array('name' => __('Search Settings', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'search_settings'),
223
-
224
-    array(
225
-        'name' => __('Limit squared distance area to X miles (helps improve search speed)', 'geodirectory'),
226
-        'desc' => __('Enter whole number only ex. 40 (Tokyo is largest city in the world @40 sq miles) LEAVE BLANK FOR NO DISTANCE LIMIT', 'geodirectory'),
227
-        'id' => 'geodir_search_dist',
228
-        'type' => 'text',
229
-        'css' => 'min-width:300px;',
230
-        'std' => '40' // Default value for the page title - changed in settings
231
-    ),
232
-
233
-    array(
234
-        'name' => __('Show search distances in miles or km', 'geodirectory'),
235
-        'desc' => __('Miles', 'geodirectory'),
236
-        'id' => 'geodir_search_dist_1',
237
-        'std' => 'miles',
238
-        'type' => 'radio',
239
-        'value' => 'miles',
240
-        'radiogroup' => 'start'
241
-    ),
242
-    array(
243
-        'name' => __('Show search distances in miles or km', 'geodirectory'),
244
-        'desc' => __('Kilometers', 'geodirectory'),
245
-        'id' => 'geodir_search_dist_1',
246
-        'std' => 'miles',
247
-        'type' => 'radio',
248
-        'value' => 'km',
249
-        'radiogroup' => 'end'
250
-    ),
251
-
252
-    array(
253
-        'name' => __('If distance is less than 0.01 show distance in meters or feet', 'geodirectory'),
254
-        'desc' => __('Meters', 'geodirectory'),
255
-        'id' => 'geodir_search_dist_2',
256
-        'std' => 'meters',
257
-        'type' => 'radio',
258
-        'value' => 'meters',
259
-        'radiogroup' => 'start'
260
-    ),
261
-
262
-    array(
263
-        'name' => __('If distance is less than 0.01 show distance in meters or feet', 'geodirectory'),
264
-        'desc' => __('Feet', 'geodirectory'),
265
-        'id' => 'geodir_search_dist_2',
266
-        'std' => 'meters',
267
-        'type' => 'radio',
268
-        'value' => 'feet',
269
-        'radiogroup' => 'end'
270
-    ),
271
-
272
-    array(
273
-        'name' => __('Add location specific text to (Near) search for Google', 'geodirectory'),
274
-        'desc' => __('This is usefull if your directory is limted to one location such as: New York or Australia (this setting should be blank if using default country, regions etc with multilocation addon as it will automatically add them)', 'geodirectory'),
275
-        'id' => 'geodir_search_near_addition',
276
-        'type' => 'text',
277
-        'css' => 'min-width:300px;',
278
-        'std' => ''
279
-    ),
280
-    array(
281
-        'name' => __('Individual word search limit', 'geodirectory'),
282
-        'desc' => __('With this option you can limit individual words being searched for, for example searching for `Jo Brown` would return results with words like `Jones`, you can exclude these types of small character words if you wish.', 'geodirectory'),
283
-        'id' => 'geodir_search_word_limit',
284
-        'css' => 'min-width:300px;',
285
-        'std' => 'gridview_onehalf',
286
-        'type' => 'select',
287
-        'class' => 'chosen_select',
288
-        'options' => array_unique(array(
289
-            '0' => __('Disabled', 'geodirectory'),
290
-            '1' => __('1 Character words excluded', 'geodirectory'),
291
-            '2' => __('2 Character words and less excluded', 'geodirectory'),
292
-            '3' => __('3 Character words and less excluded', 'geodirectory'),
293
-        ))
294
-    ),
295
-
296
-
297
-    array('type' => 'sectionend', 'id' => 'search_settings'),
220
+	array('name' => __('Search', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'search_settings'),
221
+
222
+	array('name' => __('Search Settings', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'search_settings'),
223
+
224
+	array(
225
+		'name' => __('Limit squared distance area to X miles (helps improve search speed)', 'geodirectory'),
226
+		'desc' => __('Enter whole number only ex. 40 (Tokyo is largest city in the world @40 sq miles) LEAVE BLANK FOR NO DISTANCE LIMIT', 'geodirectory'),
227
+		'id' => 'geodir_search_dist',
228
+		'type' => 'text',
229
+		'css' => 'min-width:300px;',
230
+		'std' => '40' // Default value for the page title - changed in settings
231
+	),
232
+
233
+	array(
234
+		'name' => __('Show search distances in miles or km', 'geodirectory'),
235
+		'desc' => __('Miles', 'geodirectory'),
236
+		'id' => 'geodir_search_dist_1',
237
+		'std' => 'miles',
238
+		'type' => 'radio',
239
+		'value' => 'miles',
240
+		'radiogroup' => 'start'
241
+	),
242
+	array(
243
+		'name' => __('Show search distances in miles or km', 'geodirectory'),
244
+		'desc' => __('Kilometers', 'geodirectory'),
245
+		'id' => 'geodir_search_dist_1',
246
+		'std' => 'miles',
247
+		'type' => 'radio',
248
+		'value' => 'km',
249
+		'radiogroup' => 'end'
250
+	),
251
+
252
+	array(
253
+		'name' => __('If distance is less than 0.01 show distance in meters or feet', 'geodirectory'),
254
+		'desc' => __('Meters', 'geodirectory'),
255
+		'id' => 'geodir_search_dist_2',
256
+		'std' => 'meters',
257
+		'type' => 'radio',
258
+		'value' => 'meters',
259
+		'radiogroup' => 'start'
260
+	),
261
+
262
+	array(
263
+		'name' => __('If distance is less than 0.01 show distance in meters or feet', 'geodirectory'),
264
+		'desc' => __('Feet', 'geodirectory'),
265
+		'id' => 'geodir_search_dist_2',
266
+		'std' => 'meters',
267
+		'type' => 'radio',
268
+		'value' => 'feet',
269
+		'radiogroup' => 'end'
270
+	),
271
+
272
+	array(
273
+		'name' => __('Add location specific text to (Near) search for Google', 'geodirectory'),
274
+		'desc' => __('This is usefull if your directory is limted to one location such as: New York or Australia (this setting should be blank if using default country, regions etc with multilocation addon as it will automatically add them)', 'geodirectory'),
275
+		'id' => 'geodir_search_near_addition',
276
+		'type' => 'text',
277
+		'css' => 'min-width:300px;',
278
+		'std' => ''
279
+	),
280
+	array(
281
+		'name' => __('Individual word search limit', 'geodirectory'),
282
+		'desc' => __('With this option you can limit individual words being searched for, for example searching for `Jo Brown` would return results with words like `Jones`, you can exclude these types of small character words if you wish.', 'geodirectory'),
283
+		'id' => 'geodir_search_word_limit',
284
+		'css' => 'min-width:300px;',
285
+		'std' => 'gridview_onehalf',
286
+		'type' => 'select',
287
+		'class' => 'chosen_select',
288
+		'options' => array_unique(array(
289
+			'0' => __('Disabled', 'geodirectory'),
290
+			'1' => __('1 Character words excluded', 'geodirectory'),
291
+			'2' => __('2 Character words and less excluded', 'geodirectory'),
292
+			'3' => __('3 Character words and less excluded', 'geodirectory'),
293
+		))
294
+	),
295
+
296
+
297
+	array('type' => 'sectionend', 'id' => 'search_settings'),
298 298
 
299 299
 )); //search_settings End
300 300
 
@@ -306,17 +306,17 @@  discard block
 block discarded – undo
306 306
  */
307 307
 $dummy_data_settings = apply_filters('geodir_dummy_data_settings', array(
308 308
 
309
-    array('name' => __('Dummy Data', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'dummy_data_settings'),
310
-
311
-    array(
312
-        'name' => '',
313
-        'desc' => '',
314
-        'id' => 'geodir_dummy_data_installer',
315
-        'type' => 'dummy_installer',
316
-        'css' => 'min-width:300px;',
317
-        'std' => '40' // Default value for the page title - changed in settings
318
-    ),
319
-    array('type' => 'sectionend', 'id' => 'geodir_dummy_data_settings'),
309
+	array('name' => __('Dummy Data', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'dummy_data_settings'),
310
+
311
+	array(
312
+		'name' => '',
313
+		'desc' => '',
314
+		'id' => 'geodir_dummy_data_installer',
315
+		'type' => 'dummy_installer',
316
+		'css' => 'min-width:300px;',
317
+		'std' => '40' // Default value for the page title - changed in settings
318
+	),
319
+	array('type' => 'sectionend', 'id' => 'geodir_dummy_data_settings'),
320 320
 
321 321
 )); //dummy_data_settings End
322 322
 
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/notifications_settings_array.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         'id' => 'geodir_post_submited_success_email_subject_admin',
130 130
         'type' => 'text',
131 131
         'css' => 'min-width:300px;',
132
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
132
+        'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
133 133
     ),
134 134
     array(
135 135
         'name' => '',
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         'id' => 'geodir_post_submited_success_email_content_admin',
138 138
         'css' => 'width:500px; height: 150px;',
139 139
         'type' => 'textarea',
140
-        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
140
+        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>', 'geodirectory')
141 141
     ),
142 142
 
143 143
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         'id' => 'geodir_post_submited_success_email_subject',
155 155
         'type' => 'text',
156 156
         'css' => 'min-width:300px;',
157
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
157
+        'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
158 158
     ),
159 159
     array(
160 160
         'name' => '',
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         'id' => 'geodir_post_submited_success_email_content',
163 163
         'css' => 'width:500px; height: 150px;',
164 164
         'type' => 'textarea',
165
-        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
165
+        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>', 'geodirectory')
166 166
     ),
167 167
 
168 168
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         'id' => 'geodir_forgot_password_content',
181 181
         'css' => 'width:500px; height: 150px;',
182 182
         'type' => 'textarea',
183
-        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
183
+        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
184 184
     ),
185 185
 
186 186
     array(
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         'id' => 'geodir_registration_success_email_content',
198 198
         'css' => 'width:500px; height: 150px;',
199 199
         'type' => 'textarea',
200
-        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
200
+        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
201 201
     ),
202 202
     array(
203 203
         'name' => __('Listing published email', 'geodirectory'),
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         'id' => 'geodir_email_friend_content',
237 237
         'css' => 'width:500px; height: 150px;',
238 238
         'type' => 'textarea',
239
-        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
239
+        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>", 'geodirectory')
240 240
     ),
241 241
 
242 242
     array(
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         'id' => 'geodir_email_enquiry_content',
254 254
         'css' => 'width:500px; height: 150px;',
255 255
         'type' => 'textarea',
256
-        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
256
+        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
257 257
     ),
258 258
 
259 259
     array('type' => 'sectionend', 'id' => 'other_emails'),
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         'id' => 'geodir_post_added_success_msg_content',
270 270
         'css' => 'width:500px; height: 150px;',
271 271
         'type' => 'textarea',
272
-        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
272
+        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>', 'geodirectory')
273 273
     ),
274 274
 
275 275
 
Please login to merge, or discard this patch.
Indentation   +291 added lines, -291 removed lines patch added patch discarded remove patch
@@ -17,296 +17,296 @@
 block discarded – undo
17 17
 $geodir_settings['notifications_settings'] = apply_filters('geodir_notifications_settings', array(
18 18
 
19 19
 
20
-    array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'),
21
-
22
-
23
-    array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'),
24
-
25
-    array(
26
-        'name' => __('List of usable shortcodes', 'geodirectory'),
27
-        'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'),
28
-        'id' => 'geodir_list_of_usable_shordcodes',
29
-        'type' => 'html_content',
30
-        'css' => 'min-width:300px;',
31
-        'std' => 'All Places' // Default value for the page title - changed in settings
32
-    ),
33
-
34
-    array(
35
-        'name' => __('Use advanced editor? (slow loading)', 'geodirectory'),
36
-        'desc' => __('Yes', 'geodirectory'),
37
-        'id' => 'geodir_tiny_editor',
38
-        'std' => 'yes',
39
-        'type' => 'radio',
40
-        'value' => '1',
41
-        'radiogroup' => 'start'
42
-    ),
43
-    array(
44
-        'name' => __('Use advanced editor?(slow loading)', 'geodirectory'),
45
-        'desc' => __('No', 'geodirectory'),
46
-        'id' => 'geodir_tiny_editor',
47
-        'std' => 'yes',
48
-        'type' => 'radio',
49
-        'value' => '0',
50
-        'radiogroup' => 'end'
51
-    ),
52
-
53
-
54
-    array('type' => 'sectionend', 'id' => 'notification_options'),
55
-
56
-
57
-    array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'),
58
-
59
-    array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'),
60
-
61
-    array(
62
-        'name' => __('New user registration', 'geodirectory'),
63
-        'desc' => __('Yes', 'geodirectory'),
64
-        'id' => 'geodir_bcc_new_user',
65
-        'std' => 'yes',
66
-        'type' => 'radio',
67
-        'value' => '1',
68
-        'radiogroup' => 'start'
69
-    ),
70
-    array(
71
-        'name' => __('New user registration', 'geodirectory'),
72
-        'desc' => __('No', 'geodirectory'),
73
-        'id' => 'geodir_bcc_new_user',
74
-        'std' => 'yes',
75
-        'type' => 'radio',
76
-        'value' => '0',
77
-        'radiogroup' => 'end'
78
-    ),
79
-
80
-    array(
81
-        'name' => __('Send to friend', 'geodirectory'),
82
-        'desc' => __('Yes', 'geodirectory'),
83
-        'id' => 'geodir_bcc_friend',
84
-        'std' => 'yes',
85
-        'type' => 'radio',
86
-        'value' => '1',
87
-        'radiogroup' => 'start'
88
-    ),
89
-    array(
90
-        'name' => __('Send to friend', 'geodirectory'),
91
-        'desc' => __('No', 'geodirectory'),
92
-        'id' => 'geodir_bcc_friend',
93
-        'std' => 'yes',
94
-        'type' => 'radio',
95
-        'value' => '0',
96
-        'radiogroup' => 'end'
97
-    ),
98
-
99
-    array(
100
-        'name' => __('Send enquiry', 'geodirectory'),
101
-        'desc' => __('Yes', 'geodirectory'),
102
-        'id' => 'geodir_bcc_enquiry',
103
-        'std' => 'yes',
104
-        'type' => 'radio',
105
-        'value' => '1',
106
-        'radiogroup' => 'start'
107
-    ),
108
-    array(
109
-        'name' => __('Send enquiry', 'geodirectory'),
110
-        'desc' => __('No', 'geodirectory'),
111
-        'id' => 'geodir_bcc_enquiry',
112
-        'std' => 'yes',
113
-        'type' => 'radio',
114
-        'value' => '0',
115
-        'radiogroup' => 'end'
116
-    ),
117
-
118
-
119
-    array('type' => 'sectionend', 'id' => 'site_bcc_options'),
120
-
121
-
122
-    array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'),
123
-
124
-    array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'),
125
-
126
-    array(
127
-        'name' => __('Post submit success to admin email', 'geodirectory'),
128
-        'desc' => '',
129
-        'id' => 'geodir_post_submited_success_email_subject_admin',
130
-        'type' => 'text',
131
-        'css' => 'min-width:300px;',
132
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
133
-    ),
134
-     array(
135
-        'name' => '',
136
-        'desc' => '',
137
-        'id' => 'geodir_post_submited_success_email_content_admin',
138
-        'css' => 'width:500px; height: 150px;',
139
-        'type' => 'textarea',
140
-        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
141
-    ),
142
-    array(
143
-        'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
144
-        'desc' => __('Yes', 'geodirectory'),
145
-        'id' => 'geodir_notify_post_edited',
146
-        'std' => '0',
147
-        'type' => 'radio',
148
-        'value' => '1',
149
-        'radiogroup' => 'start'
150
-    ),
151
-    array(
152
-        'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
153
-        'desc' => __('No', 'geodirectory'),
154
-        'id' => 'geodir_notify_post_edited',
155
-        'std' => '0',
156
-        'type' => 'radio',
157
-        'value' => '0',
158
-        'radiogroup' => 'end'
159
-    ),
160
-    array(
161
-        'name' => __('Listing edited by Author', 'geodirectory'),
162
-        'desc' => '',
163
-        'id' => 'geodir_post_edited_email_subject_admin',
164
-        'type' => 'text',
165
-        'css' => 'min-width:300px;',
166
-        'std' => __('[[#site_name#]] Listing edited by Author', 'geodirectory')
167
-    ),
168
-    array(
169
-        'name' => '',
170
-        'desc' => '',
171
-        'id' => 'geodir_post_edited_email_content_admin',
172
-        'css' => 'width:500px; height: 150px;',
173
-        'type' => 'textarea',
174
-        'std' => __('<p>Dear Admin,</p><p>A listing [#listing_link#] has been edited by it\'s author [#post_author_name#].</p><br><p><b>Listing Details:</b></p><p>Listing ID: [#post_id#]</p><p>Listing URL: [#listing_link#]</p><p>Date: [#current_date#]</p><br><p>This email is just for your information.</p><p>[#site_name#]</p>', 'geodirectory')
175
-    ),
176
-
177
-
178
-    array('type' => 'sectionend', 'id' => 'admin_emails'),
179
-
180
-
181
-    array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'),
182
-
183
-    array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'),
184
-
185
-    array(
186
-        'name' => __('Post submit success to client email', 'geodirectory'),
187
-        'desc' => '',
188
-        'id' => 'geodir_post_submited_success_email_subject',
189
-        'type' => 'text',
190
-        'css' => 'min-width:300px;',
191
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
192
-    ),
193
-    array(
194
-        'name' => '',
195
-        'desc' => '',
196
-        'id' => 'geodir_post_submited_success_email_content',
197
-        'css' => 'width:500px; height: 150px;',
198
-        'type' => 'textarea',
199
-        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
200
-    ),
201
-
202
-
203
-    array(
204
-        'name' => __('User forgot password email', 'geodirectory'),
205
-        'desc' => '',
206
-        'id' => 'geodir_forgot_password_subject',
207
-        'type' => 'text',
208
-        'css' => 'min-width:300px;',
209
-        'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings
210
-    ),
211
-    array(
212
-        'name' => '',
213
-        'desc' => '',
214
-        'id' => 'geodir_forgot_password_content',
215
-        'css' => 'width:500px; height: 150px;',
216
-        'type' => 'textarea',
217
-        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
218
-    ),
219
-
220
-    array(
221
-        'name' => __('Registration success email', 'geodirectory'),
222
-        'desc' => '',
223
-        'id' => 'geodir_registration_success_email_subject',
224
-        'type' => 'text',
225
-        'css' => 'min-width:300px;',
226
-        'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings
227
-    ),
228
-    array(
229
-        'name' => '',
230
-        'desc' => '',
231
-        'id' => 'geodir_registration_success_email_content',
232
-        'css' => 'width:500px; height: 150px;',
233
-        'type' => 'textarea',
234
-        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
235
-    ),
236
-    array(
237
-        'name' => __('Listing published email', 'geodirectory'),
238
-        'desc' => '',
239
-        'id' => 'geodir_post_published_email_subject',
240
-        'type' => 'text',
241
-        'css' => 'min-width:300px;',
242
-        'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings
243
-    ),
244
-    array(
245
-        'name' => '',
246
-        'desc' => '',
247
-        'id' => 'geodir_post_published_email_content',
248
-        'css' => 'width:500px; height: 150px;',
249
-        'type' => 'textarea',
250
-        'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory')
251
-    ),
252
-
253
-    array('type' => 'sectionend', 'id' => 'client_emails'),
254
-
255
-    array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'),
256
-
257
-    array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'),
258
-
259
-    array(
260
-        'name' => __('Send to friend', 'geodirectory'),
261
-        'desc' => '',
262
-        'id' => 'geodir_email_friend_subject',
263
-        'type' => 'text',
264
-        'css' => 'min-width:300px;',
265
-        'std' => __('[#from_name#] thought you might be interested in..', 'geodirectory')
266
-    ),
267
-    array(
268
-        'name' => '',
269
-        'desc' => '',
270
-        'id' => 'geodir_email_friend_content',
271
-        'css' => 'width:500px; height: 150px;',
272
-        'type' => 'textarea',
273
-        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
274
-    ),
275
-
276
-    array(
277
-        'name' => __('Email enquiry', 'geodirectory'),
278
-        'desc' => '',
279
-        'id' => 'geodir_email_enquiry_subject',
280
-        'type' => 'text',
281
-        'css' => 'min-width:300px;',
282
-        'std' => __('Website Enquiry', 'geodirectory')
283
-    ),
284
-    array(
285
-        'name' => '',
286
-        'desc' => '',
287
-        'id' => 'geodir_email_enquiry_content',
288
-        'css' => 'width:500px; height: 150px;',
289
-        'type' => 'textarea',
290
-        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
291
-    ),
292
-
293
-    array('type' => 'sectionend', 'id' => 'other_emails'),
294
-
295
-
296
-    array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'),
297
-
298
-    array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'),
299
-
300
-    array(
301
-        'name' => __('Post submitted success', 'geodirectory'),
302
-        'desc' => '',
303
-        'id' => 'geodir_post_added_success_msg_content',
304
-        'css' => 'width:500px; height: 150px;',
305
-        'type' => 'textarea',
306
-        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
307
-    ),
308
-
309
-
310
-    array('type' => 'sectionend', 'id' => 'messages'),
20
+	array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'),
21
+
22
+
23
+	array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'),
24
+
25
+	array(
26
+		'name' => __('List of usable shortcodes', 'geodirectory'),
27
+		'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'),
28
+		'id' => 'geodir_list_of_usable_shordcodes',
29
+		'type' => 'html_content',
30
+		'css' => 'min-width:300px;',
31
+		'std' => 'All Places' // Default value for the page title - changed in settings
32
+	),
33
+
34
+	array(
35
+		'name' => __('Use advanced editor? (slow loading)', 'geodirectory'),
36
+		'desc' => __('Yes', 'geodirectory'),
37
+		'id' => 'geodir_tiny_editor',
38
+		'std' => 'yes',
39
+		'type' => 'radio',
40
+		'value' => '1',
41
+		'radiogroup' => 'start'
42
+	),
43
+	array(
44
+		'name' => __('Use advanced editor?(slow loading)', 'geodirectory'),
45
+		'desc' => __('No', 'geodirectory'),
46
+		'id' => 'geodir_tiny_editor',
47
+		'std' => 'yes',
48
+		'type' => 'radio',
49
+		'value' => '0',
50
+		'radiogroup' => 'end'
51
+	),
52
+
53
+
54
+	array('type' => 'sectionend', 'id' => 'notification_options'),
55
+
56
+
57
+	array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'),
58
+
59
+	array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'),
60
+
61
+	array(
62
+		'name' => __('New user registration', 'geodirectory'),
63
+		'desc' => __('Yes', 'geodirectory'),
64
+		'id' => 'geodir_bcc_new_user',
65
+		'std' => 'yes',
66
+		'type' => 'radio',
67
+		'value' => '1',
68
+		'radiogroup' => 'start'
69
+	),
70
+	array(
71
+		'name' => __('New user registration', 'geodirectory'),
72
+		'desc' => __('No', 'geodirectory'),
73
+		'id' => 'geodir_bcc_new_user',
74
+		'std' => 'yes',
75
+		'type' => 'radio',
76
+		'value' => '0',
77
+		'radiogroup' => 'end'
78
+	),
79
+
80
+	array(
81
+		'name' => __('Send to friend', 'geodirectory'),
82
+		'desc' => __('Yes', 'geodirectory'),
83
+		'id' => 'geodir_bcc_friend',
84
+		'std' => 'yes',
85
+		'type' => 'radio',
86
+		'value' => '1',
87
+		'radiogroup' => 'start'
88
+	),
89
+	array(
90
+		'name' => __('Send to friend', 'geodirectory'),
91
+		'desc' => __('No', 'geodirectory'),
92
+		'id' => 'geodir_bcc_friend',
93
+		'std' => 'yes',
94
+		'type' => 'radio',
95
+		'value' => '0',
96
+		'radiogroup' => 'end'
97
+	),
98
+
99
+	array(
100
+		'name' => __('Send enquiry', 'geodirectory'),
101
+		'desc' => __('Yes', 'geodirectory'),
102
+		'id' => 'geodir_bcc_enquiry',
103
+		'std' => 'yes',
104
+		'type' => 'radio',
105
+		'value' => '1',
106
+		'radiogroup' => 'start'
107
+	),
108
+	array(
109
+		'name' => __('Send enquiry', 'geodirectory'),
110
+		'desc' => __('No', 'geodirectory'),
111
+		'id' => 'geodir_bcc_enquiry',
112
+		'std' => 'yes',
113
+		'type' => 'radio',
114
+		'value' => '0',
115
+		'radiogroup' => 'end'
116
+	),
117
+
118
+
119
+	array('type' => 'sectionend', 'id' => 'site_bcc_options'),
120
+
121
+
122
+	array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'),
123
+
124
+	array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'),
125
+
126
+	array(
127
+		'name' => __('Post submit success to admin email', 'geodirectory'),
128
+		'desc' => '',
129
+		'id' => 'geodir_post_submited_success_email_subject_admin',
130
+		'type' => 'text',
131
+		'css' => 'min-width:300px;',
132
+		'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
133
+	),
134
+	 array(
135
+		'name' => '',
136
+		'desc' => '',
137
+		'id' => 'geodir_post_submited_success_email_content_admin',
138
+		'css' => 'width:500px; height: 150px;',
139
+		'type' => 'textarea',
140
+		'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
141
+	),
142
+	array(
143
+		'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
144
+		'desc' => __('Yes', 'geodirectory'),
145
+		'id' => 'geodir_notify_post_edited',
146
+		'std' => '0',
147
+		'type' => 'radio',
148
+		'value' => '1',
149
+		'radiogroup' => 'start'
150
+	),
151
+	array(
152
+		'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
153
+		'desc' => __('No', 'geodirectory'),
154
+		'id' => 'geodir_notify_post_edited',
155
+		'std' => '0',
156
+		'type' => 'radio',
157
+		'value' => '0',
158
+		'radiogroup' => 'end'
159
+	),
160
+	array(
161
+		'name' => __('Listing edited by Author', 'geodirectory'),
162
+		'desc' => '',
163
+		'id' => 'geodir_post_edited_email_subject_admin',
164
+		'type' => 'text',
165
+		'css' => 'min-width:300px;',
166
+		'std' => __('[[#site_name#]] Listing edited by Author', 'geodirectory')
167
+	),
168
+	array(
169
+		'name' => '',
170
+		'desc' => '',
171
+		'id' => 'geodir_post_edited_email_content_admin',
172
+		'css' => 'width:500px; height: 150px;',
173
+		'type' => 'textarea',
174
+		'std' => __('<p>Dear Admin,</p><p>A listing [#listing_link#] has been edited by it\'s author [#post_author_name#].</p><br><p><b>Listing Details:</b></p><p>Listing ID: [#post_id#]</p><p>Listing URL: [#listing_link#]</p><p>Date: [#current_date#]</p><br><p>This email is just for your information.</p><p>[#site_name#]</p>', 'geodirectory')
175
+	),
176
+
177
+
178
+	array('type' => 'sectionend', 'id' => 'admin_emails'),
179
+
180
+
181
+	array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'),
182
+
183
+	array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'),
184
+
185
+	array(
186
+		'name' => __('Post submit success to client email', 'geodirectory'),
187
+		'desc' => '',
188
+		'id' => 'geodir_post_submited_success_email_subject',
189
+		'type' => 'text',
190
+		'css' => 'min-width:300px;',
191
+		'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
192
+	),
193
+	array(
194
+		'name' => '',
195
+		'desc' => '',
196
+		'id' => 'geodir_post_submited_success_email_content',
197
+		'css' => 'width:500px; height: 150px;',
198
+		'type' => 'textarea',
199
+		'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
200
+	),
201
+
202
+
203
+	array(
204
+		'name' => __('User forgot password email', 'geodirectory'),
205
+		'desc' => '',
206
+		'id' => 'geodir_forgot_password_subject',
207
+		'type' => 'text',
208
+		'css' => 'min-width:300px;',
209
+		'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings
210
+	),
211
+	array(
212
+		'name' => '',
213
+		'desc' => '',
214
+		'id' => 'geodir_forgot_password_content',
215
+		'css' => 'width:500px; height: 150px;',
216
+		'type' => 'textarea',
217
+		'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
218
+	),
219
+
220
+	array(
221
+		'name' => __('Registration success email', 'geodirectory'),
222
+		'desc' => '',
223
+		'id' => 'geodir_registration_success_email_subject',
224
+		'type' => 'text',
225
+		'css' => 'min-width:300px;',
226
+		'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings
227
+	),
228
+	array(
229
+		'name' => '',
230
+		'desc' => '',
231
+		'id' => 'geodir_registration_success_email_content',
232
+		'css' => 'width:500px; height: 150px;',
233
+		'type' => 'textarea',
234
+		'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
235
+	),
236
+	array(
237
+		'name' => __('Listing published email', 'geodirectory'),
238
+		'desc' => '',
239
+		'id' => 'geodir_post_published_email_subject',
240
+		'type' => 'text',
241
+		'css' => 'min-width:300px;',
242
+		'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings
243
+	),
244
+	array(
245
+		'name' => '',
246
+		'desc' => '',
247
+		'id' => 'geodir_post_published_email_content',
248
+		'css' => 'width:500px; height: 150px;',
249
+		'type' => 'textarea',
250
+		'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory')
251
+	),
252
+
253
+	array('type' => 'sectionend', 'id' => 'client_emails'),
254
+
255
+	array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'),
256
+
257
+	array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'),
258
+
259
+	array(
260
+		'name' => __('Send to friend', 'geodirectory'),
261
+		'desc' => '',
262
+		'id' => 'geodir_email_friend_subject',
263
+		'type' => 'text',
264
+		'css' => 'min-width:300px;',
265
+		'std' => __('[#from_name#] thought you might be interested in..', 'geodirectory')
266
+	),
267
+	array(
268
+		'name' => '',
269
+		'desc' => '',
270
+		'id' => 'geodir_email_friend_content',
271
+		'css' => 'width:500px; height: 150px;',
272
+		'type' => 'textarea',
273
+		'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
274
+	),
275
+
276
+	array(
277
+		'name' => __('Email enquiry', 'geodirectory'),
278
+		'desc' => '',
279
+		'id' => 'geodir_email_enquiry_subject',
280
+		'type' => 'text',
281
+		'css' => 'min-width:300px;',
282
+		'std' => __('Website Enquiry', 'geodirectory')
283
+	),
284
+	array(
285
+		'name' => '',
286
+		'desc' => '',
287
+		'id' => 'geodir_email_enquiry_content',
288
+		'css' => 'width:500px; height: 150px;',
289
+		'type' => 'textarea',
290
+		'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
291
+	),
292
+
293
+	array('type' => 'sectionend', 'id' => 'other_emails'),
294
+
295
+
296
+	array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'),
297
+
298
+	array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'),
299
+
300
+	array(
301
+		'name' => __('Post submitted success', 'geodirectory'),
302
+		'desc' => '',
303
+		'id' => 'geodir_post_added_success_msg_content',
304
+		'css' => 'width:500px; height: 150px;',
305
+		'type' => 'textarea',
306
+		'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
307
+	),
308
+
309
+
310
+	array('type' => 'sectionend', 'id' => 'messages'),
311 311
 
312 312
 )); // End Manage NOtifications settings
Please login to merge, or discard this patch.
geodirectory-functions/cat-meta-functions/cat_meta.php 3 patches
Braces   +15 added lines, -12 removed lines patch added patch discarded remove patch
@@ -204,8 +204,9 @@  discard block
 block discarded – undo
204 204
 #############################################################
205 205
 function manage_category_custom_fields($deprecated, $column_name, $term_id)
206 206
 {
207
-    if ($column_name == 'cat_ID_num')
208
-        echo $term_id;
207
+    if ($column_name == 'cat_ID_num') {
208
+            echo $term_id;
209
+    }
209 210
 
210 211
     if ($column_name == 'cat_icon') {
211 212
         $term_icon_url = get_tax_meta($term_id, 'ct_cat_icon');
@@ -214,9 +215,9 @@  discard block
 block discarded – undo
214 215
 
215 216
             $file_info = pathinfo($term_icon_url['src']);
216 217
 
217
-            if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
218
-                $sub_dir = $file_info['dirname'];
219
-            else{$sub_dir = '';}
218
+            if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') {
219
+                            $sub_dir = $file_info['dirname'];
220
+            } else{$sub_dir = '';}
220 221
 
221 222
             $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs
222 223
             $uploads_baseurl = $uploads['baseurl'];
@@ -236,8 +237,9 @@  discard block
 block discarded – undo
236 237
 
237 238
     if ($column_name == 'cat_default_img') {
238 239
         $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img');
239
-        if ($cat_default_img != '')
240
-            echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
240
+        if ($cat_default_img != '') {
241
+                    echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
242
+        }
241 243
 
242 244
     }
243 245
 }
@@ -245,11 +247,12 @@  discard block
 block discarded – undo
245 247
 function geodir_get_default_catimage($term_id, $post_type = 'gd_place')
246 248
 {
247 249
 
248
-    if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type))
249
-        return $cat_default_img;
250
-    else
251
-        return false;
252
-}
250
+    if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) {
251
+            return $cat_default_img;
252
+    } else {
253
+            return false;
254
+    }
255
+    }
253 256
 
254 257
 //Clear custom fields
255 258
 add_action('in_admin_footer', 'geodir_tax_meta_clear_custom_field');
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
      */
25 25
 
26 26
     $config = array(
27
-        'id' => 'demo_meta_box',                    // meta box id, unique per meta box
28
-        'title' => __('Demo Meta Box', 'geodirectory'),                    // meta box title
29
-        'pages' => geodir_get_taxonomies(),            // taxonomy name, accept categories, post_tag and custom taxonomies
30
-        'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
31
-        'fields' => array(),                        // list of meta fields (can be added by field arrays)
32
-        'local_images' => false,                    // Use local or hosted images (meta box images for add/remove)
27
+        'id' => 'demo_meta_box', // meta box id, unique per meta box
28
+        'title' => __('Demo Meta Box', 'geodirectory'), // meta box title
29
+        'pages' => geodir_get_taxonomies(), // taxonomy name, accept categories, post_tag and custom taxonomies
30
+        'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional
31
+        'fields' => array(), // list of meta fields (can be added by field arrays)
32
+        'local_images' => false, // Use local or hosted images (meta box images for add/remove)
33 33
         'use_with_theme' => true                    //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
34 34
     );
35 35
 
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
      * Initiate your meta box
39 39
      */
40 40
     $my_meta = new Tax_Meta_Class($config);
41
-    $my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
42
-    $my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
43
-    $my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
41
+    $my_meta->addWysiwyg($prefix.'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
42
+    $my_meta->addImage($prefix.'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
43
+    $my_meta->addImage($prefix.'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
44 44
     /*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML
45 45
 
46
-    $my_meta->addSelect($prefix . 'cat_schema',
46
+    $my_meta->addSelect($prefix.'cat_schema',
47 47
     /*
48 48
      * Allows you to add/filter the cat schema types.
49 49
      *
50 50
      * @since 1.5.7
51 51
      */
52
-        apply_filters('geodir_cat_schemas',array(
52
+        apply_filters('geodir_cat_schemas', array(
53 53
             '' => __('Default (LocalBusiness)', 'geodirectory'),
54 54
             'AccountingService' => 'AccountingService',
55 55
             'Attorney' => 'Attorney',
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             'WholesaleStore' => 'WholesaleStore',
142 142
             'Winery' => 'Winery'
143 143
         )),
144
-        array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2')));
144
+        array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory')."", 'std' => array('selectkey2')));
145 145
 
146 146
     /*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'),
147 147
     'random'=>__('Random','geodirectory'),
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
 if (!empty($gd_taxonomies)) {
180 180
     foreach ($gd_taxonomies as $gd_taxonomy) {
181 181
 
182
-        add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2);
183
-        add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3);
182
+        add_filter('manage_edit-'.$gd_taxonomy.'_columns', 'addCat_column', 10, 2);
183
+        add_action('manage_'.$gd_taxonomy.'_custom_column', 'manage_category_custom_fields', 10, 3);
184 184
 
185 185
     }
186 186
 }
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
 
215 215
             $file_info = pathinfo($term_icon_url['src']);
216 216
 
217
-            if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
217
+            if (isset($file_info['dirname']) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
218 218
                 $sub_dir = $file_info['dirname'];
219
-            else{$sub_dir = '';}
219
+            else {$sub_dir = ''; }
220 220
 
221 221
             $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs
222 222
             $uploads_baseurl = $uploads['baseurl'];
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 
227 227
             $sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
228 228
 
229
-            $uploads_url = $uploads_baseurl . $sub_dir;
229
+            $uploads_url = $uploads_baseurl.$sub_dir;
230 230
 
231
-            $term_icon_url['src'] = $uploads_url . '/' . $file_name;
232
-            echo '<img src="' . $term_icon_url['src'] . '" />';
231
+            $term_icon_url['src'] = $uploads_url.'/'.$file_name;
232
+            echo '<img src="'.$term_icon_url['src'].'" />';
233 233
 
234 234
         }
235 235
     }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     if ($column_name == 'cat_default_img') {
238 238
         $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img');
239 239
         if ($cat_default_img != '')
240
-            echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
240
+            echo '<img src="'.$cat_default_img['src'].'" style="max-height:60px;max-width:60px;"/>';
241 241
 
242 242
     }
243 243
 }
@@ -268,8 +268,8 @@  discard block
 block discarded – undo
268 268
                             jQuery("#addtag iframe").contents().find("body").html('');
269 269
                             jQuery('#addtag [rel="ct_cat_default_img"]').removeClass('at-delete_image_button').addClass('at-upload_image_button');
270 270
                             jQuery('#addtag [rel="ct_cat_icon"]').removeClass('at-delete_image_button').addClass('at-upload_image_button');
271
-                            jQuery('#addtag [rel="ct_cat_default_img"]').val('<?php _e('Upload Image','geodirectory');?>');
272
-                            jQuery('#addtag [rel="ct_cat_icon"]').val('<?php _e('Upload Image','geodirectory');?>');
271
+                            jQuery('#addtag [rel="ct_cat_default_img"]').val('<?php _e('Upload Image', 'geodirectory'); ?>');
272
+                            jQuery('#addtag [rel="ct_cat_icon"]').val('<?php _e('Upload Image', 'geodirectory'); ?>');
273 273
                         }
274 274
                     }, 1000);
275 275
 
Please login to merge, or discard this patch.
Indentation   +166 added lines, -166 removed lines patch added patch discarded remove patch
@@ -11,142 +11,142 @@  discard block
 block discarded – undo
11 11
 //include the main class file
12 12
 require_once("Tax-meta-class.php");
13 13
 if (is_admin()) {
14
-    /*
14
+	/*
15 15
      * prefix of meta keys, optional
16 16
      * use underscore (_) at the beginning to make keys hidden, for example $prefix = '_ba_';
17 17
      *  you also can make prefix empty to disable it
18 18
      *
19 19
      */
20 20
 
21
-    $prefix = 'ct_';
22
-    /*
21
+	$prefix = 'ct_';
22
+	/*
23 23
      * configure your meta box
24 24
      */
25 25
 
26
-    $config = array(
27
-        'id' => 'demo_meta_box',                    // meta box id, unique per meta box
28
-        'title' => __('Demo Meta Box', 'geodirectory'),                    // meta box title
29
-        'pages' => geodir_get_taxonomies(),            // taxonomy name, accept categories, post_tag and custom taxonomies
30
-        'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
31
-        'fields' => array(),                        // list of meta fields (can be added by field arrays)
32
-        'local_images' => false,                    // Use local or hosted images (meta box images for add/remove)
33
-        'use_with_theme' => true                    //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
34
-    );
26
+	$config = array(
27
+		'id' => 'demo_meta_box',                    // meta box id, unique per meta box
28
+		'title' => __('Demo Meta Box', 'geodirectory'),                    // meta box title
29
+		'pages' => geodir_get_taxonomies(),            // taxonomy name, accept categories, post_tag and custom taxonomies
30
+		'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
31
+		'fields' => array(),                        // list of meta fields (can be added by field arrays)
32
+		'local_images' => false,                    // Use local or hosted images (meta box images for add/remove)
33
+		'use_with_theme' => true                    //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
34
+	);
35 35
 
36 36
 
37
-    /*
37
+	/*
38 38
      * Initiate your meta box
39 39
      */
40
-    $my_meta = new Tax_Meta_Class($config);
41
-    $my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
42
-    $my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
43
-    $my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
44
-    /*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML
45
-
46
-    $my_meta->addSelect($prefix . 'cat_schema',
47
-    /*
40
+	$my_meta = new Tax_Meta_Class($config);
41
+	$my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
42
+	$my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
43
+	$my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
44
+	/*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML
45
+
46
+	$my_meta->addSelect($prefix . 'cat_schema',
47
+	/*
48 48
      * Allows you to add/filter the cat schema types.
49 49
      *
50 50
      * @since 1.5.7
51 51
      */
52
-        apply_filters('geodir_cat_schemas',array(
53
-            '' => __('Default (LocalBusiness)', 'geodirectory'),
54
-            'AccountingService' => 'AccountingService',
55
-            'Attorney' => 'Attorney',
56
-            'AutoBodyShop' => 'AutoBodyShop',
57
-            'AutoDealer' => 'AutoDealer',
58
-            'AutoPartsStore' => 'AutoPartsStore',
59
-            'AutoRental' => 'AutoRental',
60
-            'AutoRepair' => 'AutoRepair',
61
-            'AutoWash' => 'AutoWash',
62
-            'Bakery' => 'Bakery',
63
-            'BarOrPub' => 'BarOrPub',
64
-            'BeautySalon' => 'BeautySalon',
65
-            'BedAndBreakfast' => 'BedAndBreakfast',
66
-            'BikeStore' => 'BikeStore',
67
-            'BookStore' => 'BookStore',
68
-            'CafeOrCoffeeShop' => 'CafeOrCoffeeShop',
69
-            'Campground' => 'Campground',
70
-            'ChildCare' => 'ChildCare',
71
-            'ClothingStore' => 'ClothingStore',
72
-            'ComputerStore' => 'ComputerStore',
73
-            'DaySpa' => 'DaySpa',
74
-            'Dentist' => 'Dentist',
75
-            'DryCleaningOrLaundry' => 'DryCleaningOrLaundry',
76
-            'Electrician' => 'Electrician',
77
-            'ElectronicsStore' => 'ElectronicsStore',
78
-            'EmergencyService' => 'EmergencyService',
79
-            'EntertainmentBusiness' => 'EntertainmentBusiness',
80
-            'Event' => 'Event',
81
-            'EventVenue' => 'EventVenue',
82
-            'ExerciseGym' => 'ExerciseGym',
83
-            'FinancialService' => 'FinancialService',
84
-            'Florist' => 'Florist',
85
-            'FoodEstablishment' => 'FoodEstablishment',
86
-            'FurnitureStore' => 'FurnitureStore',
87
-            'GardenStore' => 'GardenStore',
88
-            'GeneralContractor' => 'GeneralContractor',
89
-            'GolfCourse' => 'GolfCourse',
90
-            'HairSalon' => 'HairSalon',
91
-            'HardwareStore' => 'HardwareStore',
92
-            'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness',
93
-            'HobbyShop' => 'HobbyShop',
94
-            'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness',
95
-            'HomeGoodsStore' => 'HomeGoodsStore',
96
-            'Hospital' => 'Hospital',
97
-            'Hostel' => 'Hostel',
98
-            'Hotel' => 'Hotel',
99
-            'HousePainter' => 'HousePainter',
100
-            'HVACBusiness' => 'HVACBusiness',
101
-            'InsuranceAgency' => 'InsuranceAgency',
102
-            'JewelryStore' => 'JewelryStore',
103
-            'LiquorStore' => 'LiquorStore',
104
-            'Locksmith' => 'Locksmith',
105
-            'LodgingBusiness' => 'LodgingBusiness',
106
-            'MedicalClinic' => 'MedicalClinic',
107
-            'MensClothingStore' => 'MensClothingStore',
108
-            'MobilePhoneStore' => 'MobilePhoneStore',
109
-            'Motel' => 'Motel',
110
-            'MotorcycleDealer' => 'MotorcycleDealer',
111
-            'MotorcycleRepair' => 'MotorcycleRepair',
112
-            'MovingCompany' => 'MovingCompany',
113
-            'MusicStore' => 'MusicStore',
114
-            'NailSalon' => 'NailSalon',
115
-            'NightClub' => 'NightClub',
116
-            'Notary' => 'Notary',
117
-            'OfficeEquipmentStore' => 'OfficeEquipmentStore',
118
-            'Optician' => 'Optician',
119
-            'PetStore' => 'PetStore',
120
-            'Physician' => 'Physician',
121
-            'Plumber' => 'Plumber',
122
-            'ProfessionalService' => 'ProfessionalService',
123
-            'RealEstateAgent' => 'RealEstateAgent',
124
-            'Residence' => 'Residence',
125
-            'Restaurant' => 'Restaurant',
126
-            'RoofingContractor' => 'RoofingContractor',
127
-            'RVPark' => 'RVPark',
128
-            'School' => 'School',
129
-            'SelfStorage' => 'SelfStorage',
130
-            'ShoeStore' => 'ShoeStore',
131
-            'SkiResort' => 'SkiResort',
132
-            'SportingGoodsStore' => 'SportingGoodsStore',
133
-            'SportsClub' => 'SportsClub',
134
-            'Store' => 'Store',
135
-            'TattooParlor' => 'TattooParlor',
136
-            'Taxi' => 'Taxi',
137
-            'TennisComplex' => 'TennisComplex',
138
-            'TireShop' => 'TireShop',
139
-            'TouristAttraction' => 'TouristAttraction',
140
-            'ToyStore' => 'ToyStore',
141
-            'TravelAgency' => 'TravelAgency',
142
-            //'VacationRentals' => 'VacationRentals', // Not recognised by google yet
143
-            'VeterinaryCare' => 'VeterinaryCare',
144
-            'WholesaleStore' => 'WholesaleStore',
145
-            'Winery' => 'Winery'
146
-        )),
147
-        array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2')));
148
-
149
-    /*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'),
52
+		apply_filters('geodir_cat_schemas',array(
53
+			'' => __('Default (LocalBusiness)', 'geodirectory'),
54
+			'AccountingService' => 'AccountingService',
55
+			'Attorney' => 'Attorney',
56
+			'AutoBodyShop' => 'AutoBodyShop',
57
+			'AutoDealer' => 'AutoDealer',
58
+			'AutoPartsStore' => 'AutoPartsStore',
59
+			'AutoRental' => 'AutoRental',
60
+			'AutoRepair' => 'AutoRepair',
61
+			'AutoWash' => 'AutoWash',
62
+			'Bakery' => 'Bakery',
63
+			'BarOrPub' => 'BarOrPub',
64
+			'BeautySalon' => 'BeautySalon',
65
+			'BedAndBreakfast' => 'BedAndBreakfast',
66
+			'BikeStore' => 'BikeStore',
67
+			'BookStore' => 'BookStore',
68
+			'CafeOrCoffeeShop' => 'CafeOrCoffeeShop',
69
+			'Campground' => 'Campground',
70
+			'ChildCare' => 'ChildCare',
71
+			'ClothingStore' => 'ClothingStore',
72
+			'ComputerStore' => 'ComputerStore',
73
+			'DaySpa' => 'DaySpa',
74
+			'Dentist' => 'Dentist',
75
+			'DryCleaningOrLaundry' => 'DryCleaningOrLaundry',
76
+			'Electrician' => 'Electrician',
77
+			'ElectronicsStore' => 'ElectronicsStore',
78
+			'EmergencyService' => 'EmergencyService',
79
+			'EntertainmentBusiness' => 'EntertainmentBusiness',
80
+			'Event' => 'Event',
81
+			'EventVenue' => 'EventVenue',
82
+			'ExerciseGym' => 'ExerciseGym',
83
+			'FinancialService' => 'FinancialService',
84
+			'Florist' => 'Florist',
85
+			'FoodEstablishment' => 'FoodEstablishment',
86
+			'FurnitureStore' => 'FurnitureStore',
87
+			'GardenStore' => 'GardenStore',
88
+			'GeneralContractor' => 'GeneralContractor',
89
+			'GolfCourse' => 'GolfCourse',
90
+			'HairSalon' => 'HairSalon',
91
+			'HardwareStore' => 'HardwareStore',
92
+			'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness',
93
+			'HobbyShop' => 'HobbyShop',
94
+			'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness',
95
+			'HomeGoodsStore' => 'HomeGoodsStore',
96
+			'Hospital' => 'Hospital',
97
+			'Hostel' => 'Hostel',
98
+			'Hotel' => 'Hotel',
99
+			'HousePainter' => 'HousePainter',
100
+			'HVACBusiness' => 'HVACBusiness',
101
+			'InsuranceAgency' => 'InsuranceAgency',
102
+			'JewelryStore' => 'JewelryStore',
103
+			'LiquorStore' => 'LiquorStore',
104
+			'Locksmith' => 'Locksmith',
105
+			'LodgingBusiness' => 'LodgingBusiness',
106
+			'MedicalClinic' => 'MedicalClinic',
107
+			'MensClothingStore' => 'MensClothingStore',
108
+			'MobilePhoneStore' => 'MobilePhoneStore',
109
+			'Motel' => 'Motel',
110
+			'MotorcycleDealer' => 'MotorcycleDealer',
111
+			'MotorcycleRepair' => 'MotorcycleRepair',
112
+			'MovingCompany' => 'MovingCompany',
113
+			'MusicStore' => 'MusicStore',
114
+			'NailSalon' => 'NailSalon',
115
+			'NightClub' => 'NightClub',
116
+			'Notary' => 'Notary',
117
+			'OfficeEquipmentStore' => 'OfficeEquipmentStore',
118
+			'Optician' => 'Optician',
119
+			'PetStore' => 'PetStore',
120
+			'Physician' => 'Physician',
121
+			'Plumber' => 'Plumber',
122
+			'ProfessionalService' => 'ProfessionalService',
123
+			'RealEstateAgent' => 'RealEstateAgent',
124
+			'Residence' => 'Residence',
125
+			'Restaurant' => 'Restaurant',
126
+			'RoofingContractor' => 'RoofingContractor',
127
+			'RVPark' => 'RVPark',
128
+			'School' => 'School',
129
+			'SelfStorage' => 'SelfStorage',
130
+			'ShoeStore' => 'ShoeStore',
131
+			'SkiResort' => 'SkiResort',
132
+			'SportingGoodsStore' => 'SportingGoodsStore',
133
+			'SportsClub' => 'SportsClub',
134
+			'Store' => 'Store',
135
+			'TattooParlor' => 'TattooParlor',
136
+			'Taxi' => 'Taxi',
137
+			'TennisComplex' => 'TennisComplex',
138
+			'TireShop' => 'TireShop',
139
+			'TouristAttraction' => 'TouristAttraction',
140
+			'ToyStore' => 'ToyStore',
141
+			'TravelAgency' => 'TravelAgency',
142
+			//'VacationRentals' => 'VacationRentals', // Not recognised by google yet
143
+			'VeterinaryCare' => 'VeterinaryCare',
144
+			'WholesaleStore' => 'WholesaleStore',
145
+			'Winery' => 'Winery'
146
+		)),
147
+		array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2')));
148
+
149
+	/*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'),
150 150
     'random'=>__('Random','geodirectory'),
151 151
     'az'=>__('Alphabetical' , 'geodirectory'),
152 152
     'newest'=>__('Newest','geodirectory'),
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
     'low_review'=>__('Lowest Reviews','geodirectory')),
158 158
     array('name'=> __('Sort By','geodirectory'),'desc' => __('Select the default sort option.' ,'geodirectory'), 'std'=> array('selectkey2')));*/
159 159
 
160
-    // Show options for placecategories only
161
-    /*	if(isset($_REQUEST['taxonomy']) && in_array($_REQUEST['taxonomy'],$config['pages']) ){
160
+	// Show options for placecategories only
161
+	/*	if(isset($_REQUEST['taxonomy']) && in_array($_REQUEST['taxonomy'],$config['pages']) ){
162 162
         // Exclude sort options
163 163
         $my_meta->addCheckbox($prefix.'cat_exclude_rating',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory')));
164 164
         $my_meta->addCheckbox($prefix.'cat_exclude_reviews',array('name'=> __('<b>Exclude</b> Reviews sort option','geodirectory')));
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 
171 171
         }*/
172 172
 
173
-    //Finish Meta Box Declaration
174
-    $my_meta->Finish();
173
+	//Finish Meta Box Declaration
174
+	$my_meta->Finish();
175 175
 }
176 176
 
177 177
 
@@ -180,82 +180,82 @@  discard block
 block discarded – undo
180 180
 ##############################################################
181 181
 $gd_taxonomies = geodir_get_taxonomies();
182 182
 if (!empty($gd_taxonomies)) {
183
-    foreach ($gd_taxonomies as $gd_taxonomy) {
183
+	foreach ($gd_taxonomies as $gd_taxonomy) {
184 184
 
185
-        add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2);
186
-        add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3);
185
+		add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2);
186
+		add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3);
187 187
 
188
-    }
188
+	}
189 189
 }
190 190
 
191 191
 function addCat_column($columns)
192 192
 {
193
-    if (isset($columns['description']) && $posts = $columns['description']) {
194
-        unset($columns['description']);
195
-    }
196
-
197
-    $columns['cat_icon'] = 'Icon';
198
-    $columns['cat_default_img'] = __('Default Image', 'geodirectory');
199
-    $columns['cat_ID_num'] = __('Cat ID', 'geodirectory');
200
-    return $columns;
193
+	if (isset($columns['description']) && $posts = $columns['description']) {
194
+		unset($columns['description']);
195
+	}
196
+
197
+	$columns['cat_icon'] = 'Icon';
198
+	$columns['cat_default_img'] = __('Default Image', 'geodirectory');
199
+	$columns['cat_ID_num'] = __('Cat ID', 'geodirectory');
200
+	return $columns;
201 201
 }
202 202
 
203 203
 #############################################################
204 204
 function manage_category_custom_fields($deprecated, $column_name, $term_id)
205 205
 {
206
-    if ($column_name == 'cat_ID_num')
207
-        echo $term_id;
206
+	if ($column_name == 'cat_ID_num')
207
+		echo $term_id;
208 208
 
209
-    if ($column_name == 'cat_icon') {
210
-        $term_icon_url = get_tax_meta($term_id, 'ct_cat_icon');
209
+	if ($column_name == 'cat_icon') {
210
+		$term_icon_url = get_tax_meta($term_id, 'ct_cat_icon');
211 211
 
212
-        if ($term_icon_url != '') {
212
+		if ($term_icon_url != '') {
213 213
 
214
-            $file_info = pathinfo($term_icon_url['src']);
214
+			$file_info = pathinfo($term_icon_url['src']);
215 215
 
216
-            if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
217
-                $sub_dir = $file_info['dirname'];
218
-            else{$sub_dir = '';}
216
+			if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
217
+				$sub_dir = $file_info['dirname'];
218
+			else{$sub_dir = '';}
219 219
 
220
-            $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs
221
-            $uploads_baseurl = $uploads['baseurl'];
222
-            $uploads_path = $uploads['path'];
220
+			$uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs
221
+			$uploads_baseurl = $uploads['baseurl'];
222
+			$uploads_path = $uploads['path'];
223 223
 
224
-            $file_name = $file_info['basename'];
224
+			$file_name = $file_info['basename'];
225 225
 
226
-            $sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
226
+			$sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
227 227
 
228
-            $uploads_url = $uploads_baseurl . $sub_dir;
228
+			$uploads_url = $uploads_baseurl . $sub_dir;
229 229
 
230
-            $term_icon_url['src'] = $uploads_url . '/' . $file_name;
231
-            echo '<img src="' . $term_icon_url['src'] . '" />';
230
+			$term_icon_url['src'] = $uploads_url . '/' . $file_name;
231
+			echo '<img src="' . $term_icon_url['src'] . '" />';
232 232
 
233
-        }
234
-    }
233
+		}
234
+	}
235 235
 
236
-    if ($column_name == 'cat_default_img') {
237
-        $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img');
238
-        if ($cat_default_img != '')
239
-            echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
236
+	if ($column_name == 'cat_default_img') {
237
+		$cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img');
238
+		if ($cat_default_img != '')
239
+			echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
240 240
 
241
-    }
241
+	}
242 242
 }
243 243
 
244 244
 function geodir_get_default_catimage($term_id, $post_type = 'gd_place')
245 245
 {
246 246
 
247
-    if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type))
248
-        return $cat_default_img;
249
-    else
250
-        return false;
247
+	if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type))
248
+		return $cat_default_img;
249
+	else
250
+		return false;
251 251
 }
252 252
 
253 253
 //Clear custom fields
254 254
 add_action('in_admin_footer', 'geodir_tax_meta_clear_custom_field');
255 255
 function geodir_tax_meta_clear_custom_field()
256 256
 {
257
-    if (isset($_REQUEST['taxonomy']) && !empty($_REQUEST['taxonomy'])):
258
-        ?>
257
+	if (isset($_REQUEST['taxonomy']) && !empty($_REQUEST['taxonomy'])):
258
+		?>
259 259
         <script type="text/javascript">
260 260
             jQuery(document).ready(function () {
261 261
                 jQuery('#addtag #submit').click(function () {
@@ -276,5 +276,5 @@  discard block
 block discarded – undo
276 276
             });
277 277
         </script>
278 278
     <?php
279
-    endif;
279
+	endif;
280 280
 }
Please login to merge, or discard this patch.
geodirectory-functions/comments_functions.php 3 patches
Braces   +60 added lines, -48 removed lines patch added patch discarded remove patch
@@ -248,8 +248,9 @@  discard block
 block discarded – undo
248 248
 
249 249
     $post_id = isset($comment_info->comment_post_ID) ? $comment_info->comment_post_ID : '';
250 250
 
251
-    if (!empty($comment_info))
252
-        $status = $comment_info->comment_approved;
251
+    if (!empty($comment_info)) {
252
+            $status = $comment_info->comment_approved;
253
+    }
253 254
 
254 255
     if ($status == 'approve' || $status == 1) {
255 256
         $status = 1;
@@ -381,12 +382,14 @@  discard block
 block discarded – undo
381 382
 function geodir_wrap_comment_text($content, $comment = '')
382 383
 {
383 384
     $rating = 0;
384
-    if (!empty($comment))
385
-        $rating = geodir_get_commentoverall($comment->comment_ID);
385
+    if (!empty($comment)) {
386
+            $rating = geodir_get_commentoverall($comment->comment_ID);
387
+    }
386 388
     if ($rating != 0 && !is_admin()) {
387 389
         return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>';
388
-    } else
389
-        return $content;
390
+    } else {
391
+            return $content;
392
+    }
390 393
 
391 394
 }
392 395
 
@@ -475,11 +478,12 @@  discard block
 block discarded – undo
475 478
         $post_ratings = get_post_meta($post_id, 'overall_rating');
476 479
     }
477 480
 
478
-    if ($post_ratings)
479
-        return $post_ratings;
480
-    else
481
-        return false;
482
-}
481
+    if ($post_ratings) {
482
+            return $post_ratings;
483
+    } else {
484
+            return false;
485
+    }
486
+    }
483 487
 
484 488
 
485 489
 /**
@@ -504,11 +508,12 @@  discard block
 block discarded – undo
504 508
         )
505 509
     );
506 510
 
507
-    if (!empty($reatings))
508
-        return $reatings;
509
-    else
510
-        return false;
511
-}
511
+    if (!empty($reatings)) {
512
+            return $reatings;
513
+    } else {
514
+            return false;
515
+    }
516
+    }
512 517
 
513 518
 /**
514 519
  * Get review total of a Post.
@@ -532,11 +537,12 @@  discard block
 block discarded – undo
532 537
         )
533 538
     );
534 539
 
535
-    if (!empty($results))
536
-        return $results;
537
-    else
538
-        return false;
539
-}
540
+    if (!empty($results)) {
541
+            return $results;
542
+    } else {
543
+            return false;
544
+    }
545
+    }
540 546
 
541 547
 /**
542 548
  * Get review count by user ID.
@@ -559,11 +565,12 @@  discard block
 block discarded – undo
559 565
         )
560 566
     );
561 567
 
562
-    if (!empty($results))
563
-        return $results;
564
-    else
565
-        return false;
566
-}
568
+    if (!empty($results)) {
569
+            return $results;
570
+    } else {
571
+            return false;
572
+    }
573
+    }
567 574
 
568 575
 /**
569 576
  * Get average overall rating of a Post.
@@ -597,11 +604,12 @@  discard block
 block discarded – undo
597 604
         )
598 605
     );
599 606
 
600
-    if (!empty($results))
601
-        return $results;
602
-    else
603
-        return false;
604
-}
607
+    if (!empty($results)) {
608
+            return $results;
609
+    } else {
610
+            return false;
611
+    }
612
+    }
605 613
 
606 614
 /**
607 615
  * Get review count of a Post.
@@ -625,11 +633,12 @@  discard block
 block discarded – undo
625 633
         )
626 634
     );
627 635
 
628
-    if (!empty($results))
629
-        return $results;
630
-    else
631
-        return false;
632
-}
636
+    if (!empty($results)) {
637
+            return $results;
638
+    } else {
639
+            return false;
640
+    }
641
+    }
633 642
 
634 643
 /**
635 644
  * Get comments count of a Post.
@@ -655,11 +664,12 @@  discard block
 block discarded – undo
655 664
     );
656 665
 
657 666
 
658
-    if (!empty($results))
659
-        return $results;
660
-    else
661
-        return false;
662
-}
667
+    if (!empty($results)) {
668
+            return $results;
669
+    } else {
670
+            return false;
671
+    }
672
+    }
663 673
 
664 674
 /**
665 675
  * Get overall rating of a comment.
@@ -683,11 +693,12 @@  discard block
 block discarded – undo
683 693
         )
684 694
     );
685 695
 
686
-    if ($reatings)
687
-        return $reatings;
688
-    else
689
-        return false;
690
-}
696
+    if ($reatings) {
697
+            return $reatings;
698
+    } else {
699
+            return false;
700
+    }
701
+    }
691 702
 
692 703
 /**
693 704
  * Returns average overall rating of a Post. Depreciated since ver 1.3.6.
@@ -930,8 +941,9 @@  discard block
 block discarded – undo
930 941
     $active_tabs = get_option('geodir_detail_page_tabs_excluded');
931 942
 
932 943
     $is_display = true;
933
-    if (!empty($active_tabs) && in_array('reviews', $active_tabs))
934
-        $is_display = false;
944
+    if (!empty($active_tabs) && in_array('reviews', $active_tabs)) {
945
+            $is_display = false;
946
+    }
935 947
 
936 948
     /**
937 949
      * Filter to change display value.
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 function geodir_comment_rating_meta($comment)
69 69
 {
70 70
     $post_type = get_post_type($comment->comment_post_ID);
71
-	if (in_array($post_type, (array)geodir_get_posttypes()) && (int)$comment->comment_parent == 0) {
71
+	if (in_array($post_type, (array) geodir_get_posttypes()) && (int) $comment->comment_parent == 0) {
72 72
 		$rating = geodir_get_commentoverall($comment->comment_ID);
73 73
 		
74
-		if ((int)get_option('geodir_reviewrating_enable_font_awesome') == 1) {
74
+		if ((int) get_option('geodir_reviewrating_enable_font_awesome') == 1) {
75 75
 			$star_texts = array();
76 76
 			$star_texts[] = __('Terrible', 'geodirectory');
77 77
 			$star_texts[] = __('Poor', 'geodirectory');
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
 			echo geodir_font_awesome_rating_form_html('', $star_texts, $rating);
83 83
 		} else {			
84 84
 			if ($rating) {
85
-				echo '<div class="gd_rating" data-average="' . $rating . '" data-id="5">';
85
+				echo '<div class="gd_rating" data-average="'.$rating.'" data-id="5">';
86 86
 
87 87
 			} else {
88 88
 				echo '<div class="gd_rating" data-average="0" data-id="5"></div>';
89 89
 			}
90 90
 		}
91
-		echo '<input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="' . $rating . '"  />';
91
+		echo '<input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="'.$rating.'"  />';
92 92
 	}
93 93
 }
94 94
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 function geodir_comment_replaylink($link)
140 140
 {
141 141
 
142
-    $link = '<div class="gd_comment_replaylink">' . $link . '</div>';
142
+    $link = '<div class="gd_comment_replaylink">'.$link.'</div>';
143 143
 
144 144
     return $link;
145 145
 }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 function geodir_cancle_replaylink($link)
157 157
 {
158 158
 
159
-    $link = '<span class="gd-cancel-replaylink">' . $link . '</span>';
159
+    $link = '<span class="gd-cancel-replaylink">'.$link.'</span>';
160 160
 
161 161
     return $link;
162 162
 }
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
     if (isset($_REQUEST['geodir_overallrating'])) {
194 194
         $overall_rating = $_REQUEST['geodir_overallrating'];
195 195
         
196
-		if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) {
196
+		if (isset($comment_info->comment_parent) && (int) $comment_info->comment_parent == 0) {
197 197
             $overall_rating = $overall_rating > 0 ? $overall_rating : '0';
198 198
 
199
-            $sqlqry = $wpdb->prepare("INSERT INTO " . GEODIR_REVIEW_TABLE . " SET
199
+            $sqlqry = $wpdb->prepare("INSERT INTO ".GEODIR_REVIEW_TABLE." SET
200 200
 					post_id		= %d,
201 201
 					post_type = %s,
202 202
 					post_title	= %s,
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
     $post_type = get_post_type($post_id);
285 285
 
286
-    $detail_table = $plugin_prefix . $post_type . '_detail';
286
+    $detail_table = $plugin_prefix.$post_type.'_detail';
287 287
 
288 288
     if ($comment_id) {
289 289
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 
292 292
         if (isset($old_rating)) {
293 293
 
294
-            $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET
294
+            $sqlqry = $wpdb->prepare("UPDATE ".GEODIR_REVIEW_TABLE." SET
295 295
 						overall_rating = %f,
296 296
 						status		= %s,
297 297
 						comment_content = %s 
@@ -333,18 +333,18 @@  discard block
 block discarded – undo
333 333
 
334 334
     $post_type = get_post_type($post_id);
335 335
 
336
-    $detail_table = $plugin_prefix . $post_type . '_detail';
336
+    $detail_table = $plugin_prefix.$post_type.'_detail';
337 337
 
338 338
     if (isset($_REQUEST['geodir_overallrating'])) {
339 339
 
340 340
         $overall_rating = $_REQUEST['geodir_overallrating'];
341 341
 
342
-        if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) {
342
+        if (isset($comment_info->comment_parent) && (int) $comment_info->comment_parent == 0) {
343 343
             $overall_rating = $overall_rating > 0 ? $overall_rating : '0';
344 344
 
345 345
             if (isset($old_rating)) {
346 346
 
347
-                $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET
347
+                $sqlqry = $wpdb->prepare("UPDATE ".GEODIR_REVIEW_TABLE." SET
348 348
 						overall_rating = %f,
349 349
 						status		= %s,
350 350
 						comment_content	= %s 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 
383 383
     $wpdb->query(
384 384
         $wpdb->prepare(
385
-            "DELETE FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id=%d",
385
+            "DELETE FROM ".GEODIR_REVIEW_TABLE." WHERE comment_id=%d",
386 386
             array($comment_id)
387 387
         )
388 388
     );
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     if (!empty($comment))
406 406
         $rating = geodir_get_commentoverall($comment->comment_ID);
407 407
     if ($rating != 0 && !is_admin()) {
408
-        return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>';
408
+        return '<div><div class="gd-rating-text">'.__('Overall Rating', 'geodirectory').': <div class="rating">'.$rating.'</div></div>'.geodir_get_rating_stars($rating, $comment->comment_ID).'</div><div class="description">'.$content.'</div>';
409 409
     } else
410 410
         return $content;
411 411
 
@@ -429,18 +429,18 @@  discard block
 block discarded – undo
429 429
     if (!$post_type) {
430 430
         $post_type = get_post_type($post_id);
431 431
     }
432
-    $detail_table = $plugin_prefix . $post_type . '_detail';
432
+    $detail_table = $plugin_prefix.$post_type.'_detail';
433 433
     $post_newrating = geodir_get_post_rating($post_id, 1);
434 434
     $post_newrating_count = geodir_get_review_count_total($post_id);
435 435
 
436 436
 
437 437
     //$post_newrating = ( (float)$post_oldrating - (float)$old_rating ) + (float)$overall_rating ;
438 438
 
439
-    if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) {
439
+    if ($wpdb->get_var("SHOW TABLES LIKE '".$detail_table."'") == $detail_table) {
440 440
 
441 441
         $wpdb->query(
442 442
             $wpdb->prepare(
443
-                "UPDATE " . $detail_table . " SET
443
+                "UPDATE ".$detail_table." SET
444 444
 						overall_rating = %f,
445 445
 						rating_count = %f
446 446
 						where post_id = %d",
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
      * @package GeoDirectory
460 460
      * @param int $post_id The post ID.
461 461
      */
462
-    do_action('geodir_update_postrating',$post_id);
462
+    do_action('geodir_update_postrating', $post_id);
463 463
 
464 464
 }
465 465
 
@@ -480,13 +480,13 @@  discard block
 block discarded – undo
480 480
     global $wpdb, $plugin_prefix;
481 481
 
482 482
     $post_type = get_post_type($post_id);
483
-    $detail_table = $plugin_prefix . $post_type . '_detail';
483
+    $detail_table = $plugin_prefix.$post_type.'_detail';
484 484
 
485
-    if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) {
485
+    if ($wpdb->get_var("SHOW TABLES LIKE '".$detail_table."'") == $detail_table) {
486 486
 
487 487
         $post_ratings = $wpdb->get_var(
488 488
             $wpdb->prepare(
489
-                "SELECT overall_rating FROM " . $detail_table . " WHERE post_id = %d",
489
+                "SELECT overall_rating FROM ".$detail_table." WHERE post_id = %d",
490 490
                 array($post_id)
491 491
             )
492 492
         );
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 
521 521
     $reatings = $wpdb->get_row(
522 522
         $wpdb->prepare(
523
-            "SELECT * FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
523
+            "SELECT * FROM ".GEODIR_REVIEW_TABLE." WHERE comment_id = %d",
524 524
             array($comment_id)
525 525
         )
526 526
     );
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
     $results = $wpdb->get_var(
550 550
         $wpdb->prepare(
551
-            "SELECT SUM(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
551
+            "SELECT SUM(overall_rating) FROM ".GEODIR_REVIEW_TABLE." WHERE post_id = %d AND status=1 AND overall_rating>0",
552 552
             array($post_id)
553 553
         )
554 554
     );
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
     global $wpdb;
576 576
     $results = $wpdb->get_var(
577 577
         $wpdb->prepare(
578
-            "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE user_id = %d AND status=1 AND overall_rating>0",
578
+            "SELECT COUNT(overall_rating) FROM ".GEODIR_REVIEW_TABLE." WHERE user_id = %d AND status=1 AND overall_rating>0",
579 579
             array($user_id)
580 580
         )
581 581
     );
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 
614 614
     $results = $wpdb->get_var(
615 615
         $wpdb->prepare(
616
-            "SELECT COALESCE(avg(overall_rating),0) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
616
+            "SELECT COALESCE(avg(overall_rating),0) FROM ".GEODIR_REVIEW_TABLE." WHERE post_id = %d AND status=1 AND overall_rating>0",
617 617
             array($post_id)
618 618
         )
619 619
     );
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 
642 642
     $results = $wpdb->get_var(
643 643
         $wpdb->prepare(
644
-            "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
644
+            "SELECT COUNT(overall_rating) FROM ".GEODIR_REVIEW_TABLE." WHERE post_id = %d AND status=1 AND overall_rating>0",
645 645
             array($post_id)
646 646
         )
647 647
     );
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
 
671 671
     $results = $wpdb->get_var(
672 672
         $wpdb->prepare(
673
-            "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
673
+            "SELECT COUNT(overall_rating) FROM ".GEODIR_REVIEW_TABLE." WHERE post_id = %d AND status=1 AND overall_rating>0",
674 674
             array($post_id)
675 675
         )
676 676
     );
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 
700 700
     $reatings = $wpdb->get_var(
701 701
         $wpdb->prepare(
702
-            "SELECT overall_rating FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
702
+            "SELECT overall_rating FROM ".GEODIR_REVIEW_TABLE." WHERE comment_id = %d",
703 703
             array($comment_id)
704 704
         )
705 705
     );
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
     if (in_array($post->post_type, $post_types)) { // assuming there is a post type called business
750 750
         $template = locate_template(array("geodirectory/reviews.php")); // Use theme template if available
751 751
         if (!$template) {
752
-            $template = dirname(__FILE__) . '/reviews.php';
752
+            $template = dirname(__FILE__).'/reviews.php';
753 753
         }
754 754
         return $template;
755 755
     }
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
                         printf('<cite><b class="reviewer">%1$s</b> %2$s</cite>',
822 822
                             get_comment_author_link(),
823 823
                             // If current post author is also comment author, make it known visually.
824
-                            ($comment->user_id === $post->post_author) ? '<span>' . __('Post author', 'geodirectory') . '</span>' : ''
824
+                            ($comment->user_id === $post->post_author) ? '<span>'.__('Post author', 'geodirectory').'</span>' : ''
825 825
                         );
826 826
                         echo "<span class='item'><small><span class='fn'>$post->post_title</span></small></span>";
827 827
                         printf('<a href="%1$s"><time datetime="%2$s" class="dtreviewed">%3$s<span class="value-title" title="%2$s"></span></time></a>',
@@ -914,24 +914,24 @@  discard block
 block discarded – undo
914 914
     $a_rating = $rating / 5 * 100;
915 915
 
916 916
     if ($small) {
917
-        $r_html = '<div class="rating"><div class="gd_rating_map" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingColor" ></div><div class="geodir_RatingAverage_small" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star_small"></div></div></div>';
917
+        $r_html = '<div class="rating"><div class="gd_rating_map" data-average="'.$rating.'" data-id="'.$post_id.'"><div class="geodir_RatingColor" ></div><div class="geodir_RatingAverage_small" style="width: '.$a_rating.'%;"></div><div class="geodir_Star_small"></div></div></div>';
918 918
     } else {
919 919
 		if (function_exists('geodir_reviewrating_draw_overall_rating')) {
920 920
 			// Show rating stars from review rating manager
921 921
 			$r_html = geodir_reviewrating_draw_overall_rating($rating);
922 922
 		} else {
923
-			$rating_img = '<img alt="rating icon" src="' . get_option('geodir_default_rating_star_icon') . '" />';
923
+			$rating_img = '<img alt="rating icon" src="'.get_option('geodir_default_rating_star_icon').'" />';
924 924
 			
925 925
 			/* fix rating star for safari */
926 926
 			$star_width = 23 * 5;
927 927
 			//global $is_safari, $is_iphone, $ios, $is_chrome;
928 928
 			//$attach_style = ( $is_safari || $is_iphone || $ios || $is_chrome ) && $star_width > 0 ? 'width:' . $star_width . 'px;max-width:none' : '';
929 929
 			if ($star_width > 0) {
930
-				$attach_style = 'max-width:' . $star_width . 'px';
930
+				$attach_style = 'max-width:'.$star_width.'px';
931 931
 			} else {
932 932
 				$attach_style = '';
933 933
 			}
934
-			$r_html = '<div class="geodir-rating" style="' . $attach_style . '"><div class="gd_rating_show" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingAverage" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star">' . $rating_img . $rating_img . $rating_img . $rating_img . $rating_img . '</div></div></div>';
934
+			$r_html = '<div class="geodir-rating" style="'.$attach_style.'"><div class="gd_rating_show" data-average="'.$rating.'" data-id="'.$post_id.'"><div class="geodir_RatingAverage" style="width: '.$a_rating.'%;"></div><div class="geodir_Star">'.$rating_img.$rating_img.$rating_img.$rating_img.$rating_img.'</div></div></div>';
935 935
 		}
936 936
     }
937 937
     return apply_filters('geodir_get_rating_stars_html', $r_html, $rating, 5);
@@ -971,10 +971,10 @@  discard block
 block discarded – undo
971 971
 /*
972 972
  * If Disqus plugin is active, do some fixes to show on blogs but no on GD post types
973 973
  */
974
-if(function_exists('dsq_can_replace')) {
974
+if (function_exists('dsq_can_replace')) {
975 975
     remove_filter('comments_template', 'dsq_comments_template');
976 976
     add_filter('comments_template', 'dsq_comments_template', 100);
977
-    add_filter('pre_option_disqus_active', 'geodir_option_disqus_active',10,1);
977
+    add_filter('pre_option_disqus_active', 'geodir_option_disqus_active', 10, 1);
978 978
 }
979 979
 
980 980
 
@@ -987,11 +987,11 @@  discard block
 block discarded – undo
987 987
  * @param string $disqus_active Hook called before DB call for option so this is empty.
988 988
  * @return string `1` if active `0` if disabled.
989 989
  */
990
-function geodir_option_disqus_active($disqus_active){
990
+function geodir_option_disqus_active($disqus_active) {
991 991
     global $post;
992 992
     $all_postypes = geodir_get_posttypes();
993 993
 
994
-    if(isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type,$all_postypes)){
994
+    if (isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type, $all_postypes)) {
995 995
         $disqus_active = '0';
996 996
     }
997 997
 
Please login to merge, or discard this patch.
Indentation   +421 added lines, -421 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
  */
32 32
 function geodir_comment_meta_row_action($a)
33 33
 {
34
-    global $comment;
35
-
36
-    $rating = geodir_get_commentoverall($comment->comment_ID);
37
-    if ($rating != 0) {
38
-        //echo '<div class="gd_rating_show" data-average="'.$rating.'" data-id="'.$comment->comment_ID.'"></div>';
39
-        echo geodir_get_rating_stars($rating, $comment->comment_ID);
40
-    }
41
-    return $a;
34
+	global $comment;
35
+
36
+	$rating = geodir_get_commentoverall($comment->comment_ID);
37
+	if ($rating != 0) {
38
+		//echo '<div class="gd_rating_show" data-average="'.$rating.'" data-id="'.$comment->comment_ID.'"></div>';
39
+		echo geodir_get_rating_stars($rating, $comment->comment_ID);
40
+	}
41
+	return $a;
42 42
 }
43 43
 
44 44
 add_action('add_meta_boxes_comment', 'geodir_comment_add_meta_box');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
  */
54 54
 function geodir_comment_add_meta_box($comment)
55 55
 {
56
-    add_meta_box('gd-comment-rating', __('Comment Rating', 'geodirectory'), 'geodir_comment_rating_meta', 'comment', 'normal', 'high');
56
+	add_meta_box('gd-comment-rating', __('Comment Rating', 'geodirectory'), 'geodir_comment_rating_meta', 'comment', 'normal', 'high');
57 57
 }
58 58
 
59 59
 /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
  */
68 68
 function geodir_comment_rating_meta($comment)
69 69
 {
70
-    $post_type = get_post_type($comment->comment_post_ID);
70
+	$post_type = get_post_type($comment->comment_post_ID);
71 71
 	if (in_array($post_type, (array)geodir_get_posttypes()) && (int)$comment->comment_parent == 0) {
72 72
 		$rating = geodir_get_commentoverall($comment->comment_ID);
73 73
 		
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
  */
108 108
 function geodir_comment_rating_fields()
109 109
 {
110
-    global $post;
110
+	global $post;
111 111
 
112
-    $post_types = geodir_get_posttypes();
112
+	$post_types = geodir_get_posttypes();
113 113
 
114
-    if (in_array($post->post_type, $post_types)) {
115
-        $star_texts = array();
114
+	if (in_array($post->post_type, $post_types)) {
115
+		$star_texts = array();
116 116
 		$star_texts[] = __('Terrible', 'geodirectory');
117 117
 		$star_texts[] = __('Poor', 'geodirectory');
118 118
 		$star_texts[] = __('Average', 'geodirectory');
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
 		$star_texts[] = __('Excellent', 'geodirectory');
121 121
 		
122 122
 		$gd_rating_html = apply_filters('gd_rating_form_html', '<div class="gd_rating" data-average="0" data-id="5"></div>', $star_texts);
123
-        echo $gd_rating_html;
124
-        ?>
123
+		echo $gd_rating_html;
124
+		?>
125 125
         <input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="0"/><?php
126
-    }
126
+	}
127 127
 }
128 128
 
129 129
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 function geodir_comment_replaylink($link)
140 140
 {
141 141
 
142
-    $link = '<div class="gd_comment_replaylink">' . $link . '</div>';
142
+	$link = '<div class="gd_comment_replaylink">' . $link . '</div>';
143 143
 
144
-    return $link;
144
+	return $link;
145 145
 }
146 146
 
147 147
 add_filter('cancel_comment_reply_link', 'geodir_cancle_replaylink');
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 function geodir_cancle_replaylink($link)
157 157
 {
158 158
 
159
-    $link = '<span class="gd-cancel-replaylink">' . $link . '</span>';
159
+	$link = '<span class="gd-cancel-replaylink">' . $link . '</span>';
160 160
 
161
-    return $link;
161
+	return $link;
162 162
 }
163 163
 
164 164
 add_action('comment_post', 'geodir_save_rating');
@@ -174,32 +174,32 @@  discard block
 block discarded – undo
174 174
  */
175 175
 function geodir_save_rating($comment = 0)
176 176
 {
177
-    global $wpdb, $user_ID, $plugin_prefix;
177
+	global $wpdb, $user_ID, $plugin_prefix;
178 178
 
179
-    $comment_info = get_comment($comment);
179
+	$comment_info = get_comment($comment);
180 180
 
181
-    $post_id = $comment_info->comment_post_ID;
182
-    $status = $comment_info->comment_approved;
183
-    $rating_ip = getenv("REMOTE_ADDR");
181
+	$post_id = $comment_info->comment_post_ID;
182
+	$status = $comment_info->comment_approved;
183
+	$rating_ip = getenv("REMOTE_ADDR");
184 184
 	
185
-    $post = geodir_get_post_info($post_id);
186
-    if (empty($post)) {
187
-        return;
188
-    }
189
-
190
-    if ($post->post_status == 'publish') {
191
-        $post_status = '1';
192
-    } else {
193
-        $post_status = '0';
194
-    }
185
+	$post = geodir_get_post_info($post_id);
186
+	if (empty($post)) {
187
+		return;
188
+	}
189
+
190
+	if ($post->post_status == 'publish') {
191
+		$post_status = '1';
192
+	} else {
193
+		$post_status = '0';
194
+	}
195 195
 	
196
-    if (isset($_REQUEST['geodir_overallrating'])) {
197
-        $overall_rating = $_REQUEST['geodir_overallrating'];
196
+	if (isset($_REQUEST['geodir_overallrating'])) {
197
+		$overall_rating = $_REQUEST['geodir_overallrating'];
198 198
         
199 199
 		if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) {
200
-            $overall_rating = $overall_rating > 0 ? $overall_rating : '0';
200
+			$overall_rating = $overall_rating > 0 ? $overall_rating : '0';
201 201
 
202
-            $sqlqry = $wpdb->prepare("INSERT INTO " . GEODIR_REVIEW_TABLE . " SET
202
+			$sqlqry = $wpdb->prepare("INSERT INTO " . GEODIR_REVIEW_TABLE . " SET
203 203
 					post_id		= %d,
204 204
 					post_type = %s,
205 205
 					post_title	= %s,
@@ -217,35 +217,35 @@  discard block
 block discarded – undo
217 217
 					post_latitude	= %s,
218 218
 					comment_content	= %s 
219 219
 					",
220
-                array($post_id, $post->post_type, $post->post_title, $user_ID, $comment, $rating_ip, $overall_rating, $status, $post_status, date_i18n('Y-m-d H:i:s', current_time('timestamp')), $post->post_city, $post->post_region, $post->post_country, $post->post_latitude, $post->post_longitude, $comment_info->comment_content)
221
-            );
222
-
223
-            $wpdb->query($sqlqry);
224
-
225
-            /**
226
-             * Called after saving the comment.
227
-             *
228
-             * @since 1.0.0
229
-             * @package GeoDirectory
230
-             * @param array $_REQUEST {
231
-             *    Attributes of the $_REQUEST variable.
232
-             *
233
-             *    @type string $geodir_overallrating Overall rating.
234
-             *    @type string $comment Comment text.
235
-             *    @type string $submit Submit button text.
236
-             *    @type string $comment_post_ID Comment post ID.
237
-             *    @type string $comment_parent Comment Parent ID.
238
-             *    @type string $_wp_unfiltered_html_comment Unfiltered html comment string.
239
-             *
240
-             * }
241
-             */
242
-            do_action('geodir_after_save_comment', $_REQUEST, 'Comment Your Post');
243
-
244
-            if ($status) {
245
-                geodir_update_postrating($post_id);
246
-            }
247
-        }
248
-    }
220
+				array($post_id, $post->post_type, $post->post_title, $user_ID, $comment, $rating_ip, $overall_rating, $status, $post_status, date_i18n('Y-m-d H:i:s', current_time('timestamp')), $post->post_city, $post->post_region, $post->post_country, $post->post_latitude, $post->post_longitude, $comment_info->comment_content)
221
+			);
222
+
223
+			$wpdb->query($sqlqry);
224
+
225
+			/**
226
+			 * Called after saving the comment.
227
+			 *
228
+			 * @since 1.0.0
229
+			 * @package GeoDirectory
230
+			 * @param array $_REQUEST {
231
+			 *    Attributes of the $_REQUEST variable.
232
+			 *
233
+			 *    @type string $geodir_overallrating Overall rating.
234
+			 *    @type string $comment Comment text.
235
+			 *    @type string $submit Submit button text.
236
+			 *    @type string $comment_post_ID Comment post ID.
237
+			 *    @type string $comment_parent Comment Parent ID.
238
+			 *    @type string $_wp_unfiltered_html_comment Unfiltered html comment string.
239
+			 *
240
+			 * }
241
+			 */
242
+			do_action('geodir_after_save_comment', $_REQUEST, 'Comment Your Post');
243
+
244
+			if ($status) {
245
+				geodir_update_postrating($post_id);
246
+			}
247
+		}
248
+	}
249 249
 }
250 250
 
251 251
 
@@ -263,51 +263,51 @@  discard block
 block discarded – undo
263 263
  */
264 264
 function geodir_update_rating_status_change($comment_id, $status)
265 265
 {
266
-    if ($status == 'delete') {
267
-        return;
268
-    }
269
-    global $wpdb, $plugin_prefix, $user_ID;
266
+	if ($status == 'delete') {
267
+		return;
268
+	}
269
+	global $wpdb, $plugin_prefix, $user_ID;
270 270
 
271
-    $comment_info = get_comment($comment_id);
271
+	$comment_info = get_comment($comment_id);
272 272
 
273
-    $post_id = isset($comment_info->comment_post_ID) ? $comment_info->comment_post_ID : '';
273
+	$post_id = isset($comment_info->comment_post_ID) ? $comment_info->comment_post_ID : '';
274 274
 
275
-    if (!empty($comment_info))
276
-        $status = $comment_info->comment_approved;
275
+	if (!empty($comment_info))
276
+		$status = $comment_info->comment_approved;
277 277
 
278
-    if ($status == 'approve' || $status == 1) {
279
-        $status = 1;
280
-    } else {
281
-        $status = 0;
282
-    }
278
+	if ($status == 'approve' || $status == 1) {
279
+		$status = 1;
280
+	} else {
281
+		$status = 0;
282
+	}
283 283
 
284
-    $comment_info_ID = isset($comment_info->comment_ID) ? $comment_info->comment_ID : '';
285
-    $old_rating = geodir_get_commentoverall($comment_info_ID);
284
+	$comment_info_ID = isset($comment_info->comment_ID) ? $comment_info->comment_ID : '';
285
+	$old_rating = geodir_get_commentoverall($comment_info_ID);
286 286
 
287
-    $post_type = get_post_type($post_id);
287
+	$post_type = get_post_type($post_id);
288 288
 
289
-    $detail_table = $plugin_prefix . $post_type . '_detail';
289
+	$detail_table = $plugin_prefix . $post_type . '_detail';
290 290
 
291
-    if ($comment_id) {
291
+	if ($comment_id) {
292 292
 
293
-        $overall_rating = $old_rating;
293
+		$overall_rating = $old_rating;
294 294
 
295
-        if (isset($old_rating)) {
295
+		if (isset($old_rating)) {
296 296
 
297
-            $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET
297
+			$sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET
298 298
 						overall_rating = %f,
299 299
 						status		= %s,
300 300
 						comment_content = %s 
301 301
 						WHERE comment_id = %d ", array($overall_rating, $status, $comment_info->comment_content, $comment_id));
302 302
 
303
-            $wpdb->query($sqlqry);
303
+			$wpdb->query($sqlqry);
304 304
 
305
-            //update rating
306
-            geodir_update_postrating($post_id, $post_type);
305
+			//update rating
306
+			geodir_update_postrating($post_id, $post_type);
307 307
 
308
-        }
308
+		}
309 309
 
310
-    }
310
+	}
311 311
 
312 312
 }
313 313
 
@@ -326,41 +326,41 @@  discard block
 block discarded – undo
326 326
 function geodir_update_rating($comment_id = 0)
327 327
 {
328 328
 
329
-    global $wpdb, $plugin_prefix, $user_ID;
329
+	global $wpdb, $plugin_prefix, $user_ID;
330 330
 
331
-    $comment_info = get_comment($comment_id);
331
+	$comment_info = get_comment($comment_id);
332 332
 
333
-    $post_id = $comment_info->comment_post_ID;
334
-    $status = $comment_info->comment_approved;
335
-    $old_rating = geodir_get_commentoverall($comment_info->comment_ID);
333
+	$post_id = $comment_info->comment_post_ID;
334
+	$status = $comment_info->comment_approved;
335
+	$old_rating = geodir_get_commentoverall($comment_info->comment_ID);
336 336
 
337
-    $post_type = get_post_type($post_id);
337
+	$post_type = get_post_type($post_id);
338 338
 
339
-    $detail_table = $plugin_prefix . $post_type . '_detail';
339
+	$detail_table = $plugin_prefix . $post_type . '_detail';
340 340
 
341
-    if (isset($_REQUEST['geodir_overallrating'])) {
341
+	if (isset($_REQUEST['geodir_overallrating'])) {
342 342
 
343
-        $overall_rating = $_REQUEST['geodir_overallrating'];
343
+		$overall_rating = $_REQUEST['geodir_overallrating'];
344 344
 
345
-        if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) {
346
-            $overall_rating = $overall_rating > 0 ? $overall_rating : '0';
345
+		if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) {
346
+			$overall_rating = $overall_rating > 0 ? $overall_rating : '0';
347 347
 
348
-            if (isset($old_rating)) {
348
+			if (isset($old_rating)) {
349 349
 
350
-                $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET
350
+				$sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET
351 351
 						overall_rating = %f,
352 352
 						status		= %s,
353 353
 						comment_content	= %s 
354 354
 						WHERE comment_id = %d ", array($overall_rating, $status, $comment_info->comment_content, $comment_id));
355 355
 
356
-                $wpdb->query($sqlqry);
356
+				$wpdb->query($sqlqry);
357 357
 
358
-                //update rating
359
-                geodir_update_postrating($post_id, $post_type);
358
+				//update rating
359
+				geodir_update_postrating($post_id, $post_type);
360 360
 
361
-            }
362
-        }
363
-    }
361
+			}
362
+		}
363
+	}
364 364
 
365 365
 
366 366
 }
@@ -376,19 +376,19 @@  discard block
 block discarded – undo
376 376
  */
377 377
 function geodir_comment_delete_comment($comment_id)
378 378
 {
379
-    global $wpdb;
379
+	global $wpdb;
380 380
 
381
-    $review_info = geodir_get_review($comment_id);
382
-    if ($review_info) {
383
-        geodir_update_postrating($review_info->post_id);
384
-    }
381
+	$review_info = geodir_get_review($comment_id);
382
+	if ($review_info) {
383
+		geodir_update_postrating($review_info->post_id);
384
+	}
385 385
 
386
-    $wpdb->query(
387
-        $wpdb->prepare(
388
-            "DELETE FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id=%d",
389
-            array($comment_id)
390
-        )
391
-    );
386
+	$wpdb->query(
387
+		$wpdb->prepare(
388
+			"DELETE FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id=%d",
389
+			array($comment_id)
390
+		)
391
+	);
392 392
 
393 393
 }
394 394
 
@@ -404,13 +404,13 @@  discard block
 block discarded – undo
404 404
  */
405 405
 function geodir_wrap_comment_text($content, $comment = '')
406 406
 {
407
-    $rating = 0;
408
-    if (!empty($comment))
409
-        $rating = geodir_get_commentoverall($comment->comment_ID);
410
-    if ($rating != 0 && !is_admin()) {
411
-        return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>';
412
-    } else
413
-        return $content;
407
+	$rating = 0;
408
+	if (!empty($comment))
409
+		$rating = geodir_get_commentoverall($comment->comment_ID);
410
+	if ($rating != 0 && !is_admin()) {
411
+		return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>';
412
+	} else
413
+		return $content;
414 414
 
415 415
 }
416 416
 
@@ -428,41 +428,41 @@  discard block
 block discarded – undo
428 428
  */
429 429
 function geodir_update_postrating($post_id = 0, $post_type = '', $delete = false)
430 430
 {
431
-    global $wpdb, $plugin_prefix, $comment;
432
-    if (!$post_type) {
433
-        $post_type = get_post_type($post_id);
434
-    }
435
-    $detail_table = $plugin_prefix . $post_type . '_detail';
436
-    $post_newrating = geodir_get_post_rating($post_id, 1);
437
-    $post_newrating_count = geodir_get_review_count_total($post_id);
431
+	global $wpdb, $plugin_prefix, $comment;
432
+	if (!$post_type) {
433
+		$post_type = get_post_type($post_id);
434
+	}
435
+	$detail_table = $plugin_prefix . $post_type . '_detail';
436
+	$post_newrating = geodir_get_post_rating($post_id, 1);
437
+	$post_newrating_count = geodir_get_review_count_total($post_id);
438 438
 
439 439
 
440
-    //$post_newrating = ( (float)$post_oldrating - (float)$old_rating ) + (float)$overall_rating ;
440
+	//$post_newrating = ( (float)$post_oldrating - (float)$old_rating ) + (float)$overall_rating ;
441 441
 
442
-    if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) {
442
+	if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) {
443 443
 
444
-        $wpdb->query(
445
-            $wpdb->prepare(
446
-                "UPDATE " . $detail_table . " SET
444
+		$wpdb->query(
445
+			$wpdb->prepare(
446
+				"UPDATE " . $detail_table . " SET
447 447
 						overall_rating = %f,
448 448
 						rating_count = %f
449 449
 						where post_id = %d",
450
-                array($post_newrating, $post_newrating_count, $post_id)
451
-            )
452
-        );
453
-
454
-        update_post_meta($post_id, 'overall_rating', $post_newrating);
455
-        update_post_meta($post_id, 'rating_count', $post_newrating_count);
456
-    }
457
-    /**
458
-     * Called after Updating post overall rating and rating count.
459
-     *
460
-     * @since 1.0.0
461
-     * @since 1.4.3 Added `$post_id` param.
462
-     * @package GeoDirectory
463
-     * @param int $post_id The post ID.
464
-     */
465
-    do_action('geodir_update_postrating',$post_id);
450
+				array($post_newrating, $post_newrating_count, $post_id)
451
+			)
452
+		);
453
+
454
+		update_post_meta($post_id, 'overall_rating', $post_newrating);
455
+		update_post_meta($post_id, 'rating_count', $post_newrating_count);
456
+	}
457
+	/**
458
+	 * Called after Updating post overall rating and rating count.
459
+	 *
460
+	 * @since 1.0.0
461
+	 * @since 1.4.3 Added `$post_id` param.
462
+	 * @package GeoDirectory
463
+	 * @param int $post_id The post ID.
464
+	 */
465
+	do_action('geodir_update_postrating',$post_id);
466 466
 
467 467
 }
468 468
 
@@ -480,29 +480,29 @@  discard block
 block discarded – undo
480 480
  */
481 481
 function geodir_get_postoverall($post_id = 0)
482 482
 {
483
-    global $wpdb, $plugin_prefix;
483
+	global $wpdb, $plugin_prefix;
484 484
 
485
-    $post_type = get_post_type($post_id);
486
-    $detail_table = $plugin_prefix . $post_type . '_detail';
485
+	$post_type = get_post_type($post_id);
486
+	$detail_table = $plugin_prefix . $post_type . '_detail';
487 487
 
488
-    if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) {
488
+	if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) {
489 489
 
490
-        $post_ratings = $wpdb->get_var(
491
-            $wpdb->prepare(
492
-                "SELECT overall_rating FROM " . $detail_table . " WHERE post_id = %d",
493
-                array($post_id)
494
-            )
495
-        );
490
+		$post_ratings = $wpdb->get_var(
491
+			$wpdb->prepare(
492
+				"SELECT overall_rating FROM " . $detail_table . " WHERE post_id = %d",
493
+				array($post_id)
494
+			)
495
+		);
496 496
 
497 497
 
498
-    } else {
499
-        $post_ratings = get_post_meta($post_id, 'overall_rating');
500
-    }
498
+	} else {
499
+		$post_ratings = get_post_meta($post_id, 'overall_rating');
500
+	}
501 501
 
502
-    if ($post_ratings)
503
-        return $post_ratings;
504
-    else
505
-        return false;
502
+	if ($post_ratings)
503
+		return $post_ratings;
504
+	else
505
+		return false;
506 506
 }
507 507
 
508 508
 
@@ -519,19 +519,19 @@  discard block
 block discarded – undo
519 519
  */
520 520
 function geodir_get_review($comment_id = 0)
521 521
 {
522
-    global $wpdb;
523
-
524
-    $reatings = $wpdb->get_row(
525
-        $wpdb->prepare(
526
-            "SELECT * FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
527
-            array($comment_id)
528
-        )
529
-    );
530
-
531
-    if (!empty($reatings))
532
-        return $reatings;
533
-    else
534
-        return false;
522
+	global $wpdb;
523
+
524
+	$reatings = $wpdb->get_row(
525
+		$wpdb->prepare(
526
+			"SELECT * FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
527
+			array($comment_id)
528
+		)
529
+	);
530
+
531
+	if (!empty($reatings))
532
+		return $reatings;
533
+	else
534
+		return false;
535 535
 }
536 536
 
537 537
 /**
@@ -547,19 +547,19 @@  discard block
 block discarded – undo
547 547
  */
548 548
 function geodir_get_review_total($post_id = 0)
549 549
 {
550
-    global $wpdb;
551
-
552
-    $results = $wpdb->get_var(
553
-        $wpdb->prepare(
554
-            "SELECT SUM(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
555
-            array($post_id)
556
-        )
557
-    );
558
-
559
-    if (!empty($results))
560
-        return $results;
561
-    else
562
-        return false;
550
+	global $wpdb;
551
+
552
+	$results = $wpdb->get_var(
553
+		$wpdb->prepare(
554
+			"SELECT SUM(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
555
+			array($post_id)
556
+		)
557
+	);
558
+
559
+	if (!empty($results))
560
+		return $results;
561
+	else
562
+		return false;
563 563
 }
564 564
 
565 565
 /**
@@ -575,18 +575,18 @@  discard block
 block discarded – undo
575 575
  */
576 576
 function geodir_get_review_count_by_user_id($user_id = 0)
577 577
 {
578
-    global $wpdb;
579
-    $results = $wpdb->get_var(
580
-        $wpdb->prepare(
581
-            "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE user_id = %d AND status=1 AND overall_rating>0",
582
-            array($user_id)
583
-        )
584
-    );
585
-
586
-    if (!empty($results))
587
-        return $results;
588
-    else
589
-        return false;
578
+	global $wpdb;
579
+	$results = $wpdb->get_var(
580
+		$wpdb->prepare(
581
+			"SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE user_id = %d AND status=1 AND overall_rating>0",
582
+			array($user_id)
583
+		)
584
+	);
585
+
586
+	if (!empty($results))
587
+		return $results;
588
+	else
589
+		return false;
590 590
 }
591 591
 
592 592
 /**
@@ -604,27 +604,27 @@  discard block
 block discarded – undo
604 604
  */
605 605
 function geodir_get_post_rating($post_id = 0, $force_query = 0)
606 606
 {
607
-    global $wpdb, $post;
608
-
609
-    if (isset($post->ID) && $post->ID == $post_id && !$force_query) {
610
-        if (isset($post->rating_count) && $post->rating_count > 0 && isset($post->overall_rating) && $post->overall_rating > 0) {
611
-            return $post->overall_rating;
612
-        } else {
613
-            return 0;
614
-        }
615
-    }
616
-
617
-    $results = $wpdb->get_var(
618
-        $wpdb->prepare(
619
-            "SELECT COALESCE(avg(overall_rating),0) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
620
-            array($post_id)
621
-        )
622
-    );
623
-
624
-    if (!empty($results))
625
-        return $results;
626
-    else
627
-        return false;
607
+	global $wpdb, $post;
608
+
609
+	if (isset($post->ID) && $post->ID == $post_id && !$force_query) {
610
+		if (isset($post->rating_count) && $post->rating_count > 0 && isset($post->overall_rating) && $post->overall_rating > 0) {
611
+			return $post->overall_rating;
612
+		} else {
613
+			return 0;
614
+		}
615
+	}
616
+
617
+	$results = $wpdb->get_var(
618
+		$wpdb->prepare(
619
+			"SELECT COALESCE(avg(overall_rating),0) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
620
+			array($post_id)
621
+		)
622
+	);
623
+
624
+	if (!empty($results))
625
+		return $results;
626
+	else
627
+		return false;
628 628
 }
629 629
 
630 630
 /**
@@ -640,19 +640,19 @@  discard block
 block discarded – undo
640 640
  */
641 641
 function geodir_get_review_count_total($post_id = 0)
642 642
 {
643
-    global $wpdb;
644
-
645
-    $results = $wpdb->get_var(
646
-        $wpdb->prepare(
647
-            "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
648
-            array($post_id)
649
-        )
650
-    );
651
-
652
-    if (!empty($results))
653
-        return $results;
654
-    else
655
-        return false;
643
+	global $wpdb;
644
+
645
+	$results = $wpdb->get_var(
646
+		$wpdb->prepare(
647
+			"SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
648
+			array($post_id)
649
+		)
650
+	);
651
+
652
+	if (!empty($results))
653
+		return $results;
654
+	else
655
+		return false;
656 656
 }
657 657
 
658 658
 /**
@@ -669,20 +669,20 @@  discard block
 block discarded – undo
669 669
  */
670 670
 function geodir_get_comments_number($post_id = 0)
671 671
 {
672
-    global $wpdb;
672
+	global $wpdb;
673 673
 
674
-    $results = $wpdb->get_var(
675
-        $wpdb->prepare(
676
-            "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
677
-            array($post_id)
678
-        )
679
-    );
674
+	$results = $wpdb->get_var(
675
+		$wpdb->prepare(
676
+			"SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0",
677
+			array($post_id)
678
+		)
679
+	);
680 680
 
681 681
 
682
-    if (!empty($results))
683
-        return $results;
684
-    else
685
-        return false;
682
+	if (!empty($results))
683
+		return $results;
684
+	else
685
+		return false;
686 686
 }
687 687
 
688 688
 /**
@@ -698,19 +698,19 @@  discard block
 block discarded – undo
698 698
  */
699 699
 function geodir_get_commentoverall($comment_id = 0)
700 700
 {
701
-    global $wpdb;
702
-
703
-    $reatings = $wpdb->get_var(
704
-        $wpdb->prepare(
705
-            "SELECT overall_rating FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
706
-            array($comment_id)
707
-        )
708
-    );
709
-
710
-    if ($reatings)
711
-        return $reatings;
712
-    else
713
-        return false;
701
+	global $wpdb;
702
+
703
+	$reatings = $wpdb->get_var(
704
+		$wpdb->prepare(
705
+			"SELECT overall_rating FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d",
706
+			array($comment_id)
707
+		)
708
+	);
709
+
710
+	if ($reatings)
711
+		return $reatings;
712
+	else
713
+		return false;
714 714
 }
715 715
 
716 716
 /**
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
  */
725 725
 function geodir_get_commentoverall_number($post_id = 0)
726 726
 {
727
-    return geodir_get_post_rating($post_id);
727
+	return geodir_get_post_rating($post_id);
728 728
 }
729 729
 
730 730
 
@@ -742,98 +742,98 @@  discard block
 block discarded – undo
742 742
  */
743 743
 function geodir_comment_template($comment_template)
744 744
 {
745
-    global $post;
746
-
747
-    $post_types = geodir_get_posttypes();
748
-
749
-    if (!(is_singular() && (have_comments() || (isset($post->comment_status) && 'open' == $post->comment_status)))) {
750
-        return;
751
-    }
752
-    if (in_array($post->post_type, $post_types)) { // assuming there is a post type called business
753
-        $template = locate_template(array("geodirectory/reviews.php")); // Use theme template if available
754
-        if (!$template) {
755
-            $template = dirname(__FILE__) . '/reviews.php';
756
-        }
757
-        return $template;
758
-    }
745
+	global $post;
746
+
747
+	$post_types = geodir_get_posttypes();
748
+
749
+	if (!(is_singular() && (have_comments() || (isset($post->comment_status) && 'open' == $post->comment_status)))) {
750
+		return;
751
+	}
752
+	if (in_array($post->post_type, $post_types)) { // assuming there is a post type called business
753
+		$template = locate_template(array("geodirectory/reviews.php")); // Use theme template if available
754
+		if (!$template) {
755
+			$template = dirname(__FILE__) . '/reviews.php';
756
+		}
757
+		return $template;
758
+	}
759 759
 }
760 760
 
761 761
 add_filter("comments_template", "geodir_comment_template");
762 762
 
763 763
 
764 764
 if (!function_exists('geodir_comment')) {
765
-    /**
766
-     * Comment HTML markup.
767
-     *
768
-     * @since 1.0.0
769
-     * @package GeoDirectory
770
-     * @global object $post The current post object.
771
-     * @param object $comment The comment object.
772
-     * @param string|array $args {
773
-     *     Optional. Formatting options.
774
-     *
775
-     *     @type object $walker            Instance of a Walker class to list comments. Default null.
776
-     *     @type int    $max_depth         The maximum comments depth. Default empty.
777
-     *     @type string $style             The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'.
778
-     *     @type string $callback          Callback function to use. Default null.
779
-     *     @type string $end-callback      Callback function to use at the end. Default null.
780
-     *     @type string $type              Type of comments to list.
781
-     *                                     Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'.
782
-     *     @type int    $page              Page ID to list comments for. Default empty.
783
-     *     @type int    $per_page          Number of comments to list per page. Default empty.
784
-     *     @type int    $avatar_size       Height and width dimensions of the avatar size. Default 32.
785
-     *     @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'.
786
-     *     @type bool   $reverse_children  Whether to reverse child comments in the list. Default null.
787
-     *     @type string $format            How to format the comments list.
788
-     *                                     Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'.
789
-     *     @type bool   $short_ping        Whether to output short pings. Default false.
790
-     *     @type bool   $echo              Whether to echo the output or return it. Default true.
791
-     * }
792
-     * @param int $depth Depth of comment.
793
-     */
794
-    function geodir_comment($comment, $args, $depth)
795
-    {
796
-        $GLOBALS['comment'] = $comment;
797
-        switch ($comment->comment_type) :
798
-            case 'pingback' :
799
-            case 'trackback' :
800
-                // Display trackbacks differently than normal comments.
801
-                ?>
765
+	/**
766
+	 * Comment HTML markup.
767
+	 *
768
+	 * @since 1.0.0
769
+	 * @package GeoDirectory
770
+	 * @global object $post The current post object.
771
+	 * @param object $comment The comment object.
772
+	 * @param string|array $args {
773
+	 *     Optional. Formatting options.
774
+	 *
775
+	 *     @type object $walker            Instance of a Walker class to list comments. Default null.
776
+	 *     @type int    $max_depth         The maximum comments depth. Default empty.
777
+	 *     @type string $style             The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'.
778
+	 *     @type string $callback          Callback function to use. Default null.
779
+	 *     @type string $end-callback      Callback function to use at the end. Default null.
780
+	 *     @type string $type              Type of comments to list.
781
+	 *                                     Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'.
782
+	 *     @type int    $page              Page ID to list comments for. Default empty.
783
+	 *     @type int    $per_page          Number of comments to list per page. Default empty.
784
+	 *     @type int    $avatar_size       Height and width dimensions of the avatar size. Default 32.
785
+	 *     @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'.
786
+	 *     @type bool   $reverse_children  Whether to reverse child comments in the list. Default null.
787
+	 *     @type string $format            How to format the comments list.
788
+	 *                                     Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'.
789
+	 *     @type bool   $short_ping        Whether to output short pings. Default false.
790
+	 *     @type bool   $echo              Whether to echo the output or return it. Default true.
791
+	 * }
792
+	 * @param int $depth Depth of comment.
793
+	 */
794
+	function geodir_comment($comment, $args, $depth)
795
+	{
796
+		$GLOBALS['comment'] = $comment;
797
+		switch ($comment->comment_type) :
798
+			case 'pingback' :
799
+			case 'trackback' :
800
+				// Display trackbacks differently than normal comments.
801
+				?>
802 802
                 <li <?php comment_class('geodir-comment'); ?> id="comment-<?php comment_ID(); ?>">
803 803
                 <p><?php _e('Pingback:', 'geodirectory'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'geodirectory'), '<span class="edit-link">', '</span>'); ?></p>
804 804
                 <?php
805
-                break;
806
-            default :
807
-                // Proceed with normal comments.
808
-                global $post;
809
-                ?>
805
+				break;
806
+			default :
807
+				// Proceed with normal comments.
808
+				global $post;
809
+				?>
810 810
             <li <?php comment_class('geodir-comment'); ?> id="li-comment-<?php comment_ID(); ?>">
811 811
                 <article id="comment-<?php comment_ID(); ?>" class="comment">
812 812
                     <header class="comment-meta comment-author vcard">
813 813
                         <?php
814
-                        /**
815
-                         * Filter to modify comment avatar size
816
-                         *
817
-                         * You can use this filter to change comment avatar size.
818
-                         *
819
-                         * @since 1.0.0
820
-                         * @package GeoDirectory
821
-                         */
822
-                        $avatar_size = apply_filters('geodir_comment_avatar_size', 44);
823
-                        echo get_avatar($comment, $avatar_size);
824
-                        printf('<cite><b class="reviewer">%1$s</b> %2$s</cite>',
825
-                            get_comment_author_link(),
826
-                            // If current post author is also comment author, make it known visually.
827
-                            ($comment->user_id === $post->post_author) ? '<span>' . __('Post author', 'geodirectory') . '</span>' : ''
828
-                        );
829
-                        echo "<span class='item'><small><span class='fn'>$post->post_title</span></small></span>";
830
-                        printf('<a href="%1$s"><time datetime="%2$s" class="dtreviewed">%3$s<span class="value-title" title="%2$s"></span></time></a>',
831
-                            esc_url(get_comment_link($comment->comment_ID)),
832
-                            get_comment_time('c'),
833
-                            /* translators: 1: date, 2: time */
834
-                            sprintf(__('%1$s at %2$s', 'geodirectory'), get_comment_date(), get_comment_time())
835
-                        );
836
-                        ?>
814
+						/**
815
+						 * Filter to modify comment avatar size
816
+						 *
817
+						 * You can use this filter to change comment avatar size.
818
+						 *
819
+						 * @since 1.0.0
820
+						 * @package GeoDirectory
821
+						 */
822
+						$avatar_size = apply_filters('geodir_comment_avatar_size', 44);
823
+						echo get_avatar($comment, $avatar_size);
824
+						printf('<cite><b class="reviewer">%1$s</b> %2$s</cite>',
825
+							get_comment_author_link(),
826
+							// If current post author is also comment author, make it known visually.
827
+							($comment->user_id === $post->post_author) ? '<span>' . __('Post author', 'geodirectory') . '</span>' : ''
828
+						);
829
+						echo "<span class='item'><small><span class='fn'>$post->post_title</span></small></span>";
830
+						printf('<a href="%1$s"><time datetime="%2$s" class="dtreviewed">%3$s<span class="value-title" title="%2$s"></span></time></a>',
831
+							esc_url(get_comment_link($comment->comment_ID)),
832
+							get_comment_time('c'),
833
+							/* translators: 1: date, 2: time */
834
+							sprintf(__('%1$s at %2$s', 'geodirectory'), get_comment_date(), get_comment_time())
835
+						);
836
+						?>
837 837
                     </header>
838 838
                     <!-- .comment-meta -->
839 839
 
@@ -857,47 +857,47 @@  discard block
 block discarded – undo
857 857
                 </article>
858 858
                 <!-- #comment-## -->
859 859
                 <?php
860
-                break;
861
-        endswitch; // end comment_type check
862
-    }
860
+				break;
861
+		endswitch; // end comment_type check
862
+	}
863 863
 }
864 864
 
865 865
 
866 866
 add_filter('get_comments_number', 'geodir_fix_comment_count', 10, 2);
867 867
 if (!function_exists('geodir_fix_comment_count')) {
868
-    /**
869
-     * Fix comment count by not listing replies as reviews
870
-     *
871
-     * @since 1.0.0
872
-     * @package GeoDirectory
873
-     * @global object $post The current post object.
874
-     * @param int $count The comment count.
875
-     * @param int $post_id The post ID.
876
-     * @todo $post is unreachable since the function return the count before that variable.
877
-     * @return bool|null|string The comment count.
878
-     */
879
-    function geodir_fix_comment_count($count, $post_id)
880
-    {
881
-        if (!is_admin() || strpos($_SERVER['REQUEST_URI'], 'admin-ajax.php')) {
882
-            global $post;
883
-            $post_types = geodir_get_posttypes();
884
-
885
-            if (in_array(get_post_type($post_id), $post_types)) {
886
-                $review_count = geodir_get_review_count_total($post_id);
887
-                return $review_count;
888
-
889
-                if ($post && isset($post->rating_count)) {
890
-                    return $post->rating_count;
891
-                } else {
892
-                    return geodir_get_comments_number($post_id);
893
-                }
894
-            } else {
895
-                return $count;
896
-            }
897
-        } else {
898
-            return $count;
899
-        }
900
-    }
868
+	/**
869
+	 * Fix comment count by not listing replies as reviews
870
+	 *
871
+	 * @since 1.0.0
872
+	 * @package GeoDirectory
873
+	 * @global object $post The current post object.
874
+	 * @param int $count The comment count.
875
+	 * @param int $post_id The post ID.
876
+	 * @todo $post is unreachable since the function return the count before that variable.
877
+	 * @return bool|null|string The comment count.
878
+	 */
879
+	function geodir_fix_comment_count($count, $post_id)
880
+	{
881
+		if (!is_admin() || strpos($_SERVER['REQUEST_URI'], 'admin-ajax.php')) {
882
+			global $post;
883
+			$post_types = geodir_get_posttypes();
884
+
885
+			if (in_array(get_post_type($post_id), $post_types)) {
886
+				$review_count = geodir_get_review_count_total($post_id);
887
+				return $review_count;
888
+
889
+				if ($post && isset($post->rating_count)) {
890
+					return $post->rating_count;
891
+				} else {
892
+					return geodir_get_comments_number($post_id);
893
+				}
894
+			} else {
895
+				return $count;
896
+			}
897
+		} else {
898
+			return $count;
899
+		}
900
+	}
901 901
 }
902 902
 
903 903
 /**
@@ -914,11 +914,11 @@  discard block
 block discarded – undo
914 914
  */
915 915
 function geodir_get_rating_stars($rating, $post_id, $small = false)
916 916
 {
917
-    $a_rating = $rating / 5 * 100;
917
+	$a_rating = $rating / 5 * 100;
918 918
 
919
-    if ($small) {
920
-        $r_html = '<div class="rating"><div class="gd_rating_map" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingColor" ></div><div class="geodir_RatingAverage_small" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star_small"></div></div></div>';
921
-    } else {
919
+	if ($small) {
920
+		$r_html = '<div class="rating"><div class="gd_rating_map" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingColor" ></div><div class="geodir_RatingAverage_small" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star_small"></div></div></div>';
921
+	} else {
922 922
 		if (function_exists('geodir_reviewrating_draw_overall_rating')) {
923 923
 			// Show rating stars from review rating manager
924 924
 			$r_html = geodir_reviewrating_draw_overall_rating($rating);
@@ -936,8 +936,8 @@  discard block
 block discarded – undo
936 936
 			}
937 937
 			$r_html = '<div class="geodir-rating" style="' . $attach_style . '"><div class="gd_rating_show" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingAverage" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star">' . $rating_img . $rating_img . $rating_img . $rating_img . $rating_img . '</div></div></div>';
938 938
 		}
939
-    }
940
-    return apply_filters('geodir_get_rating_stars_html', $r_html, $rating, 5);
939
+	}
940
+	return apply_filters('geodir_get_rating_stars_html', $r_html, $rating, 5);
941 941
 }
942 942
 
943 943
 /**
@@ -951,23 +951,23 @@  discard block
 block discarded – undo
951 951
 function geodir_is_reviews_show($pageview = '')
952 952
 {
953 953
 
954
-    $active_tabs = get_option('geodir_detail_page_tabs_excluded');
955
-
956
-    $is_display = true;
957
-    if (!empty($active_tabs) && in_array('reviews', $active_tabs))
958
-        $is_display = false;
959
-
960
-    /**
961
-     * Filter to change display value.
962
-     *
963
-     * You can use this filter to change the is_display value.
964
-     *
965
-     * @since 1.0.0
966
-     * @package GeoDirectory
967
-     * @param bool $is_display Display ratings when set to true.
968
-     * @param string $pageview The view template. Ex: listview, gridview etc.
969
-     */
970
-    return apply_filters('geodir_is_reviews_show', $is_display, $pageview);
954
+	$active_tabs = get_option('geodir_detail_page_tabs_excluded');
955
+
956
+	$is_display = true;
957
+	if (!empty($active_tabs) && in_array('reviews', $active_tabs))
958
+		$is_display = false;
959
+
960
+	/**
961
+	 * Filter to change display value.
962
+	 *
963
+	 * You can use this filter to change the is_display value.
964
+	 *
965
+	 * @since 1.0.0
966
+	 * @package GeoDirectory
967
+	 * @param bool $is_display Display ratings when set to true.
968
+	 * @param string $pageview The view template. Ex: listview, gridview etc.
969
+	 */
970
+	return apply_filters('geodir_is_reviews_show', $is_display, $pageview);
971 971
 }
972 972
 
973 973
 
@@ -975,9 +975,9 @@  discard block
 block discarded – undo
975 975
  * If Disqus plugin is active, do some fixes to show on blogs but no on GD post types
976 976
  */
977 977
 if(function_exists('dsq_can_replace')) {
978
-    remove_filter('comments_template', 'dsq_comments_template');
979
-    add_filter('comments_template', 'dsq_comments_template', 100);
980
-    add_filter('pre_option_disqus_active', 'geodir_option_disqus_active',10,1);
978
+	remove_filter('comments_template', 'dsq_comments_template');
979
+	add_filter('comments_template', 'dsq_comments_template', 100);
980
+	add_filter('pre_option_disqus_active', 'geodir_option_disqus_active',10,1);
981 981
 }
982 982
 
983 983
 
@@ -991,13 +991,13 @@  discard block
 block discarded – undo
991 991
  * @return string `1` if active `0` if disabled.
992 992
  */
993 993
 function geodir_option_disqus_active($disqus_active){
994
-    global $post;
995
-    $all_postypes = geodir_get_posttypes();
994
+	global $post;
995
+	$all_postypes = geodir_get_posttypes();
996 996
 
997
-    if(isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type,$all_postypes)){
998
-        $disqus_active = '0';
999
-    }
997
+	if(isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type,$all_postypes)){
998
+		$disqus_active = '0';
999
+	}
1000 1000
 
1001
-    return $disqus_active;
1001
+	return $disqus_active;
1002 1002
 }
1003 1003
 
Please login to merge, or discard this patch.
geodirectory-functions/map-functions/get_markers.php 3 patches
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -107,11 +107,13 @@  discard block
 block discarded – undo
107 107
         }
108 108
     }
109 109
 
110
-    if (!empty($field_default_cat))
111
-        $field_default_cat = '';
110
+    if (!empty($field_default_cat)) {
111
+            $field_default_cat = '';
112
+    }
112 113
 
113
-    if (!empty($cat_find_array))
114
-        $search .= "AND (" . implode(' OR ', $cat_find_array) . ")";
114
+    if (!empty($cat_find_array)) {
115
+            $search .= "AND (" . implode(' OR ', $cat_find_array) . ")";
116
+    }
115 117
 
116 118
     $main_query_array = $map_cat_ids_array;
117 119
   
@@ -143,8 +145,9 @@  discard block
 block discarded – undo
143 145
         $gd_posttype = " AND p.post_type = %s";
144 146
         $main_query_array[] = $_REQUEST['gd_posttype'];
145 147
 
146
-    } else
147
-        $table = $plugin_prefix . 'gd_place_detail';
148
+    } else {
149
+            $table = $plugin_prefix . 'gd_place_detail';
150
+    }
148 151
 
149 152
     $join = ", " . $table . " AS pd ";
150 153
 
@@ -309,8 +312,7 @@  discard block
 block discarded – undo
309 312
 
310 313
     if (!empty($cat_content_info)) {
311 314
 		return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']';
312
-    }
313
-    else {
315
+    } else {
314 316
 		return '[{"totalcount":"0"}]';
315 317
 	}
316 318
 }
317 319
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     $gd_post_type = sanitize_text_field($_REQUEST['post_type']);
11 11
     $post_taxonomy = geodir_get_taxonomies($gd_post_type);
12 12
     $map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']);
13
-    $child_collapse = (bool)$_REQUEST['child_collapse'];
13
+    $child_collapse = (bool) $_REQUEST['child_collapse'];
14 14
     echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true);
15 15
     die;
16 16
 }
@@ -30,21 +30,21 @@  discard block
 block discarded – undo
30 30
     global $wpdb, $plugin_prefix, $gd_session;
31 31
 
32 32
     if ($_REQUEST['m_id'] != '') {
33
-        $pid = (int)$_REQUEST['m_id'];
33
+        $pid = (int) $_REQUEST['m_id'];
34 34
     } else {
35 35
         echo __('No marker data found', 'geodirectory');
36 36
         exit;
37 37
     }
38 38
 
39 39
     if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) {
40
-        $post = (object)$gd_ses_listing;
40
+        $post = (object) $gd_ses_listing;
41 41
         echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']);
42 42
     } else {
43 43
         $geodir_post_type = get_post_type($pid);
44 44
 
45
-        $table = $plugin_prefix . $geodir_post_type . '_detail';
45
+        $table = $plugin_prefix.$geodir_post_type.'_detail';
46 46
 
47
-        $sql = $wpdb->prepare("SELECT * FROM " . $table . " WHERE post_id = %d", array($pid));
47
+        $sql = $wpdb->prepare("SELECT * FROM ".$table." WHERE post_id = %d", array($pid));
48 48
 
49 49
         $postinfo = $wpdb->get_results($sql);
50 50
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     $post_type = isset($_REQUEST['gd_posttype']) ? $_REQUEST['gd_posttype'] : 'gd_place';
89 89
 
90 90
     $map_cat_ids_array = array('0');
91
-    $cat_find_array = array(" FIND_IN_SET(%d, pd." . $post_type . "category)");
91
+    $cat_find_array = array(" FIND_IN_SET(%d, pd.".$post_type."category)");
92 92
 
93 93
 
94 94
     $field_default_cat = '';
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
         $map_cat_arr = trim($_REQUEST['cat_id'], ',');
97 97
 
98 98
         if (!empty($map_cat_arr)) {
99
-            $field_default_cat .= "WHEN (default_category IN (" . $map_cat_arr . ")) THEN default_category ";
99
+            $field_default_cat .= "WHEN (default_category IN (".$map_cat_arr.")) THEN default_category ";
100 100
 
101 101
             $map_cat_ids_array = explode(',', $map_cat_arr);
102 102
             $cat_find_array = array();
103 103
             foreach ($map_cat_ids_array as $cat_id) {
104
-                $field_default_cat .= "WHEN (FIND_IN_SET($cat_id, `" . $post_type . "category`) > 0) THEN $cat_id ";
105
-                $cat_find_array[] = " FIND_IN_SET(%d, pd." . $post_type . "category)";
104
+                $field_default_cat .= "WHEN (FIND_IN_SET($cat_id, `".$post_type."category`) > 0) THEN $cat_id ";
105
+                $cat_find_array[] = " FIND_IN_SET(%d, pd.".$post_type."category)";
106 106
                 $main_query_array[] = $cat_id;
107 107
             }
108 108
 
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
         $field_default_cat = '';
114 114
 
115 115
     if (!empty($cat_find_array))
116
-        $search .= "AND (" . implode(' OR ', $cat_find_array) . ")";
116
+        $search .= "AND (".implode(' OR ', $cat_find_array).")";
117 117
 
118 118
     $main_query_array = $map_cat_ids_array;
119 119
   
120 120
     if (isset($_REQUEST['search']) && !empty($_REQUEST['search']) && $_REQUEST['search'] != __('Title', 'geodirectory')) {
121 121
         $search .= " AND p.post_title LIKE %s";
122
-        $main_query_array[] = "%" . $_REQUEST['search'] . "%";
122
+        $main_query_array[] = "%".$_REQUEST['search']."%";
123 123
     }
124 124
 
125 125
     /**
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
 
142 142
     $gd_posttype = '';
143 143
     if (isset($_REQUEST['gd_posttype']) && $_REQUEST['gd_posttype'] != '') {
144
-        $table = $plugin_prefix . $_REQUEST['gd_posttype'] . '_detail';
144
+        $table = $plugin_prefix.$_REQUEST['gd_posttype'].'_detail';
145 145
         $gd_posttype = " AND p.post_type = %s";
146 146
         $main_query_array[] = $_REQUEST['gd_posttype'];
147 147
 
148 148
     } else
149
-        $table = $plugin_prefix . 'gd_place_detail';
149
+        $table = $plugin_prefix.'gd_place_detail';
150 150
 
151
-    $join = ", " . $table . " AS pd ";
151
+    $join = ", ".$table." AS pd ";
152 152
 
153 153
     /**
154 154
 	 * Filter the SQL JOIN clause for the markers data
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	$search = apply_filters('geodir_home_map_listing_where', $search);
170 170
     $search = str_replace(array("'%", "%'"), array("'%%", "%%'"), $search);
171
-    $cat_type = $post_type . 'category';
171
+    $cat_type = $post_type.'category';
172 172
     if ($post_type == 'gd_event') {
173 173
         $event_select = ", pd.recurring_dates, pd.is_recurring";
174 174
     } else {
175 175
         $event_select = "";
176 176
     }
177 177
 
178
-    $sql_select = 'SELECT pd.default_category, pd.' . $cat_type . ', pd.post_title, pd.post_id, pd.post_latitude, pd.post_longitude' . $event_select;
178
+    $sql_select = 'SELECT pd.default_category, pd.'.$cat_type.', pd.post_title, pd.post_id, pd.post_latitude, pd.post_longitude'.$event_select;
179 179
     /**
180 180
 	 * Filter the SQL SELECT clause to retrive fields data
181 181
 	 *
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	 */
196 196
 	$groupby = apply_filters('geodir_home_map_listing_groupby', $groupby);
197 197
 
198
-    $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array);
198
+    $catsql = $wpdb->prepare("$select $field_default_cat FROM ".$wpdb->posts." as p".$join." WHERE p.ID = pd.post_id AND p.post_status = 'publish' ".$search.$gd_posttype.$groupby, $main_query_array);
199 199
     
200 200
 	/**
201 201
 	 * Filter the SQL query to retrive markers data
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                         $e = 0;
258 258
                         foreach ($recurring_dates as $date) {
259 259
                             if (strtotime($date) >= $today) {
260
-                                $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($date));
260
+                                $event_dates .= ' :: '.date_i18n($geodir_date_format, strtotime($date));
261 261
                                 
262 262
                                 $e++;
263 263
                                 if ($e == 3) { // only show 3 event dates
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                     $end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date;
272 272
                 
273 273
                     if ($end_date != '' && strtotime($end_date) >= $today) {
274
-                        $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date));
274
+                        $event_dates .= ' :: '.date_i18n($geodir_date_format, strtotime($start_date)).' -> '.date_i18n($geodir_date_format, strtotime($end_date));
275 275
                     }
276 276
                 }
277 277
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                 $icon_size = array('w' => 36, 'h' => 45);
300 300
             }
301 301
 
302
-            $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"'.$mark_extra.'}';
302
+            $content_data[] = '{"id":"'.$catinfo_obj->post_id.'","t": "'.$title.'","lt": "'.$catinfo_obj->post_latitude.'","ln": "'.$catinfo_obj->post_longitude.'","mk_id":"'.$catinfo_obj->post_id.'_'.$catinfo_obj->default_category.'","i":"'.$icon.'","w":"'.$icon_size['w'].'","h":"'.$icon_size['h'].'"'.$mark_extra.'}';
303 303
             $post_ids[] = $catinfo_obj->post_id;
304 304
         }
305 305
     }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     $totalcount = count(array_unique($post_ids));
324 324
 
325 325
     if (!empty($cat_content_info)) {
326
-        return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']';
326
+        return '[{"totalcount":"'.$totalcount.'",'.substr(implode(',', $cat_content_info), 1).']';
327 327
     }
328 328
     else {
329 329
         return '[{"totalcount":"0"}]';
Please login to merge, or discard this patch.
Indentation   +230 added lines, -230 removed lines patch added patch discarded remove patch
@@ -7,61 +7,61 @@  discard block
 block discarded – undo
7 7
  */
8 8
  
9 9
 if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'homemap_catlist') {
10
-    global $gd_session;
11
-    $gd_post_type = sanitize_text_field($_REQUEST['post_type']);
12
-    $gd_session->set('homemap_catlist_ptype', $gd_post_type);
13
-    $post_taxonomy = geodir_get_taxonomies($gd_post_type);
14
-    $map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']);
15
-    $child_collapse = (bool)$_REQUEST['child_collapse'];
16
-    echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true);
17
-    die;
10
+	global $gd_session;
11
+	$gd_post_type = sanitize_text_field($_REQUEST['post_type']);
12
+	$gd_session->set('homemap_catlist_ptype', $gd_post_type);
13
+	$post_taxonomy = geodir_get_taxonomies($gd_post_type);
14
+	$map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']);
15
+	$child_collapse = (bool)$_REQUEST['child_collapse'];
16
+	echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true);
17
+	die;
18 18
 }
19 19
 
20 20
 // Send the content-type header with correct encoding
21 21
 header("Content-type: text/javascript; charset=utf-8");
22 22
 
23 23
 if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'cat') { // Retrives markers data for categories
24
-    echo get_markers();
25
-    exit;
24
+	echo get_markers();
25
+	exit;
26 26
 } else if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'info') { // Retrives marker info window html
27
-    /**
28
-     * @global object $wpdb WordPress Database object.
29
-     * @global string $plugin_prefix Geodirectory plugin table prefix.
30
-     * @global object $gd_session GeoDirectory Session object.
31
-     */
32
-    global $wpdb, $plugin_prefix, $gd_session;
33
-
34
-    if ($_REQUEST['m_id'] != '') {
35
-        $pid = (int)$_REQUEST['m_id'];
36
-    } else {
37
-        echo __('No marker data found', 'geodirectory');
38
-        exit;
39
-    }
40
-
41
-    if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) {
42
-        $post = (object)$gd_ses_listing;
43
-        echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']);
44
-    } else {
45
-        $geodir_post_type = get_post_type($pid);
46
-
47
-        $table = $plugin_prefix . $geodir_post_type . '_detail';
48
-
49
-        $sql = $wpdb->prepare("SELECT * FROM " . $table . " WHERE post_id = %d", array($pid));
50
-
51
-        $postinfo = $wpdb->get_results($sql);
52
-
53
-        $data_arr = array();
54
-
55
-        if ($postinfo) {
56
-            $srcharr = array("'", "/", "-", '"', '\\');
57
-            $replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
58
-
59
-            foreach ($postinfo as $postinfo_obj) {
60
-                echo geodir_get_infowindow_html($postinfo_obj);
61
-            }
62
-        }
63
-    }
64
-    exit;
27
+	/**
28
+	 * @global object $wpdb WordPress Database object.
29
+	 * @global string $plugin_prefix Geodirectory plugin table prefix.
30
+	 * @global object $gd_session GeoDirectory Session object.
31
+	 */
32
+	global $wpdb, $plugin_prefix, $gd_session;
33
+
34
+	if ($_REQUEST['m_id'] != '') {
35
+		$pid = (int)$_REQUEST['m_id'];
36
+	} else {
37
+		echo __('No marker data found', 'geodirectory');
38
+		exit;
39
+	}
40
+
41
+	if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) {
42
+		$post = (object)$gd_ses_listing;
43
+		echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']);
44
+	} else {
45
+		$geodir_post_type = get_post_type($pid);
46
+
47
+		$table = $plugin_prefix . $geodir_post_type . '_detail';
48
+
49
+		$sql = $wpdb->prepare("SELECT * FROM " . $table . " WHERE post_id = %d", array($pid));
50
+
51
+		$postinfo = $wpdb->get_results($sql);
52
+
53
+		$data_arr = array();
54
+
55
+		if ($postinfo) {
56
+			$srcharr = array("'", "/", "-", '"', '\\');
57
+			$replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '');
58
+
59
+			foreach ($postinfo as $postinfo_obj) {
60
+				echo geodir_get_infowindow_html($postinfo_obj);
61
+			}
62
+		}
63
+	}
64
+	exit;
65 65
 }
66 66
 
67 67
 /**
@@ -79,80 +79,80 @@  discard block
 block discarded – undo
79 79
  * @return string
80 80
  */
81 81
 function get_markers() {
82
-    global $wpdb, $plugin_prefix, $geodir_cat_icons, $gd_marker_sizes;
82
+	global $wpdb, $plugin_prefix, $geodir_cat_icons, $gd_marker_sizes;
83 83
 
84
-    $search = '';
85
-    $main_query_array;
84
+	$search = '';
85
+	$main_query_array;
86 86
 
87
-    $srcharr = array("'", "/", "-", '"', '\\', '&#39;');
88
-    $replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '', "&prime;");
87
+	$srcharr = array("'", "/", "-", '"', '\\', '&#39;');
88
+	$replarr = array("&prime;", "&frasl;", "&ndash;", "&ldquo;", '', "&prime;");
89 89
 
90
-    $post_type = isset($_REQUEST['gd_posttype']) ? $_REQUEST['gd_posttype'] : 'gd_place';
90
+	$post_type = isset($_REQUEST['gd_posttype']) ? $_REQUEST['gd_posttype'] : 'gd_place';
91 91
 
92
-    $map_cat_ids_array = array('0');
93
-    $cat_find_array = array(" FIND_IN_SET(%d, pd." . $post_type . "category)");
92
+	$map_cat_ids_array = array('0');
93
+	$cat_find_array = array(" FIND_IN_SET(%d, pd." . $post_type . "category)");
94 94
 
95 95
 
96
-    $field_default_cat = '';
97
-    if (isset($_REQUEST['cat_id']) && $_REQUEST['cat_id'] != '') {
98
-        $map_cat_arr = trim($_REQUEST['cat_id'], ',');
96
+	$field_default_cat = '';
97
+	if (isset($_REQUEST['cat_id']) && $_REQUEST['cat_id'] != '') {
98
+		$map_cat_arr = trim($_REQUEST['cat_id'], ',');
99 99
 
100
-        if (!empty($map_cat_arr)) {
101
-            $field_default_cat .= "WHEN (default_category IN (" . $map_cat_arr . ")) THEN default_category ";
100
+		if (!empty($map_cat_arr)) {
101
+			$field_default_cat .= "WHEN (default_category IN (" . $map_cat_arr . ")) THEN default_category ";
102 102
 
103
-            $map_cat_ids_array = explode(',', $map_cat_arr);
104
-            $cat_find_array = array();
105
-            foreach ($map_cat_ids_array as $cat_id) {
106
-                $field_default_cat .= "WHEN (FIND_IN_SET($cat_id, `" . $post_type . "category`) > 0) THEN $cat_id ";
107
-                $cat_find_array[] = " FIND_IN_SET(%d, pd." . $post_type . "category)";
108
-                $main_query_array[] = $cat_id;
109
-            }
103
+			$map_cat_ids_array = explode(',', $map_cat_arr);
104
+			$cat_find_array = array();
105
+			foreach ($map_cat_ids_array as $cat_id) {
106
+				$field_default_cat .= "WHEN (FIND_IN_SET($cat_id, `" . $post_type . "category`) > 0) THEN $cat_id ";
107
+				$cat_find_array[] = " FIND_IN_SET(%d, pd." . $post_type . "category)";
108
+				$main_query_array[] = $cat_id;
109
+			}
110 110
 
111
-        }
112
-    }
111
+		}
112
+	}
113 113
 
114
-    if (!empty($field_default_cat))
115
-        $field_default_cat = '';
114
+	if (!empty($field_default_cat))
115
+		$field_default_cat = '';
116 116
 
117
-    if (!empty($cat_find_array))
118
-        $search .= "AND (" . implode(' OR ', $cat_find_array) . ")";
117
+	if (!empty($cat_find_array))
118
+		$search .= "AND (" . implode(' OR ', $cat_find_array) . ")";
119 119
 
120
-    $main_query_array = $map_cat_ids_array;
120
+	$main_query_array = $map_cat_ids_array;
121 121
   
122
-    if (isset($_REQUEST['search']) && !empty($_REQUEST['search']) && $_REQUEST['search'] != __('Title', 'geodirectory')) {
123
-        $search .= " AND p.post_title LIKE %s";
124
-        $main_query_array[] = "%" . $_REQUEST['search'] . "%";
125
-    }
126
-
127
-    /**
128
-     * Filter the marker query search SQL, values are replaces with %s or %d.
129
-     *
130
-     * @since 1.5.3
131
-     *
132
-     * @param string $search The SQL query for search/where.
133
-     */
134
-    $search = apply_filters('geodir_marker_search', $search);
135
-    /**
136
-     * Filter the marker query search SQL values %s and %d, this is an array of values.
137
-     *
138
-     * @since 1.5.3
139
-     *
140
-     * @param array $main_query_array The SQL query values for search/where.
141
-     */
142
-    $main_query_array = apply_filters('geodir_marker_main_query_array', $main_query_array);
143
-
144
-    $gd_posttype = '';
145
-    if (isset($_REQUEST['gd_posttype']) && $_REQUEST['gd_posttype'] != '') {
146
-        $table = $plugin_prefix . $_REQUEST['gd_posttype'] . '_detail';
147
-        $gd_posttype = " AND p.post_type = %s";
148
-        $main_query_array[] = $_REQUEST['gd_posttype'];
149
-
150
-    } else
151
-        $table = $plugin_prefix . 'gd_place_detail';
152
-
153
-    $join = ", " . $table . " AS pd ";
154
-
155
-    /**
122
+	if (isset($_REQUEST['search']) && !empty($_REQUEST['search']) && $_REQUEST['search'] != __('Title', 'geodirectory')) {
123
+		$search .= " AND p.post_title LIKE %s";
124
+		$main_query_array[] = "%" . $_REQUEST['search'] . "%";
125
+	}
126
+
127
+	/**
128
+	 * Filter the marker query search SQL, values are replaces with %s or %d.
129
+	 *
130
+	 * @since 1.5.3
131
+	 *
132
+	 * @param string $search The SQL query for search/where.
133
+	 */
134
+	$search = apply_filters('geodir_marker_search', $search);
135
+	/**
136
+	 * Filter the marker query search SQL values %s and %d, this is an array of values.
137
+	 *
138
+	 * @since 1.5.3
139
+	 *
140
+	 * @param array $main_query_array The SQL query values for search/where.
141
+	 */
142
+	$main_query_array = apply_filters('geodir_marker_main_query_array', $main_query_array);
143
+
144
+	$gd_posttype = '';
145
+	if (isset($_REQUEST['gd_posttype']) && $_REQUEST['gd_posttype'] != '') {
146
+		$table = $plugin_prefix . $_REQUEST['gd_posttype'] . '_detail';
147
+		$gd_posttype = " AND p.post_type = %s";
148
+		$main_query_array[] = $_REQUEST['gd_posttype'];
149
+
150
+	} else
151
+		$table = $plugin_prefix . 'gd_place_detail';
152
+
153
+	$join = ", " . $table . " AS pd ";
154
+
155
+	/**
156 156
 	 * Filter the SQL JOIN clause for the markers data
157 157
 	 *
158 158
 	 * @since 1.0.0
@@ -169,16 +169,16 @@  discard block
 block discarded – undo
169 169
 	 * @param string $search Row of searched fields to use in WHERE clause.
170 170
 	 */
171 171
 	$search = apply_filters('geodir_home_map_listing_where', $search);
172
-    $search = str_replace(array("'%", "%'"), array("'%%", "%%'"), $search);
173
-    $cat_type = $post_type . 'category';
174
-    if ($post_type == 'gd_event') {
175
-        $event_select = ", pd.recurring_dates, pd.is_recurring";
176
-    } else {
177
-        $event_select = "";
178
-    }
179
-
180
-    $sql_select = 'SELECT pd.default_category, pd.' . $cat_type . ', pd.post_title, pd.post_id, pd.post_latitude, pd.post_longitude' . $event_select;
181
-    /**
172
+	$search = str_replace(array("'%", "%'"), array("'%%", "%%'"), $search);
173
+	$cat_type = $post_type . 'category';
174
+	if ($post_type == 'gd_event') {
175
+		$event_select = ", pd.recurring_dates, pd.is_recurring";
176
+	} else {
177
+		$event_select = "";
178
+	}
179
+
180
+	$sql_select = 'SELECT pd.default_category, pd.' . $cat_type . ', pd.post_title, pd.post_id, pd.post_latitude, pd.post_longitude' . $event_select;
181
+	/**
182 182
 	 * Filter the SQL SELECT clause to retrive fields data
183 183
 	 *
184 184
 	 * @since 1.0.0
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	$groupby = apply_filters('geodir_home_map_listing_groupby', $groupby);
199 199
 
200
-    $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array);
200
+	$catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array);
201 201
     
202 202
 	/**
203 203
 	 * Filter the SQL query to retrive markers data
@@ -209,125 +209,125 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	$catsql = apply_filters('geodir_home_map_listing_query', $catsql, $search);
211 211
 
212
-    $catinfo = $wpdb->get_results($catsql);
212
+	$catinfo = $wpdb->get_results($catsql);
213 213
 	
214
-    $cat_content_info = array();
215
-    $content_data = array();
216
-    $post_ids = array();
217
-
218
-    /**
219
-     * Called before marker data is processed into JSON.
220
-     *
221
-     * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers.
222
-     *
223
-     * @since 1.5.3
224
-     * @param object $catinfo The posts object containing all marker data.
225
-     * @see 'geodir_after_marker_post_process'
226
-     */
227
-    $catinfo = apply_filters('geodir_before_marker_post_process', $catinfo);
228
-
229
-    /**
230
-     * Called before marker data is processed into JSON.
231
-     *
232
-     * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers.
233
-     *
234
-     * @since 1.4.9
235
-     * @param object $catinfo The posts object containing all marker data.
236
-     * @see 'geodir_after_marker_post_process'
237
-     */
238
-    do_action('geodir_before_marker_post_process_action', $catinfo);
239
-
240
-    // Sort any posts into a ajax array
241
-    if (!empty($catinfo)) {
242
-        $geodir_cat_icons = geodir_get_term_icon();
243
-        global $geodir_date_format;
244
-
245
-        $today = strtotime(date_i18n('Y-m-d'));
214
+	$cat_content_info = array();
215
+	$content_data = array();
216
+	$post_ids = array();
217
+
218
+	/**
219
+	 * Called before marker data is processed into JSON.
220
+	 *
221
+	 * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers.
222
+	 *
223
+	 * @since 1.5.3
224
+	 * @param object $catinfo The posts object containing all marker data.
225
+	 * @see 'geodir_after_marker_post_process'
226
+	 */
227
+	$catinfo = apply_filters('geodir_before_marker_post_process', $catinfo);
228
+
229
+	/**
230
+	 * Called before marker data is processed into JSON.
231
+	 *
232
+	 * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers.
233
+	 *
234
+	 * @since 1.4.9
235
+	 * @param object $catinfo The posts object containing all marker data.
236
+	 * @see 'geodir_after_marker_post_process'
237
+	 */
238
+	do_action('geodir_before_marker_post_process_action', $catinfo);
239
+
240
+	// Sort any posts into a ajax array
241
+	if (!empty($catinfo)) {
242
+		$geodir_cat_icons = geodir_get_term_icon();
243
+		global $geodir_date_format;
244
+
245
+		$today = strtotime(date_i18n('Y-m-d'));
246 246
         
247
-        foreach ($catinfo as $catinfo_obj) {
248
-            $post_title = $catinfo_obj->post_title;
247
+		foreach ($catinfo as $catinfo_obj) {
248
+			$post_title = $catinfo_obj->post_title;
249 249
             
250
-            if ($post_type == 'gd_event' && !empty($catinfo_obj->recurring_dates)) {
251
-                $event_dates = '';
252
-                $recurring_data = isset($catinfo_obj->recurring_dates) ? maybe_unserialize($catinfo_obj->recurring_dates) : array();
250
+			if ($post_type == 'gd_event' && !empty($catinfo_obj->recurring_dates)) {
251
+				$event_dates = '';
252
+				$recurring_data = isset($catinfo_obj->recurring_dates) ? maybe_unserialize($catinfo_obj->recurring_dates) : array();
253 253
                 
254
-                $post_info = geodir_get_post_info($catinfo_obj->post_id);
255
-                if (!empty($catinfo_obj->is_recurring) && !empty($recurring_data) && !empty($recurring_data['is_recurring']) && geodir_event_recurring_pkg($post_info)) {
256
-                    $recurring_dates = explode(',', $recurring_data['event_recurring_dates']);
254
+				$post_info = geodir_get_post_info($catinfo_obj->post_id);
255
+				if (!empty($catinfo_obj->is_recurring) && !empty($recurring_data) && !empty($recurring_data['is_recurring']) && geodir_event_recurring_pkg($post_info)) {
256
+					$recurring_dates = explode(',', $recurring_data['event_recurring_dates']);
257 257
                     
258
-                    if (!empty($recurring_dates)) {					
259
-                        $e = 0;
260
-                        foreach ($recurring_dates as $date) {
261
-                            if (strtotime($date) >= $today) {
262
-                                $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($date));
258
+					if (!empty($recurring_dates)) {					
259
+						$e = 0;
260
+						foreach ($recurring_dates as $date) {
261
+							if (strtotime($date) >= $today) {
262
+								$event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($date));
263 263
                                 
264
-                                $e++;
265
-                                if ($e == 3) { // only show 3 event dates
266
-                                    break;
267
-                                }
268
-                            }
269
-                        }
270
-                    }
271
-                } else {
272
-                    $start_date = !empty($recurring_data['event_start']) && $recurring_data['event_start'] != '0000-00-00 00:00:00' ? $recurring_data['event_start'] : '';
273
-                    $end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date;
264
+								$e++;
265
+								if ($e == 3) { // only show 3 event dates
266
+									break;
267
+								}
268
+							}
269
+						}
270
+					}
271
+				} else {
272
+					$start_date = !empty($recurring_data['event_start']) && $recurring_data['event_start'] != '0000-00-00 00:00:00' ? $recurring_data['event_start'] : '';
273
+					$end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date;
274 274
                 
275
-                    if ($end_date != '' && strtotime($end_date) >= $today) {
276
-                        $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date));
277
-                    }
278
-                }
279
-
280
-                if (empty($event_dates)) {
281
-                    continue;
282
-                }
275
+					if ($end_date != '' && strtotime($end_date) >= $today) {
276
+						$event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date));
277
+					}
278
+				}
279
+
280
+				if (empty($event_dates)) {
281
+					continue;
282
+				}
283 283
                 
284
-                $post_title .= $event_dates;
285
-            }
284
+				$post_title .= $event_dates;
285
+			}
286 286
 
287
-            $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$catinfo_obj->default_category]) ? $geodir_cat_icons[$catinfo_obj->default_category] : '';
288
-            $mark_extra = (isset($catinfo_obj->marker_extra)) ? $catinfo_obj->marker_extra : '';
289
-            $title = str_replace($srcharr, $replarr, $post_title);
287
+			$icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$catinfo_obj->default_category]) ? $geodir_cat_icons[$catinfo_obj->default_category] : '';
288
+			$mark_extra = (isset($catinfo_obj->marker_extra)) ? $catinfo_obj->marker_extra : '';
289
+			$title = str_replace($srcharr, $replarr, $post_title);
290 290
             
291
-            if ($icon != '') {
292
-                $gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes;
291
+			if ($icon != '') {
292
+				$gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes;
293 293
                 
294
-                if (isset($gd_marker_sizes[$icon])) {
295
-                    $icon_size = $gd_marker_sizes[$icon];
296
-                } else {
297
-                    $icon_size = geodir_get_marker_size($icon);
298
-                    $gd_marker_sizes[$icon] = $icon_size;
299
-                }               
300
-            } else {
301
-                $icon_size = array('w' => 36, 'h' => 45);
302
-            }
303
-
304
-            $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"'.$mark_extra.'}';
305
-            $post_ids[] = $catinfo_obj->post_id;
306
-        }
307
-    }
308
-
309
-    /**
310
-     * Called after marker data is processed into JSON.
311
-     *
312
-     * Called after marker data is processed into JSON, this action can be used to change the format or add/remove markers.
313
-     *
314
-     * @since 1.4.9
315
-     * @param array $content_data The array containing all markers in JSON format.
316
-     * @param object $catinfo The posts object containing all marker data.
317
-     * @see 'geodir_before_marker_post_process'
318
-     */
319
-    do_action('geodir_after_marker_post_process', $content_data, $catinfo);
320
-
321
-    if (!empty($content_data)) {
322
-        $cat_content_info[] = implode(',', $content_data);
323
-    }
324
-
325
-    $totalcount = count(array_unique($post_ids));
326
-
327
-    if (!empty($cat_content_info)) {
328
-        return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']';
329
-    }
330
-    else {
331
-        return '[{"totalcount":"0"}]';
332
-    }
294
+				if (isset($gd_marker_sizes[$icon])) {
295
+					$icon_size = $gd_marker_sizes[$icon];
296
+				} else {
297
+					$icon_size = geodir_get_marker_size($icon);
298
+					$gd_marker_sizes[$icon] = $icon_size;
299
+				}               
300
+			} else {
301
+				$icon_size = array('w' => 36, 'h' => 45);
302
+			}
303
+
304
+			$content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"'.$mark_extra.'}';
305
+			$post_ids[] = $catinfo_obj->post_id;
306
+		}
307
+	}
308
+
309
+	/**
310
+	 * Called after marker data is processed into JSON.
311
+	 *
312
+	 * Called after marker data is processed into JSON, this action can be used to change the format or add/remove markers.
313
+	 *
314
+	 * @since 1.4.9
315
+	 * @param array $content_data The array containing all markers in JSON format.
316
+	 * @param object $catinfo The posts object containing all marker data.
317
+	 * @see 'geodir_before_marker_post_process'
318
+	 */
319
+	do_action('geodir_after_marker_post_process', $content_data, $catinfo);
320
+
321
+	if (!empty($content_data)) {
322
+		$cat_content_info[] = implode(',', $content_data);
323
+	}
324
+
325
+	$totalcount = count(array_unique($post_ids));
326
+
327
+	if (!empty($cat_content_info)) {
328
+		return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']';
329
+	}
330
+	else {
331
+		return '[{"totalcount":"0"}]';
332
+	}
333 333
 }
334 334
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-functions/map-functions/map_on_add_listing_page.php 3 patches
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,9 +45,10 @@  discard block
 block discarded – undo
45 45
 $default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
46 46
 if (is_admin() && isset($_REQUEST['tab']) && $mapzoom == '') {
47 47
     $mapzoom = 4;
48
-    if (isset($_REQUEST['add_hood']))
49
-        $mapzoom = 10;
50
-}
48
+    if (isset($_REQUEST['add_hood'])) {
49
+            $mapzoom = 10;
50
+    }
51
+    }
51 52
 
52 53
 /**
53 54
  * Filter the auto change address fields values
@@ -641,8 +642,9 @@  discard block
 block discarded – undo
641 642
 </script>
642 643
 <?php
643 644
 $set_button_class = 'geodir_button';
644
-if (is_admin())
645
-    $set_button_class = 'button-primary';
645
+if (is_admin()) {
646
+    $set_button_class = 'button-primary';
647
+}
646 648
 ?>
647 649
 <input type="button" id="<?php echo $prefix; ?>set_address_button" class="<?php echo $set_button_class; ?>"
648 650
        value="<?php _e($map_title, 'geodirectory'); ?>" style="float:none;"/>
Please login to merge, or discard this patch.
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
 $defaultcity = isset($default_location->city) ? $default_location->city : '';
36 36
 $lat_lng_blank = false;
37 37
 if ($lat == '' && $lng == '') {
38
-    $lat_lng_blank = true;
39
-    $city = $defaultcity;
40
-    $region = isset($default_location->region) ? $default_location->region : '';
41
-    $country = isset($default_location->country) ? $default_location->country : '';
42
-    $lng = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
43
-    $lat = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
38
+	$lat_lng_blank = true;
39
+	$city = $defaultcity;
40
+	$region = isset($default_location->region) ? $default_location->region : '';
41
+	$country = isset($default_location->country) ? $default_location->country : '';
42
+	$lng = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
43
+	$lat = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
44 44
 }
45 45
 $default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
46 46
 $default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
47 47
 if (is_admin() && isset($_REQUEST['tab']) && $mapzoom == '') {
48
-    $mapzoom = 4;
49
-    if (isset($_REQUEST['add_hood']))
50
-        $mapzoom = 10;
48
+	$mapzoom = 4;
49
+	if (isset($_REQUEST['add_hood']))
50
+		$mapzoom = 10;
51 51
 }
52 52
 
53 53
 /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * Fires at the start of the add javascript on the add lsitings map.
69 69
 	 *
70 70
 	 * @since 1.0.0
71
-     * @param string $prefix The prefix for all elements.
71
+	 * @param string $prefix The prefix for all elements.
72 72
 	 */
73 73
 	do_action('geodir_add_listing_js_start', $prefix);
74 74
 	?>
@@ -260,12 +260,12 @@  discard block
 block discarded – undo
260 260
             // fix for regions in GB
261 261
 
262 262
             $country_arr = <?php
263
-            /**
264
-             * Filter the regions array that uses administrative_area_level_2 instead of administrative_area_level_1.
265
-             *
266
-             * @since 1.6.16
267
-             */
268
-            echo apply_filters("geodir_geocode_region_level",'["GB","ES"]');?>;
263
+			/**
264
+			 * Filter the regions array that uses administrative_area_level_2 instead of administrative_area_level_1.
265
+			 *
266
+			 * @since 1.6.16
267
+			 */
268
+			echo apply_filters("geodir_geocode_region_level",'["GB","ES"]');?>;
269 269
             if (jQuery.inArray(rr, $country_arr) !== -1) {
270 270
                 if (administrative_area_level_2.long_name) {
271 271
                     getState = administrative_area_level_2.long_name;
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
                 getZip = postal_code.long_name;
340 340
             }
341 341
             <?php 
342
-            /**
343
-             * Fires to add javascript variable to use in google map.
344
-             *
345
-             * @since 1.0.0
346
-             */
347
-            do_action('geodir_add_listing_geocode_js_vars');
348
-            ?>
342
+			/**
343
+			 * Fires to add javascript variable to use in google map.
344
+			 *
345
+			 * @since 1.0.0
346
+			 */
347
+			do_action('geodir_add_listing_geocode_js_vars');
348
+			?>
349 349
             <?php if ($is_map_restrict) { ?>
350 350
             if (getCity.toLowerCase() != '<?php echo geodir_strtolower(addslashes_gpc($city));?>') {
351 351
                 alert('<?php echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.','geodirectory'), $city));?>');
@@ -426,15 +426,15 @@  discard block
 block discarded – undo
426 426
             }
427 427
         }
428 428
         <?php
429
-        /**
430
-         * Fires when marker address updated on map.
431
-         *
432
-         * @since 1.0.0
433
-         * @param string $prefix Identifier used as a prefix for field name
434
-         */
435
-        do_action('geodir_update_marker_address', $prefix);
436
-        echo $updateMarkerAddress = ob_get_clean();
437
-        ?>
429
+		/**
430
+		 * Fires when marker address updated on map.
431
+		 *
432
+		 * @since 1.0.0
433
+		 * @param string $prefix Identifier used as a prefix for field name
434
+		 */
435
+		do_action('geodir_update_marker_address', $prefix);
436
+		echo $updateMarkerAddress = ob_get_clean();
437
+		?>
438 438
     }
439 439
     function geodir_codeAddress(set_on_map) {
440 440
         var address = jQuery('#<?php echo $prefix.'address';?>').val();
@@ -464,9 +464,9 @@  discard block
 block discarded – undo
464 464
         }
465 465
         var is_restrict = '<?php echo $is_map_restrict; ?>';
466 466
         <?php ob_start();
467
-        $defaultregion = isset($default_location->region) ? $default_location->region : '';
468
-        $defaultcountry = isset($default_location->country) ? $default_location->country : '';
469
-        ?>
467
+		$defaultregion = isset($default_location->region) ? $default_location->region : '';
468
+		$defaultcountry = isset($default_location->country) ? $default_location->country : '';
469
+		?>
470 470
         if (set_on_map && is_restrict) {
471 471
             if (zip != '' && address != '') {
472 472
                 address = address + ',' + zip;
@@ -478,12 +478,12 @@  discard block
 block discarded – undo
478 478
             if( address == city || address == region || address == country || address == zip )
479 479
                 address = '';
480 480
             <?php
481
-            if(is_admin() && isset($_REQUEST['tab'])){?>
481
+			if(is_admin() && isset($_REQUEST['tab'])){?>
482 482
             if (jQuery.trim(city) == '' || jQuery.trim(region) == '') {
483 483
                 address = '';
484 484
             }
485 485
             <?php
486
-               }?>
486
+			   }?>
487 487
 
488 488
             if (ISO2 == 'GB') {
489 489
                 address = address + ',' + city + ',' + country; // UK is funny with regions
@@ -499,15 +499,15 @@  discard block
 block discarded – undo
499 499
             address =  address.replace(",null,", ",");
500 500
         }
501 501
         <?php $codeAddress = ob_get_clean();
502
-        /**
503
-         * Filter the address variable
504
-         *
505
-         * @since 1.0.0
506
-         *
507
-         * @param string $codeAddress Row of address to use in google map.
508
-         */
509
-        echo apply_filters('geodir_codeaddress', $codeAddress);
510
-        ?>
502
+		/**
503
+		 * Filter the address variable
504
+		 *
505
+		 * @since 1.0.0
506
+		 *
507
+		 * @param string $codeAddress Row of address to use in google map.
508
+		 */
509
+		echo apply_filters('geodir_codeaddress', $codeAddress);
510
+		?>
511 511
         if (!window.gdMaps) { // No Google Map Loaded
512 512
             return;
513 513
         }
@@ -532,13 +532,13 @@  discard block
 block discarded – undo
532 532
                         updateMarkerPosition(baseMarker.getPosition());
533 533
                         //if(set_on_map && is_restrict) {
534 534
                         <?php 
535
-                        /**
536
-                         * Fires before set geocode position.
537
-                         *
538
-                         * @since 1.0.0
539
-                         */
540
-                        do_action('geodir_add_listing_codeaddress_before_geocode');
541
-                        ?>
535
+						/**
536
+						 * Fires before set geocode position.
537
+						 *
538
+						 * @since 1.0.0
539
+						 */
540
+						do_action('geodir_add_listing_codeaddress_before_geocode');
541
+						?>
542 542
                         geocodePosition(baseMarker.getPosition(), {'address': address, 'country': ISO2});
543 543
                         //}
544 544
                     } else {
@@ -584,13 +584,13 @@  discard block
 block discarded – undo
584 584
                 updateMarkerPositionOSM(baseMarker.getLatLng());
585 585
             }
586 586
             <?php 
587
-            /**
588
-             * Fires to add javascript variable to use in google map.
589
-             *
590
-             * @since 1.0.0
591
-             */
592
-            do_action('geodir_add_listing_geocode_js_vars');
593
-            ?>
587
+			/**
588
+			 * Fires to add javascript variable to use in google map.
589
+			 *
590
+			 * @since 1.0.0
591
+			 */
592
+			do_action('geodir_add_listing_geocode_js_vars');
593
+			?>
594 594
             <?php if ($is_map_restrict) { ?>
595 595
             if (getCity.toLowerCase() != '<?php echo geodir_strtolower(addslashes_gpc($city));?>') {
596 596
                 alert('<?php echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.','geodirectory'), $city));?>');
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 <?php
739 739
 $set_button_class = 'geodir_button';
740 740
 if (is_admin())
741
-    $set_button_class = 'button-primary';
741
+	$set_button_class = 'button-primary';
742 742
 ?>
743 743
 <input type="button" id="<?php echo $prefix; ?>set_address_button" class="<?php echo $set_button_class; ?>" value="<?php esc_attr_e($map_title, 'geodirectory'); ?>" style="float:none;"/>
744 744
 <div id="<?php echo $prefix; ?>d_mouseClick"></div>
Please login to merge, or discard this patch.
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
     window.gdMaps = window.gdMaps || gdMaps;
83 83
     
84 84
     user_address = false;
85
-    jQuery('#<?php echo $prefix.'address';?>').keypress(function () {
85
+    jQuery('#<?php echo $prefix.'address'; ?>').keypress(function () {
86 86
         user_address = true;
87 87
     });
88 88
 
89 89
     baseMarker = '';
90 90
     geocoder = '';
91
-    var <?php echo $prefix;?>CITY_MAP_CENTER_LAT = <?php echo ($lat) ? $lat :  '39.952484'; ?>;
92
-    var <?php echo $prefix;?>CITY_MAP_CENTER_LNG = <?php echo ($lng) ? $lng :  '-75.163786'; ?>;
93
-    <?php if($lat_lng_blank){$lat='';$lng='';}?>
94
-    var <?php echo $prefix;?>CITY_MAP_ZOOMING_FACT = <?php echo ($mapzoom) ? $mapzoom : 12;?>;
91
+    var <?php echo $prefix; ?>CITY_MAP_CENTER_LAT = <?php echo ($lat) ? $lat : '39.952484'; ?>;
92
+    var <?php echo $prefix; ?>CITY_MAP_CENTER_LNG = <?php echo ($lng) ? $lng : '-75.163786'; ?>;
93
+    <?php if ($lat_lng_blank) {$lat = ''; $lng = ''; }?>
94
+    var <?php echo $prefix; ?>CITY_MAP_ZOOMING_FACT = <?php echo ($mapzoom) ? $mapzoom : 12; ?>;
95 95
     var minZoomLevel = <?php echo ($is_map_restrict) ? 5 : 0; ?>;
96 96
     var oldstr_address;
97 97
     var oldstr_zip;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
              *
266 266
              * @since 1.6.16
267 267
              */
268
-            echo apply_filters("geodir_geocode_region_level",'["GB","ES"]');?>;
268
+            echo apply_filters("geodir_geocode_region_level", '["GB","ES"]'); ?>;
269 269
             if (jQuery.inArray(rr, $country_arr) !== -1) {
270 270
                 if (administrative_area_level_2.long_name) {
271 271
                     getState = administrative_area_level_2.long_name;
@@ -347,9 +347,9 @@  discard block
 block discarded – undo
347 347
             do_action('geodir_add_listing_geocode_js_vars');
348 348
             ?>
349 349
             <?php if ($is_map_restrict) { ?>
350
-            if (getCity.toLowerCase() != '<?php echo geodir_strtolower(addslashes_gpc($city));?>') {
351
-                alert('<?php echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.','geodirectory'), $city));?>');
352
-                jQuery("#<?php echo $prefix.'map';?>").goMap();
350
+            if (getCity.toLowerCase() != '<?php echo geodir_strtolower(addslashes_gpc($city)); ?>') {
351
+                alert('<?php echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.', 'geodirectory'), $city)); ?>');
352
+                jQuery("#<?php echo $prefix.'map'; ?>").goMap();
353 353
                 jQuery.goMap.map.setCenter(new google.maps.LatLng('<?php echo $default_lat; ?>', '<?php echo $default_lng; ?>'));
354 354
                 baseMarker.setPosition(new google.maps.LatLng('<?php echo $default_lat; ?>', '<?php echo $default_lng; ?>'));
355 355
                 updateMarkerPosition(baseMarker.getPosition());
@@ -358,11 +358,11 @@  discard block
 block discarded – undo
358 358
             <?php } ?>
359 359
             updateMarkerAddress(getAddress, getZip, getCity, getState, getCountry);
360 360
         } else {
361
-            updateMarkerAddress('<?php echo addslashes_gpc(__('Cannot determine address at this location.','geodirectory'));?>');
361
+            updateMarkerAddress('<?php echo addslashes_gpc(__('Cannot determine address at this location.', 'geodirectory')); ?>');
362 362
         }
363 363
     }
364 364
     function centerMap(latlng) {
365
-        jQuery("#<?php echo $prefix.'map';?>").goMap();
365
+        jQuery("#<?php echo $prefix.'map'; ?>").goMap();
366 366
         if (window.gdMaps == 'google') {
367 367
             jQuery.goMap.map.panTo(baseMarker.getPosition());
368 368
         } else if (window.gdMaps == 'osm') {
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         }
372 372
     }
373 373
     function centerMarker() {
374
-        jQuery("#<?php echo $prefix.'map';?>").goMap();
374
+        jQuery("#<?php echo $prefix.'map'; ?>").goMap();
375 375
         var center = jQuery.goMap.map.getCenter();
376 376
         if (window.gdMaps == 'google') {
377 377
             baseMarker.setPosition(center);
@@ -380,48 +380,48 @@  discard block
 block discarded – undo
380 380
         }
381 381
     }
382 382
     function updateMapZoom(zoom) {
383
-        jQuery('#<?php echo $prefix.'mapzoom';?>').val(zoom);
383
+        jQuery('#<?php echo $prefix.'mapzoom'; ?>').val(zoom);
384 384
     }
385 385
     function updateMarkerPosition(markerlatLng) {
386
-        jQuery("#<?php echo $prefix.'map';?>").goMap();
387
-        jQuery('#<?php echo $prefix.'latitude';?>').val(markerlatLng.lat());
388
-        jQuery('#<?php echo $prefix.'longitude';?>').val(markerlatLng.lng());
386
+        jQuery("#<?php echo $prefix.'map'; ?>").goMap();
387
+        jQuery('#<?php echo $prefix.'latitude'; ?>').val(markerlatLng.lat());
388
+        jQuery('#<?php echo $prefix.'longitude'; ?>').val(markerlatLng.lng());
389 389
     }
390 390
     function updateMarkerPositionOSM(markerlatLng) {
391
-        jQuery('#<?php echo $prefix.'latitude';?>').val(markerlatLng.lat);
392
-        jQuery('#<?php echo $prefix.'longitude';?>').val(markerlatLng.lng);
391
+        jQuery('#<?php echo $prefix.'latitude'; ?>').val(markerlatLng.lat);
392
+        jQuery('#<?php echo $prefix.'longitude'; ?>').val(markerlatLng.lng);
393 393
     }
394 394
     function updateMarkerAddress(getAddress, getZip, getCity, getState, getCountry) {
395
-        var set_map_val_in_fields = '<?php echo addslashes_gpc($auto_change_map_fields);?>';
396
-        <?php ob_start();?>
397
-        var old_country = jQuery("#<?php echo $prefix.'country';?>").val();
398
-        var old_region = jQuery("#<?php echo $prefix.'region';?>").val();
395
+        var set_map_val_in_fields = '<?php echo addslashes_gpc($auto_change_map_fields); ?>';
396
+        <?php ob_start(); ?>
397
+        var old_country = jQuery("#<?php echo $prefix.'country'; ?>").val();
398
+        var old_region = jQuery("#<?php echo $prefix.'region'; ?>").val();
399 399
         
400
-        if (user_address == false || jQuery('#<?php echo $prefix.'address';?>').val() == '') {
401
-            jQuery("#<?php echo $prefix.'address';?>").val(getAddress);
400
+        if (user_address == false || jQuery('#<?php echo $prefix.'address'; ?>').val() == '') {
401
+            jQuery("#<?php echo $prefix.'address'; ?>").val(getAddress);
402 402
         }
403 403
         if (getAddress) {
404 404
             oldstr_address = getAddress;
405 405
         }
406 406
 
407
-        jQuery("#<?php echo $prefix.'zip';?>").val(getZip);
407
+        jQuery("#<?php echo $prefix.'zip'; ?>").val(getZip);
408 408
         if (getZip) {
409 409
             oldstr_zip = getZip;
410 410
         }
411 411
         if (set_map_val_in_fields) {
412 412
             if (getCountry) {
413
-                jQuery('#<?php echo $prefix .'country'; ?> option[value=""]').attr("selected",false);
414
-                jQuery('#<?php echo $prefix.'country';?> option[data-country_code="' + getCountryISO + '"]').attr("selected", true);
415
-                jQuery("#<?php echo $prefix.'country';?>").trigger("chosen:updated");
413
+                jQuery('#<?php echo $prefix.'country'; ?> option[value=""]').attr("selected",false);
414
+                jQuery('#<?php echo $prefix.'country'; ?> option[data-country_code="' + getCountryISO + '"]').attr("selected", true);
415
+                jQuery("#<?php echo $prefix.'country'; ?>").trigger("chosen:updated");
416 416
             }
417 417
             if (getState) {
418
-                if (jQuery('input[id="<?php echo $prefix.'region';?>"]').attr('id')) {
419
-                    jQuery("#<?php echo $prefix.'region';?>").val(getState);
418
+                if (jQuery('input[id="<?php echo $prefix.'region'; ?>"]').attr('id')) {
419
+                    jQuery("#<?php echo $prefix.'region'; ?>").val(getState);
420 420
                 }
421 421
             }
422 422
             if (getCity) {
423
-                if (jQuery('input[id="<?php echo $prefix.'city';?>"]').attr('id')) {
424
-                    jQuery("#<?php echo $prefix.'city';?>").val(getCity);
423
+                if (jQuery('input[id="<?php echo $prefix.'city'; ?>"]').attr('id')) {
424
+                    jQuery("#<?php echo $prefix.'city'; ?>").val(getCity);
425 425
                 }
426 426
             }
427 427
         }
@@ -437,15 +437,15 @@  discard block
 block discarded – undo
437 437
         ?>
438 438
     }
439 439
     function geodir_codeAddress(set_on_map) {
440
-        var address = jQuery('#<?php echo $prefix.'address';?>').val();
441
-        var zip = jQuery('#<?php echo $prefix.'zip';?>').val();
442
-        var city = jQuery('#<?php echo $prefix.'city';?>').val();
443
-        var region = jQuery('#<?php echo $prefix.'region';?>').val();
444
-        var country = jQuery('#<?php echo $prefix.'country';?>').val();
445
-        var country_selected = jQuery('#<?php echo $prefix.'country';?>').find('option:selected');
440
+        var address = jQuery('#<?php echo $prefix.'address'; ?>').val();
441
+        var zip = jQuery('#<?php echo $prefix.'zip'; ?>').val();
442
+        var city = jQuery('#<?php echo $prefix.'city'; ?>').val();
443
+        var region = jQuery('#<?php echo $prefix.'region'; ?>').val();
444
+        var country = jQuery('#<?php echo $prefix.'country'; ?>').val();
445
+        var country_selected = jQuery('#<?php echo $prefix.'country'; ?>').find('option:selected');
446 446
         var ISO2 = country_selected.data('country_code');
447
-        if (!ISO2 && jQuery('#<?php echo $prefix.'country';?>').data('country_code')) {
448
-            ISO2 = jQuery('#<?php echo $prefix.'country';?>').data('country_code');
447
+        if (!ISO2 && jQuery('#<?php echo $prefix.'country'; ?>').data('country_code')) {
448
+            ISO2 = jQuery('#<?php echo $prefix.'country'; ?>').data('country_code');
449 449
         }
450 450
         if (ISO2 == '--') {
451 451
             ISO2 = '';
@@ -454,13 +454,13 @@  discard block
 block discarded – undo
454 454
             zip = '';
455 455
         }
456 456
         if (typeof city == "undefined") {
457
-            city = '<?php echo addslashes_gpc($city);?>';
457
+            city = '<?php echo addslashes_gpc($city); ?>';
458 458
         }
459 459
         if (typeof region == "undefined") {
460
-            region = '<?php echo addslashes_gpc($region);?>';
460
+            region = '<?php echo addslashes_gpc($region); ?>';
461 461
         }
462 462
         if (typeof country == "undefined") {
463
-            country = '<?php echo addslashes_gpc($country);?>';
463
+            country = '<?php echo addslashes_gpc($country); ?>';
464 464
         }
465 465
         var is_restrict = '<?php echo $is_map_restrict; ?>';
466 466
         <?php ob_start();
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
             if( address == city || address == region || address == country || address == zip )
479 479
                 address = '';
480 480
             <?php
481
-            if(is_admin() && isset($_REQUEST['tab'])){?>
481
+            if (is_admin() && isset($_REQUEST['tab'])) {?>
482 482
             if (jQuery.trim(city) == '' || jQuery.trim(region) == '') {
483 483
                 address = '';
484 484
             }
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
             geocoder.geocode({'address': address, 'country': ISO2},
526 526
                 function (results, status) {
527 527
                     console.log(status);
528
-                    jQuery("#<?php echo $prefix.'map';?>").goMap();
528
+                    jQuery("#<?php echo $prefix.'map'; ?>").goMap();
529 529
                     if (status == google.maps.GeocoderStatus.OK) {
530 530
                         baseMarker.setPosition(results[0].geometry.location);
531 531
                         jQuery.goMap.map.setCenter(results[0].geometry.location);
@@ -542,21 +542,21 @@  discard block
 block discarded – undo
542 542
                         geocodePosition(baseMarker.getPosition(), {'address': address, 'country': ISO2});
543 543
                         //}
544 544
                     } else {
545
-                        alert('<?php echo addslashes_gpc(__('Geocode was not successful for the following reason:','geodirectory'));?> ' + status);
545
+                        alert('<?php echo addslashes_gpc(__('Geocode was not successful for the following reason:', 'geodirectory')); ?> ' + status);
546 546
                     }
547 547
                 });
548 548
         }
549 549
     }
550 550
     function gdMaxMap() {
551
-        jQuery("#<?php echo $prefix.'map';?>").goMap();
551
+        jQuery("#<?php echo $prefix.'map'; ?>").goMap();
552 552
 
553
-        jQuery('#<?php echo $prefix.'map';?>').toggleClass('map-fullscreen');
553
+        jQuery('#<?php echo $prefix.'map'; ?>').toggleClass('map-fullscreen');
554 554
         jQuery('.map_category').toggleClass('map_category_fullscreen');
555
-        jQuery('#<?php echo $prefix;?>trigger').toggleClass('map_category_fullscreen');
555
+        jQuery('#<?php echo $prefix; ?>trigger').toggleClass('map_category_fullscreen');
556 556
         jQuery('body').toggleClass('body_fullscreen');
557
-        jQuery('#<?php echo $prefix;?>loading_div').toggleClass('loading_div_fullscreen');
558
-        jQuery('#<?php echo $prefix;?>advmap_nofound').toggleClass('nofound_fullscreen');
559
-        jQuery('#<?php echo $prefix;?>triggermap').toggleClass('triggermap_fullscreen');
557
+        jQuery('#<?php echo $prefix; ?>loading_div').toggleClass('loading_div_fullscreen');
558
+        jQuery('#<?php echo $prefix; ?>advmap_nofound').toggleClass('nofound_fullscreen');
559
+        jQuery('#<?php echo $prefix; ?>triggermap').toggleClass('triggermap_fullscreen');
560 560
         jQuery('.TopLeft').toggleClass('TopLeft_fullscreen');
561 561
         window.setTimeout(function () {
562 562
             if (window.gdMaps == 'google') {
@@ -592,9 +592,9 @@  discard block
 block discarded – undo
592 592
             do_action('geodir_add_listing_geocode_js_vars');
593 593
             ?>
594 594
             <?php if ($is_map_restrict) { ?>
595
-            if (getCity.toLowerCase() != '<?php echo geodir_strtolower(addslashes_gpc($city));?>') {
596
-                alert('<?php echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.','geodirectory'), $city));?>');
597
-                jQuery("#<?php echo $prefix.'map';?>").goMap();
595
+            if (getCity.toLowerCase() != '<?php echo geodir_strtolower(addslashes_gpc($city)); ?>') {
596
+                alert('<?php echo addslashes_gpc(wp_sprintf(__('Please choose any address of the (%s) city only.', 'geodirectory'), $city)); ?>');
597
+                jQuery("#<?php echo $prefix.'map'; ?>").goMap();
598 598
                 centerMap(new L.latLng('<?php echo $default_lat; ?>', '<?php echo $default_lng; ?>'));
599 599
                 baseMarker.setLatLng(new L.latLng('<?php echo $default_lat; ?>', '<?php echo $default_lng; ?>'));
600 600
                 updateMarkerPositionOSM(baseMarker.getLatLng());
@@ -603,39 +603,39 @@  discard block
 block discarded – undo
603 603
             <?php } ?>
604 604
             updateMarkerAddress(getAddress, getZip, getCity, getState, getCountry);
605 605
         } else {
606
-            alert('<?php echo addslashes_gpc(__('Cannot determine address at this location.','geodirectory'));?>');
606
+            alert('<?php echo addslashes_gpc(__('Cannot determine address at this location.', 'geodirectory')); ?>');
607 607
         }
608 608
     }
609 609
     
610 610
     jQuery(function ($) {
611
-        $("#<?php echo $prefix.'map';?>").goMap({
612
-            latitude: <?php echo $prefix;?>CITY_MAP_CENTER_LAT,
613
-            longitude: <?php echo $prefix;?>CITY_MAP_CENTER_LNG,
614
-            zoom: <?php echo $prefix;?>CITY_MAP_ZOOMING_FACT,
611
+        $("#<?php echo $prefix.'map'; ?>").goMap({
612
+            latitude: <?php echo $prefix; ?>CITY_MAP_CENTER_LAT,
613
+            longitude: <?php echo $prefix; ?>CITY_MAP_CENTER_LNG,
614
+            zoom: <?php echo $prefix; ?>CITY_MAP_ZOOMING_FACT,
615 615
             maptype: 'ROADMAP', // Map type - HYBRID, ROADMAP, SATELLITE, TERRAIN
616 616
             streetViewControl: true,
617
-            <?php if(get_option('geodir_add_listing_mouse_scroll')) { echo 'scrollwheel: false,';}?>
617
+            <?php if (get_option('geodir_add_listing_mouse_scroll')) { echo 'scrollwheel: false,'; }?>
618 618
         });
619 619
 
620 620
         if (window.gdMaps) {
621 621
             geocoder = window.gdMaps == 'google' ? new google.maps.Geocoder() : [];
622 622
 
623 623
             baseMarker = $.goMap.createMarker({
624
-                latitude: <?php echo $prefix;?>CITY_MAP_CENTER_LAT,
625
-                longitude: <?php echo $prefix;?>CITY_MAP_CENTER_LNG,
624
+                latitude: <?php echo $prefix; ?>CITY_MAP_CENTER_LAT,
625
+                longitude: <?php echo $prefix; ?>CITY_MAP_CENTER_LNG,
626 626
                 id: 'baseMarker',
627
-                icon: '<?php echo $marker_icon;?>',
627
+                icon: '<?php echo $marker_icon; ?>',
628 628
                 draggable: true,
629 629
                 addToMap: true, // For OSM
630
-                w: parseFloat('<?php echo $icon_size['w'];?>'),
631
-                h: parseFloat('<?php echo $icon_size['h'];?>'),
630
+                w: parseFloat('<?php echo $icon_size['w']; ?>'),
631
+                h: parseFloat('<?php echo $icon_size['h']; ?>'),
632 632
             });
633 633
         } else {
634
-            jQuery('#<?php echo $prefix.'advmap_nofound';?>').hide();
635
-            jQuery('#<?php echo $prefix.'advmap_notloaded';?>').show();
634
+            jQuery('#<?php echo $prefix.'advmap_nofound'; ?>').hide();
635
+            jQuery('#<?php echo $prefix.'advmap_notloaded'; ?>').show();
636 636
         }
637 637
         
638
-        $("#<?php echo $prefix;?>set_address_button").click(function () {
638
+        $("#<?php echo $prefix; ?>set_address_button").click(function () {
639 639
             var set_on_map = true;
640 640
             geodir_codeAddress(set_on_map);
641 641
         });
@@ -669,14 +669,14 @@  discard block
 block discarded – undo
669 669
                 updateMapZoom($.goMap.map.zoom);
670 670
             });
671 671
 
672
-            var maxMap = document.getElementById('<?php echo $prefix;?>triggermap');
672
+            var maxMap = document.getElementById('<?php echo $prefix; ?>triggermap');
673 673
             google.maps.event.addDomListener(maxMap, 'click', gdMaxMap);
674 674
 
675 675
             <?php if ($is_map_restrict) { ?>
676
-            var CITY_ADDRESS = '<?php echo addslashes_gpc($city).','.addslashes_gpc($region).','.addslashes_gpc($country);?>';
676
+            var CITY_ADDRESS = '<?php echo addslashes_gpc($city).','.addslashes_gpc($region).','.addslashes_gpc($country); ?>';
677 677
             geocoder.geocode({'address': CITY_ADDRESS},
678 678
                 function (results, status) {
679
-                    $("#<?php echo $prefix.'map';?>").goMap();
679
+                    $("#<?php echo $prefix.'map'; ?>").goMap();
680 680
                     if (status == google.maps.GeocoderStatus.OK) {
681 681
                         // Bounds for North America
682 682
                         var bound_lat_lng = String(results[0].geometry.bounds);
@@ -687,13 +687,13 @@  discard block
 block discarded – undo
687 687
                             new google.maps.LatLng(bound_lat_lng[2], bound_lat_lng[3])
688 688
                         );
689 689
                     } else {
690
-                        alert("<?php _e('Geocode was not successful for the following reason:','geodirectory');?> " + status);
690
+                        alert("<?php _e('Geocode was not successful for the following reason:', 'geodirectory'); ?> " + status);
691 691
                     }
692 692
                 });
693 693
             <?php } ?>
694 694
             // Limit the zoom level
695 695
             google.maps.event.addListener($.goMap.map, 'zoom_changed', function () {
696
-                $("#<?php echo $prefix.'map';?>").goMap();
696
+                $("#<?php echo $prefix.'map'; ?>").goMap();
697 697
                 if ($.goMap.map.getZoom() < minZoomLevel) $.goMap.map.setZoom(minZoomLevel);
698 698
             });
699 699
         } else if (window.gdMaps == 'osm') {
@@ -719,10 +719,10 @@  discard block
 block discarded – undo
719 719
                 updateMapZoom($.goMap.map.getZoom());
720 720
             });
721 721
 
722
-            L.DomEvent.addListener($('<?php echo $prefix;?>triggermap'), 'click', gdMaxMap);
722
+            L.DomEvent.addListener($('<?php echo $prefix; ?>triggermap'), 'click', gdMaxMap);
723 723
 
724 724
             <?php if ($is_map_restrict) { ?>
725
-            var CITY_ADDRESS = '<?php echo addslashes_gpc($city).', '.addslashes_gpc($region).', '.addslashes_gpc($country);?>';
725
+            var CITY_ADDRESS = '<?php echo addslashes_gpc($city).', '.addslashes_gpc($region).', '.addslashes_gpc($country); ?>';
726 726
             geocodePositionOSM('', CITY_ADDRESS);
727 727
             <?php } ?>
728 728
             // Limit the zoom level
@@ -745,14 +745,14 @@  discard block
 block discarded – undo
745 745
 <div class="top_banner_section_inn geodir_map_container clearfix" style="margin-top:10px;">
746 746
     <div class="TopLeft"><span id="<?php echo $prefix; ?>triggermap" style="margin-top:-11px;margin-left:-12px;"></span></div>
747 747
     <div class="TopRight"></div>
748
-    <div id="<?php echo $prefix . 'map'; ?>" class="geodir_map" style="height:300px">
748
+    <div id="<?php echo $prefix.'map'; ?>" class="geodir_map" style="height:300px">
749 749
         <!-- new map start -->
750 750
         <div class="iprelative">
751
-            <div id="<?php echo $prefix . 'map'; ?>" style="float:right;height:300px;position:relative;" class="form_row clearfix"></div>
751
+            <div id="<?php echo $prefix.'map'; ?>" style="float:right;height:300px;position:relative;" class="form_row clearfix"></div>
752 752
             <div id="<?php echo $prefix; ?>loading_div" style="height:300px"></div>
753 753
             <div id="<?php echo $prefix; ?>advmap_counter"></div>
754 754
             <div id="<?php echo $prefix; ?>advmap_nofound"><?php echo MAP_NO_RESULTS; ?></div>
755
-            <div id="<?php echo $prefix;?>advmap_notloaded" class="advmap_notloaded"><?php _e('<h3>Map Not Loaded</h3><p>Sorry, unable to load Maps API.', 'geodirectory'); ?></div>
755
+            <div id="<?php echo $prefix; ?>advmap_notloaded" class="advmap_notloaded"><?php _e('<h3>Map Not Loaded</h3><p>Sorry, unable to load Maps API.', 'geodirectory'); ?></div>
756 756
         </div>
757 757
         <!-- new map end -->
758 758
     </div>
Please login to merge, or discard this patch.
geodirectory-functions/map-functions/map_template_tags.php 3 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -223,10 +223,11 @@  discard block
 block discarded – undo
223 223
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/>
224 224
                 <?php }
225 225
 
226
-                if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters'])
227
-                    $show_entire_cat_panel = "none";
228
-                else
229
-                    $show_entire_cat_panel = "''";
226
+                if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) {
227
+                                    $show_entire_cat_panel = "none";
228
+                } else {
229
+                                    $show_entire_cat_panel = "''";
230
+                }
230 231
                 ?>
231 232
 
232 233
                 <?php if ($geodir_map_options['enable_map_direction']) { ?>
@@ -288,8 +289,9 @@  discard block
 block discarded – undo
288 289
 				}
289 290
 				
290 291
 				$geodir_default_map_search_pt = get_option('geodir_default_map_search_pt');
291
-				if (empty($geodir_default_map_search_pt))
292
-					$geodir_default_map_search_pt = 'gd_place';
292
+				if (empty($geodir_default_map_search_pt)) {
293
+									$geodir_default_map_search_pt = 'gd_place';
294
+				}
293 295
 
294 296
 				/**
295 297
 				 * Filter the post type to retrive data for map
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
 
130 130
     if (strpos($geodir_map_options['height'], '%') !== false || strpos($geodir_map_options['height'], 'px') !== false || strpos($geodir_map_options['height'], 'vh') !== false) {
131 131
     } else {
132
-        $geodir_map_options['height'] = $geodir_map_options['height'] . 'px';
132
+        $geodir_map_options['height'] = $geodir_map_options['height'].'px';
133 133
     }
134 134
 
135 135
     if (strpos($geodir_map_options['width'], '%') !== false || strpos($geodir_map_options['width'], 'px') !== false) {
136 136
     } else {
137
-        $geodir_map_options['width'] = $geodir_map_options['width'] . 'px';
137
+        $geodir_map_options['width'] = $geodir_map_options['width'].'px';
138 138
     }
139 139
 
140 140
     /**
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
 	 */
167 167
 	$exclude_post_types = apply_filters("geodir_exclude_post_type_on_map_{$map_canvas_name}", get_option('geodir_exclude_post_type_on_map'));
168 168
 
169
-    if (count((array)$post_types) != count($exclude_post_types) || ($enable_jason_on_load)):
169
+    if (count((array) $post_types) != count($exclude_post_types) || ($enable_jason_on_load)):
170 170
         // Set default map options
171 171
 
172
-        wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js',array(),false,true);
172
+        wp_enqueue_script('geodir-map-widget', geodir_plugin_url().'/geodirectory-functions/map-functions/js/map.min.js', array(), false, true);
173 173
 
174 174
         wp_localize_script('geodir-map-widget', $map_canvas_name, $geodir_map_options);
175 175
 
@@ -188,41 +188,41 @@  discard block
 block discarded – undo
188 188
 		 */
189 189
 		$map_width = apply_filters('geodir_change_map_width', $map_width);
190 190
         ?>
191
-        <div id="catcher_<?php echo $map_canvas_name;?>"></div>
191
+        <div id="catcher_<?php echo $map_canvas_name; ?>"></div>
192 192
         <div class="stick_trigger_container">
193 193
             <div class="trigger_sticky triggeroff_sticky"></div>
194
-            <div class="top_banner_section geodir_map_container <?php echo $map_class_name;?>"
195
-                 id="sticky_map_<?php echo $map_canvas_name;?>"
196
-                 style="min-height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;">
194
+            <div class="top_banner_section geodir_map_container <?php echo $map_class_name; ?>"
195
+                 id="sticky_map_<?php echo $map_canvas_name; ?>"
196
+                 style="min-height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;">
197 197
 
198 198
                 <div class="map_background">
199 199
                     <div class="top_banner_section_in clearfix">
200
-                        <div class="<?php echo $map_canvas_name;?>_TopLeft TopLeft"><span class="triggermap" id="<?php echo $map_canvas_name;?>_triggermap" <?php if (!$geodir_map_options['enable_map_resize_button']) { ?> <?php }?>><i class="fa fa-arrows-alt"></i></span></div>
201
-                        <div class="<?php echo $map_canvas_name;?>_TopRight TopRight"></div>
202
-                        <div id="<?php echo $map_canvas_name;?>_wrapper" class="main_map_wrapper"
203
-                             style="height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;">
200
+                        <div class="<?php echo $map_canvas_name; ?>_TopLeft TopLeft"><span class="triggermap" id="<?php echo $map_canvas_name; ?>_triggermap" <?php if (!$geodir_map_options['enable_map_resize_button']) { ?> <?php }?>><i class="fa fa-arrows-alt"></i></span></div>
201
+                        <div class="<?php echo $map_canvas_name; ?>_TopRight TopRight"></div>
202
+                        <div id="<?php echo $map_canvas_name; ?>_wrapper" class="main_map_wrapper"
203
+                             style="height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;">
204 204
                             <!-- new map start -->
205 205
                             <div class="iprelative">
206
-                                <div class="geodir_marker_cluster" id="<?php echo $map_canvas_name;?>"
207
-                                     style="height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;"></div>
208
-                                <div id="<?php echo $map_canvas_name;?>_loading_div" class="loading_div"
209
-                                     style=" height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;"></div>
206
+                                <div class="geodir_marker_cluster" id="<?php echo $map_canvas_name; ?>"
207
+                                     style="height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;"></div>
208
+                                <div id="<?php echo $map_canvas_name; ?>_loading_div" class="loading_div"
209
+                                     style=" height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;"></div>
210 210
                                 <!--<div id="home_map_counter"></div>        -->
211
-                                <div id="<?php echo $map_canvas_name;?>_map_nofound"
211
+                                <div id="<?php echo $map_canvas_name; ?>_map_nofound"
212 212
                                      class="advmap_nofound"><?php echo MAP_NO_RESULTS; ?></div>
213
-                                <div id="<?php echo $map_canvas_name;?>_map_notloaded"
213
+                                <div id="<?php echo $map_canvas_name; ?>_map_notloaded"
214 214
                                      class="advmap_notloaded"><?php _e('<h3>Google Map Not Loaded</h3><p>Sorry, unable to load Google Maps API.', 'geodirectory'); ?></div>
215 215
                             </div>
216 216
                             <!-- new map end -->
217 217
                         </div>
218
-                        <div class="<?php echo $map_canvas_name;?>_BottomLeft BottomLeft"></div>
218
+                        <div class="<?php echo $map_canvas_name; ?>_BottomLeft BottomLeft"></div>
219 219
                     </div>
220 220
                 </div>
221 221
                 <?php if ($geodir_map_options['enable_jason_on_load']) { ?>
222
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="1"/>
222
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_jason_enabled" value="1"/>
223 223
                 <?php } else {
224 224
                     ?>
225
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/>
225
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_jason_enabled" value="0"/>
226 226
                 <?php }
227 227
 
228 228
                 if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters'])
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                            onclick="calcRoute('<?php echo $map_canvas_name; ?>')"/>
243 243
 
244 244
                     <script>
245
-                        <?php if(geodir_is_page('detail')){?>
245
+                        <?php if (geodir_is_page('detail')) {?>
246 246
                         jQuery(function () {
247 247
                             gd_initialize_ac();
248 248
                         });
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                                 // Create the autocomplete object, restricting the search
254 254
                                 // to geographical location types.
255 255
                                 autocomplete = new google.maps.places.Autocomplete(
256
-                                    /** @type {HTMLInputElement} */(document.getElementById('<?php echo $map_canvas_name;?>_fromAddress')),
256
+                                    /** @type {HTMLInputElement} */(document.getElementById('<?php echo $map_canvas_name; ?>_fromAddress')),
257 257
                                     {types: ['geocode']});
258 258
                                 // When the user selects an address from the dropdown,
259 259
                                 // populate the address fields in the form.
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                                 
267 267
                                 if (window.gdMaps == 'osm') {
268 268
                                     window.setTimeout(function() {
269
-                                        calcRoute('<?php echo $map_canvas_name;?>');
269
+                                        calcRoute('<?php echo $map_canvas_name; ?>');
270 270
                                     }, 1000);
271 271
                                 }
272 272
                             }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 				 */
321 321
 				$map_search_pt = apply_filters('geodir_default_map_search_pt', $geodir_default_map_search_pt);
322 322
 				?>
323
-                <div class="map-category-listing-main" style="display:<?php echo $show_entire_cat_panel;?>">
323
+                <div class="map-category-listing-main" style="display:<?php echo $show_entire_cat_panel; ?>">
324 324
                     <?php
325 325
                     $exclude_post_types = get_option('geodir_exclude_post_type_on_map');
326 326
                     $geodir_available_pt_on_map = count(geodir_get_posttypes('array')) - count($exclude_post_types);
@@ -330,12 +330,12 @@  discard block
 block discarded – undo
330 330
 					}
331 331
                     ?>
332 332
                     <div
333
-                        class="map-category-listing<?php echo $map_cat_class;?>">
333
+                        class="map-category-listing<?php echo $map_cat_class; ?>">
334 334
                         <div class="trigger triggeroff"><i class="fa fa-compress"></i><i class="fa fa-expand"></i></div>
335
-                        <div id="<?php echo $map_canvas_name;?>_cat"
336
-                             class="<?php echo $map_canvas_name;?>_map_category  map_category"
337
-                             <?php if ($child_collapse){ ?>checked="checked" <?php }?>
338
-                             style="max-height:<?php echo $geodir_map_options['height'];?>;">
335
+                        <div id="<?php echo $map_canvas_name; ?>_cat"
336
+                             class="<?php echo $map_canvas_name; ?>_map_category  map_category"
337
+                             <?php if ($child_collapse) { ?>checked="checked" <?php }?>
338
+                             style="max-height:<?php echo $geodir_map_options['height']; ?>;">
339 339
                             <input
340 340
                                 onkeydown="if(event.keyCode == 13){build_map_ajax_search_param('<?php echo $map_canvas_name; ?>', false)}"
341 341
                                 type="text"
@@ -347,11 +347,11 @@  discard block
 block discarded – undo
347 347
                                     <input type="hidden" id="<?php echo $map_canvas_name; ?>_child_collapse" value="1"/>
348 348
                                 <?php } else {$child_collapse = "0";
349 349
                                     ?>
350
-                                    <input type="hidden" id="<?php echo $map_canvas_name;?>_child_collapse" value="0"/>
350
+                                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_child_collapse" value="0"/>
351 351
                                 <?php } ?>
352 352
                                 <input type="hidden" id="<?php echo $map_canvas_name; ?>_cat_enabled" value="1"/>
353 353
                                 <div class="toggle">
354
-                                    <?php echo home_map_taxonomy_walker(array($map_search_pt.'category'),0,true,0,$map_canvas_name,$child_collapse,true); ?>
354
+                                    <?php echo home_map_taxonomy_walker(array($map_search_pt.'category'), 0, true, 0, $map_canvas_name, $child_collapse, true); ?>
355 355
                                     <script>jQuery( document ).ready(function() {
356 356
                                             geodir_show_sub_cat_collapse_button();
357 357
                                         });</script>
@@ -379,21 +379,21 @@  discard block
 block discarded – undo
379 379
 					$city = $country != 'me' ? $city : '';
380 380
                     $gd_neighbourhood = isset($_REQUEST['gd_neighbourhood']) ? sanitize_text_field($_REQUEST['gd_neighbourhood']) : '';
381 381
                     ?>
382
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="1"/>
383
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_country" name="gd_country"
384
-                           value="<?php echo $country;?>"/>
385
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_region" name="gd_region"
386
-                           value="<?php echo $region;?>"/>
387
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_city" name="gd_city"
388
-                           value="<?php echo $city;?>"/>
389
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_neighbourhood" name="gd_neighbourhood"
390
-                           value="<?php echo $gd_neighbourhood;?>"/>
382
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_location_enabled" value="1"/>
383
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_country" name="gd_country"
384
+                           value="<?php echo $country; ?>"/>
385
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_region" name="gd_region"
386
+                           value="<?php echo $region; ?>"/>
387
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_city" name="gd_city"
388
+                           value="<?php echo $city; ?>"/>
389
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_neighbourhood" name="gd_neighbourhood"
390
+                           value="<?php echo $gd_neighbourhood; ?>"/>
391 391
                 <?php } else { //end of location filter
392 392
                     ?>
393
-                    <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="0"/>
393
+                    <input type="hidden" id="<?php echo $map_canvas_name; ?>_location_enabled" value="0"/>
394 394
                 <?php }?>
395 395
 
396
-                <input type="hidden" id="<?php echo $map_canvas_name;?>_posttype" name="gd_posttype" value="<?php echo $map_search_pt;?>"/>
396
+                <input type="hidden" id="<?php echo $map_canvas_name; ?>_posttype" name="gd_posttype" value="<?php echo $map_search_pt; ?>"/>
397 397
 
398 398
                 <input type="hidden" name="limitstart" value=""/>
399 399
 
@@ -401,10 +401,10 @@  discard block
 block discarded – undo
401 401
 
402 402
                 <?php if ($geodir_map_options['enable_post_type_filters']) {
403 403
                     $post_types = geodir_get_posttypes('object');
404
-                    if (count((array)($post_types)) > 1) {
404
+                    if (count((array) ($post_types)) > 1) {
405 405
                         ?>
406
-                        <div class="map-places-listing" id="<?php echo $map_canvas_name;?>_posttype_menu"
407
-                             style="max-width:<?php echo $map_width;?>!important;">
406
+                        <div class="map-places-listing" id="<?php echo $map_canvas_name; ?>_posttype_menu"
407
+                             style="max-width:<?php echo $map_width; ?>!important;">
408 408
 
409 409
                             <?php if (isset($geodir_map_options['is_geodir_home_map_widget']) && $map_args['is_geodir_home_map_widget']) { ?>
410 410
                             <div class="geodir-map-posttype-list"><?php } ?>
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
                                     foreach ($post_types as $post_type => $args) {
416 416
                                         if (!in_array($post_type, $exclude_post_types)) {
417 417
                                             $class = $map_search_pt == $post_type ? 'class="gd-map-search-pt"' : '';
418
-											echo '<li id="' . $post_type . '" ' . $class . '><a href="javascript:void(0);" onclick="jQuery(\'#' . $map_canvas_name . '_posttype\').val(\'' . $post_type . '\');build_map_ajax_search_param(\'' . $map_canvas_name . '\', true)">' . __(ucfirst($args->labels->name), 'geodirectory') . '</a></li>';
418
+											echo '<li id="'.$post_type.'" '.$class.'><a href="javascript:void(0);" onclick="jQuery(\'#'.$map_canvas_name.'_posttype\').val(\''.$post_type.'\');build_map_ajax_search_param(\''.$map_canvas_name.'\', true)">'.__(ucfirst($args->labels->name), 'geodirectory').'</a></li>';
419 419
                                         }
420 420
                                     }
421 421
                                     ?>
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
         <script type="text/javascript">
441 441
 
442 442
             jQuery(document).ready(function () {
443
-                //initMap('<?php echo $map_canvas_name;?>'); // depreciated, no need to load this twice
444
-                build_map_ajax_search_param('<?php echo $map_canvas_name;?>', false);
445
-                map_sticky('<?php echo $map_canvas_name;?>');
443
+                //initMap('<?php echo $map_canvas_name; ?>'); // depreciated, no need to load this twice
444
+                build_map_ajax_search_param('<?php echo $map_canvas_name; ?>', false);
445
+                map_sticky('<?php echo $map_canvas_name; ?>');
446 446
             });
447 447
 
448 448
         </script>
@@ -453,18 +453,18 @@  discard block
 block discarded – undo
453 453
             <script>
454 454
                 (function () {
455 455
                     var screenH = jQuery(window).height();
456
-                    var heightVH = "<?php echo str_replace("vh", "", $geodir_map_options['height']);?>";
456
+                    var heightVH = "<?php echo str_replace("vh", "", $geodir_map_options['height']); ?>";
457 457
 
458 458
                     var ptypeH = '';
459
-                    if (jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").length) {
460
-                        ptypeH = jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").outerHeight();
459
+                    if (jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").length) {
460
+                        ptypeH = jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").outerHeight();
461 461
                     }
462 462
 
463
-                    jQuery("#sticky_map_<?php echo $map_canvas_name;?>").css("min-height", screenH * (heightVH / 100) + 'px');
464
-                    jQuery("#<?php echo $map_canvas_name;?>_wrapper").height(screenH * (heightVH / 100) + 'px');
465
-                    jQuery("#<?php echo $map_canvas_name;?>").height(screenH * (heightVH / 100) + 'px');
466
-                    jQuery("#<?php echo $map_canvas_name;?>_loading_div").height(screenH * (heightVH / 100) + 'px');
467
-                    jQuery("#<?php echo $map_canvas_name;?>_cat").css("max-height", (screenH * (heightVH / 100)) - ptypeH + 'px');
463
+                    jQuery("#sticky_map_<?php echo $map_canvas_name; ?>").css("min-height", screenH * (heightVH / 100) + 'px');
464
+                    jQuery("#<?php echo $map_canvas_name; ?>_wrapper").height(screenH * (heightVH / 100) + 'px');
465
+                    jQuery("#<?php echo $map_canvas_name; ?>").height(screenH * (heightVH / 100) + 'px');
466
+                    jQuery("#<?php echo $map_canvas_name; ?>_loading_div").height(screenH * (heightVH / 100) + 'px');
467
+                    jQuery("#<?php echo $map_canvas_name; ?>_cat").css("max-height", (screenH * (heightVH / 100)) - ptypeH + 'px');
468 468
 
469 469
                 }());
470 470
             </script>
@@ -476,13 +476,13 @@  discard block
 block discarded – undo
476 476
             <script>
477 477
                 (function () {
478 478
                     var screenH = jQuery(window).height();
479
-                    var heightVH = "<?php echo str_replace("px", "", $geodir_map_options['height']);?>";
479
+                    var heightVH = "<?php echo str_replace("px", "", $geodir_map_options['height']); ?>";
480 480
                     var ptypeH = '';
481
-                    if (jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").length) {
482
-                        ptypeH = jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").outerHeight();
481
+                    if (jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").length) {
482
+                        ptypeH = jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").outerHeight();
483 483
                     }
484 484
 
485
-                    jQuery("#<?php echo $map_canvas_name;?>_cat").css("max-height", heightVH - ptypeH + 'px');
485
+                    jQuery("#<?php echo $map_canvas_name; ?>_cat").css("max-height", heightVH - ptypeH + 'px');
486 486
 
487 487
                 }());
488 488
             </script>
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
          * @param array $geodir_map_options Array of map settings.
498 498
          * @param string $map_canvas_name The canvas name and ID for the map.
499 499
          */
500
-        do_action('geodir_map_after_render',$geodir_map_options,$map_canvas_name);
500
+        do_action('geodir_map_after_render', $geodir_map_options, $map_canvas_name);
501 501
 
502 502
 
503 503
     endif; // Exclude posttypes if end
Please login to merge, or discard this patch.
Indentation   +134 added lines, -134 removed lines patch added patch discarded remove patch
@@ -67,77 +67,77 @@  discard block
 block discarded – undo
67 67
  */
68 68
 function geodir_draw_map($map_args = array())
69 69
 {
70
-    global $map_canvas_arr;
71
-    $map_canvas_name = (!empty($map_args) && $map_args['map_canvas_name'] != '') ? $map_args['map_canvas_name'] : 'home_map_canvas';
72
-    $map_class_name = (!empty($map_args) && isset($map_args['map_class_name'])) ? $map_args['map_class_name'] : '';
73
-
74
-    $default_location = geodir_get_default_location();
75
-
76
-    $map_default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
77
-    $map_default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
78
-    $map_default_zoom = 12;
79
-    // map options default values
80
-    $width = 950;
81
-    $height = 450;
82
-    $child_collapse = '0';
83
-    $sticky = '';
84
-    $enable_cat_filters = false;
85
-    $enable_text_search = false;
86
-    $enable_post_type_filters = false;
87
-    $enable_location_filters = false;
88
-    $enable_jason_on_load = false;
89
-    $enable_map_direction = false;
90
-    $enable_marker_cluster = false;
91
-    $enable_map_resize_button = false;
92
-    $maptype = 'ROADMAP';
93
-
94
-    $geodir_map_options = array(
95
-        'width' => $width,
96
-        'height' => $height,
97
-        'child_collapse' => $child_collapse,
98
-        'sticky' => $sticky,
99
-        'enable_map_resize_button' => $enable_map_resize_button,
100
-        'enable_cat_filters' => $enable_cat_filters,
101
-        'enable_text_search' => $enable_text_search,
102
-        'enable_post_type_filters' => $enable_post_type_filters,
103
-        'enable_location_filters' => $enable_location_filters,
104
-        'enable_jason_on_load' => $enable_jason_on_load,
105
-        'enable_map_direction' => $enable_map_direction,
106
-        'enable_marker_cluster' => $enable_marker_cluster,
107
-        'ajax_url' => geodir_get_ajax_url(),
108
-        'map_canvas_name' => $map_canvas_name,
109
-        'inputText' => __('Title or Keyword', 'geodirectory'),
110
-        'latitude' => $map_default_lat,
111
-        'longitude' => $map_default_lng,
112
-        'zoom' => $map_default_zoom,
113
-        'scrollwheel' => true,
114
-        'streetViewControl' => true,
115
-        'maptype' => $maptype,
116
-        'showPreview' => '0',
117
-        'maxZoom' => 21,
118
-        'autozoom' => true,
119
-        'bubble_size' => 'small',
120
-        'token' => '68f48005e256696074e1da9bf9f67f06',
121
-        'navigationControlOptions' => array('position' => 'TOP_LEFT', 'style' => 'ZOOM_PAN')
122
-    );
123
-
124
-    if (!empty($map_args)) {
125
-        foreach ($map_args as $map_option_key => $map_option_value) {
126
-            $geodir_map_options[$map_option_key] = $map_option_value;
127
-        }
128
-    }
129
-
130
-    if (strpos($geodir_map_options['height'], '%') !== false || strpos($geodir_map_options['height'], 'px') !== false || strpos($geodir_map_options['height'], 'vh') !== false) {
131
-    } else {
132
-        $geodir_map_options['height'] = $geodir_map_options['height'] . 'px';
133
-    }
134
-
135
-    if (strpos($geodir_map_options['width'], '%') !== false || strpos($geodir_map_options['width'], 'px') !== false) {
136
-    } else {
137
-        $geodir_map_options['width'] = $geodir_map_options['width'] . 'px';
138
-    }
139
-
140
-    /**
70
+	global $map_canvas_arr;
71
+	$map_canvas_name = (!empty($map_args) && $map_args['map_canvas_name'] != '') ? $map_args['map_canvas_name'] : 'home_map_canvas';
72
+	$map_class_name = (!empty($map_args) && isset($map_args['map_class_name'])) ? $map_args['map_class_name'] : '';
73
+
74
+	$default_location = geodir_get_default_location();
75
+
76
+	$map_default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : '';
77
+	$map_default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : '';
78
+	$map_default_zoom = 12;
79
+	// map options default values
80
+	$width = 950;
81
+	$height = 450;
82
+	$child_collapse = '0';
83
+	$sticky = '';
84
+	$enable_cat_filters = false;
85
+	$enable_text_search = false;
86
+	$enable_post_type_filters = false;
87
+	$enable_location_filters = false;
88
+	$enable_jason_on_load = false;
89
+	$enable_map_direction = false;
90
+	$enable_marker_cluster = false;
91
+	$enable_map_resize_button = false;
92
+	$maptype = 'ROADMAP';
93
+
94
+	$geodir_map_options = array(
95
+		'width' => $width,
96
+		'height' => $height,
97
+		'child_collapse' => $child_collapse,
98
+		'sticky' => $sticky,
99
+		'enable_map_resize_button' => $enable_map_resize_button,
100
+		'enable_cat_filters' => $enable_cat_filters,
101
+		'enable_text_search' => $enable_text_search,
102
+		'enable_post_type_filters' => $enable_post_type_filters,
103
+		'enable_location_filters' => $enable_location_filters,
104
+		'enable_jason_on_load' => $enable_jason_on_load,
105
+		'enable_map_direction' => $enable_map_direction,
106
+		'enable_marker_cluster' => $enable_marker_cluster,
107
+		'ajax_url' => geodir_get_ajax_url(),
108
+		'map_canvas_name' => $map_canvas_name,
109
+		'inputText' => __('Title or Keyword', 'geodirectory'),
110
+		'latitude' => $map_default_lat,
111
+		'longitude' => $map_default_lng,
112
+		'zoom' => $map_default_zoom,
113
+		'scrollwheel' => true,
114
+		'streetViewControl' => true,
115
+		'maptype' => $maptype,
116
+		'showPreview' => '0',
117
+		'maxZoom' => 21,
118
+		'autozoom' => true,
119
+		'bubble_size' => 'small',
120
+		'token' => '68f48005e256696074e1da9bf9f67f06',
121
+		'navigationControlOptions' => array('position' => 'TOP_LEFT', 'style' => 'ZOOM_PAN')
122
+	);
123
+
124
+	if (!empty($map_args)) {
125
+		foreach ($map_args as $map_option_key => $map_option_value) {
126
+			$geodir_map_options[$map_option_key] = $map_option_value;
127
+		}
128
+	}
129
+
130
+	if (strpos($geodir_map_options['height'], '%') !== false || strpos($geodir_map_options['height'], 'px') !== false || strpos($geodir_map_options['height'], 'vh') !== false) {
131
+	} else {
132
+		$geodir_map_options['height'] = $geodir_map_options['height'] . 'px';
133
+	}
134
+
135
+	if (strpos($geodir_map_options['width'], '%') !== false || strpos($geodir_map_options['width'], 'px') !== false) {
136
+	} else {
137
+		$geodir_map_options['width'] = $geodir_map_options['width'] . 'px';
138
+	}
139
+
140
+	/**
141 141
 	 * Filter the options to use in google map.
142 142
 	 *
143 143
 	 * @since 1.0.0
@@ -146,9 +146,9 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	$geodir_map_options = apply_filters("geodir_map_options_{$map_canvas_name}", $geodir_map_options);
148 148
 
149
-    $map_canvas_arr[$map_canvas_name] = array();
149
+	$map_canvas_arr[$map_canvas_name] = array();
150 150
 
151
-    /**
151
+	/**
152 152
 	 * Filter the post types to display data on map.
153 153
 	 *
154 154
 	 * @since 1.0.0
@@ -166,20 +166,20 @@  discard block
 block discarded – undo
166 166
 	 */
167 167
 	$exclude_post_types = apply_filters("geodir_exclude_post_type_on_map_{$map_canvas_name}", get_option('geodir_exclude_post_type_on_map'));
168 168
 
169
-    if (count((array)$post_types) != count($exclude_post_types) || ($enable_jason_on_load)):
170
-        // Set default map options
169
+	if (count((array)$post_types) != count($exclude_post_types) || ($enable_jason_on_load)):
170
+		// Set default map options
171 171
 
172
-        wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js',array(),false,true);
172
+		wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js',array(),false,true);
173 173
 
174
-        wp_localize_script('geodir-map-widget', $map_canvas_name, $geodir_map_options);
174
+		wp_localize_script('geodir-map-widget', $map_canvas_name, $geodir_map_options);
175 175
 
176
-        if ($map_canvas_name == 'detail_page_map_canvas' || $map_canvas_name == 'preview_map_canvas') {
177
-            $map_width = '100%';
178
-        } else {
179
-            $map_width = $geodir_map_options['width'];
180
-        }
176
+		if ($map_canvas_name == 'detail_page_map_canvas' || $map_canvas_name == 'preview_map_canvas') {
177
+			$map_width = '100%';
178
+		} else {
179
+			$map_width = $geodir_map_options['width'];
180
+		}
181 181
 
182
-        /**
182
+		/**
183 183
 		 * Filter the width of map.
184 184
 		 *
185 185
 		 * @since 1.0.0
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		 * @param int $map_width Width of map box, eg: gd_place.
188 188
 		 */
189 189
 		$map_width = apply_filters('geodir_change_map_width', $map_width);
190
-        ?>
190
+		?>
191 191
         <div id="catcher_<?php echo $map_canvas_name;?>"></div>
192 192
         <div class="stick_trigger_container">
193 193
             <div class="trigger_sticky triggeroff_sticky"></div>
@@ -221,15 +221,15 @@  discard block
 block discarded – undo
221 221
                 <?php if ($geodir_map_options['enable_jason_on_load']) { ?>
222 222
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="1"/>
223 223
                 <?php } else {
224
-                    ?>
224
+					?>
225 225
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/>
226 226
                 <?php }
227 227
 
228
-                if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters'])
229
-                    $show_entire_cat_panel = "none";
230
-                else
231
-                    $show_entire_cat_panel = "''";
232
-                ?>
228
+				if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters'])
229
+					$show_entire_cat_panel = "none";
230
+				else
231
+					$show_entire_cat_panel = "''";
232
+				?>
233 233
 
234 234
                 <?php if ($geodir_map_options['enable_map_direction']) { ?>
235 235
 
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
                         <select id="travel-units" onchange="calcRoute('<?php echo $map_canvas_name; ?>')">
292 292
                             <option value="miles"><?php _e('Miles', 'geodirectory'); ?></option>
293 293
                             <option <?php if (get_option('geodir_search_dist_1') == 'km') {
294
-                                echo 'selected="selected"';
295
-                            } ?> value="kilometers"><?php _e('Kilometers', 'geodirectory'); ?></option>
294
+								echo 'selected="selected"';
295
+							} ?> value="kilometers"><?php _e('Kilometers', 'geodirectory'); ?></option>
296 296
                         </select>
297 297
                     </div>
298 298
 
@@ -304,12 +304,12 @@  discard block
 block discarded – undo
304 304
 				if (empty($geodir_default_map_search_pt))
305 305
 					$geodir_default_map_search_pt = 'gd_place';
306 306
 
307
-                global $gd_session;
308
-                $homemap_catlist_ptype = $gd_session->get('homemap_catlist_ptype');
307
+				global $gd_session;
308
+				$homemap_catlist_ptype = $gd_session->get('homemap_catlist_ptype');
309 309
 
310
-                if ($homemap_catlist_ptype) {
311
-                    $geodir_default_map_search_pt = $homemap_catlist_ptype;
312
-                }
310
+				if ($homemap_catlist_ptype) {
311
+					$geodir_default_map_search_pt = $homemap_catlist_ptype;
312
+				}
313 313
 
314 314
 				/**
315 315
 				 * Filter the post type to retrieve data for map
@@ -322,13 +322,13 @@  discard block
 block discarded – undo
322 322
 				?>
323 323
                 <div class="map-category-listing-main" style="display:<?php echo $show_entire_cat_panel;?>">
324 324
                     <?php
325
-                    $exclude_post_types = get_option('geodir_exclude_post_type_on_map');
326
-                    $geodir_available_pt_on_map = count(geodir_get_posttypes('array')) - count($exclude_post_types);
325
+					$exclude_post_types = get_option('geodir_exclude_post_type_on_map');
326
+					$geodir_available_pt_on_map = count(geodir_get_posttypes('array')) - count($exclude_post_types);
327 327
 					$map_cat_class = '';
328 328
 					if ($geodir_map_options['enable_post_type_filters']) {
329 329
 						$map_cat_class = $geodir_available_pt_on_map > 1 ? ' map-cat-ptypes' : ' map-cat-floor';
330 330
 					}
331
-                    ?>
331
+					?>
332 332
                     <div
333 333
                         class="map-category-listing<?php echo $map_cat_class;?>">
334 334
                         <div class="trigger triggeroff"><i class="fa fa-compress"></i><i class="fa fa-expand"></i></div>
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                                 <?php if ($geodir_map_options['child_collapse']) { $child_collapse = "1"; ?>
347 347
                                     <input type="hidden" id="<?php echo $map_canvas_name; ?>_child_collapse" value="1"/>
348 348
                                 <?php } else {$child_collapse = "0";
349
-                                    ?>
349
+									?>
350 350
                                     <input type="hidden" id="<?php echo $map_canvas_name;?>_child_collapse" value="0"/>
351 351
                                 <?php } ?>
352 352
                                 <input type="hidden" id="<?php echo $map_canvas_name; ?>_cat_enabled" value="1"/>
@@ -368,17 +368,17 @@  discard block
 block discarded – undo
368 368
                 <!-- map-category-listings-->
369 369
 
370 370
                 <?php
371
-                if ($geodir_map_options['enable_location_filters']) {
371
+				if ($geodir_map_options['enable_location_filters']) {
372 372
 					$country = get_query_var('gd_country');
373 373
 					$region = get_query_var('gd_region');
374 374
 					$city = get_query_var('gd_city');
375 375
                     
376
-                    //fix for location/me page
377
-                    $country = $country != 'me' ? $country : '';
376
+					//fix for location/me page
377
+					$country = $country != 'me' ? $country : '';
378 378
 					$region = $region != 'me' ? $region : '';
379 379
 					$city = $country != 'me' ? $city : '';
380
-                    $gd_neighbourhood = isset($_REQUEST['gd_neighbourhood']) ? sanitize_text_field($_REQUEST['gd_neighbourhood']) : '';
381
-                    ?>
380
+					$gd_neighbourhood = isset($_REQUEST['gd_neighbourhood']) ? sanitize_text_field($_REQUEST['gd_neighbourhood']) : '';
381
+					?>
382 382
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="1"/>
383 383
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_country" name="gd_country"
384 384
                            value="<?php echo $country;?>"/>
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_neighbourhood" name="gd_neighbourhood"
390 390
                            value="<?php echo $gd_neighbourhood;?>"/>
391 391
                 <?php } else { //end of location filter
392
-                    ?>
392
+					?>
393 393
                     <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="0"/>
394 394
                 <?php }?>
395 395
 
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
 
401 401
 
402 402
                 <?php if ($geodir_map_options['enable_post_type_filters']) {
403
-                    $post_types = geodir_get_posttypes('object');
404
-                    if (count((array)($post_types)) > 1) {
405
-                        ?>
403
+					$post_types = geodir_get_posttypes('object');
404
+					if (count((array)($post_types)) > 1) {
405
+						?>
406 406
                         <div class="map-places-listing" id="<?php echo $map_canvas_name;?>_posttype_menu"
407 407
                              style="max-width:<?php echo $map_width;?>!important;">
408 408
 
@@ -410,15 +410,15 @@  discard block
 block discarded – undo
410 410
                             <div class="geodir-map-posttype-list"><?php } ?>
411 411
                                 <ul class="clearfix place-list">
412 412
                                     <?php
413
-                                    $exclude_post_types = get_option('geodir_exclude_post_type_on_map');
413
+									$exclude_post_types = get_option('geodir_exclude_post_type_on_map');
414 414
 
415
-                                    foreach ($post_types as $post_type => $args) {
416
-                                        if (!in_array($post_type, $exclude_post_types)) {
417
-                                            $class = $map_search_pt == $post_type ? 'class="gd-map-search-pt"' : '';
415
+									foreach ($post_types as $post_type => $args) {
416
+										if (!in_array($post_type, $exclude_post_types)) {
417
+											$class = $map_search_pt == $post_type ? 'class="gd-map-search-pt"' : '';
418 418
 											echo '<li id="' . $post_type . '" ' . $class . '><a href="javascript:void(0);" onclick="jQuery(\'#' . $map_canvas_name . '_posttype\').val(\'' . $post_type . '\');build_map_ajax_search_param(\'' . $map_canvas_name . '\', true)">' . __(ucfirst($args->labels->name), 'geodirectory') . '</a></li>';
419
-                                        }
420
-                                    }
421
-                                    ?>
419
+										}
420
+									}
421
+									?>
422 422
                                 </ul>
423 423
                                 <?php if (isset($geodir_map_options['is_geodir_home_map_widget']) && $map_args['is_geodir_home_map_widget']) { ?>
424 424
                             </div><?php } ?>
@@ -432,8 +432,8 @@  discard block
 block discarded – undo
432 432
 
433 433
                         </div> <!-- map-places-listings-->
434 434
                     <?php }
435
-                } // end of post type filter if
436
-                ?>
435
+				} // end of post type filter if
436
+				?>
437 437
 
438 438
             </div>
439 439
         </div> <!--end of stick trigger container-->
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
         </script>
449 449
         <?php
450 450
 
451
-        if (strpos($geodir_map_options['height'], 'vh')) {
452
-            ?>
451
+		if (strpos($geodir_map_options['height'], 'vh')) {
452
+			?>
453 453
             <script>
454 454
                 (function () {
455 455
                     var screenH = jQuery(window).height();
@@ -471,8 +471,8 @@  discard block
 block discarded – undo
471 471
 
472 472
         <?php
473 473
 
474
-        } elseif (strpos($geodir_map_options['height'], 'px')) {
475
-            ?>
474
+		} elseif (strpos($geodir_map_options['height'], 'px')) {
475
+			?>
476 476
             <script>
477 477
                 (function () {
478 478
                     var screenH = jQuery(window).height();
@@ -487,20 +487,20 @@  discard block
 block discarded – undo
487 487
                 }());
488 488
             </script>
489 489
         <?php
490
-        }
490
+		}
491 491
 
492
-        /**
493
-         * Action that runs after all the map code has been output;
494
-         *
495
-         * @since 1.5.3
496
-         *
497
-         * @param array $geodir_map_options Array of map settings.
498
-         * @param string $map_canvas_name The canvas name and ID for the map.
499
-         */
500
-        do_action('geodir_map_after_render',$geodir_map_options,$map_canvas_name);
492
+		/**
493
+		 * Action that runs after all the map code has been output;
494
+		 *
495
+		 * @since 1.5.3
496
+		 *
497
+		 * @param array $geodir_map_options Array of map settings.
498
+		 * @param string $map_canvas_name The canvas name and ID for the map.
499
+		 */
500
+		do_action('geodir_map_after_render',$geodir_map_options,$map_canvas_name);
501 501
 
502 502
 
503
-    endif; // Exclude posttypes if end
503
+	endif; // Exclude posttypes if end
504 504
 }
505 505
 
506 506
 /**
Please login to merge, or discard this patch.
geodirectory-functions/reviews.php 3 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@
 block discarded – undo
16 16
  * the visitor has not yet entered the password we will
17 17
  * return early without loading the comments.
18 18
  */
19
-if (post_password_required())
20
-    return;
19
+if (post_password_required()) {
20
+    return;
21
+}
21 22
 ?>
22 23
 
23 24
 <div id="comments" class="comments-area">
Please login to merge, or discard this patch.
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * return early without loading the comments.
18 18
  */
19 19
 if (post_password_required())
20
-    return;
20
+	return;
21 21
 ?>
22 22
 
23 23
 <div id="comments" class="comments-area">
@@ -25,35 +25,35 @@  discard block
 block discarded – undo
25 25
     <?php // You can start editing here -- including this comment! ?>
26 26
 
27 27
     <?php
28
-    /**
29
-     * Called before displaying reviews.
30
-     *
31
-     * If you would like to wrap reviews inside a div this is the place to print your open div. @see geodir_before_review_form to print your closing div.
32
-     *
33
-     * @since 1.5.7
34
-     */
35
-    do_action('geodir_before_review_list'); ?>
28
+	/**
29
+	 * Called before displaying reviews.
30
+	 *
31
+	 * If you would like to wrap reviews inside a div this is the place to print your open div. @see geodir_before_review_form to print your closing div.
32
+	 *
33
+	 * @since 1.5.7
34
+	 */
35
+	do_action('geodir_before_review_list'); ?>
36 36
 
37 37
     <?php if (have_comments()) : ?>
38 38
         <h2 class="comments-title">
39 39
             <?php
40
-            printf(_n('1 Review <span class="r-title-on">on</span> <span class="r-title">&ldquo;%2$s&rdquo;</span>', '%1$s Reviews <span>on</span> <span class="r-title"> &ldquo;%2$s&rdquo;</span>', get_comments_number(), 'geodirectory'),
41
-                number_format_i18n(get_comments_number()), get_the_title());
42
-            ?>
40
+			printf(_n('1 Review <span class="r-title-on">on</span> <span class="r-title">&ldquo;%2$s&rdquo;</span>', '%1$s Reviews <span>on</span> <span class="r-title"> &ldquo;%2$s&rdquo;</span>', get_comments_number(), 'geodirectory'),
41
+				number_format_i18n(get_comments_number()), get_the_title());
42
+			?>
43 43
         </h2>
44 44
 
45 45
         <?php
46
-        /**
47
-         * Called after displaying review listing title.
48
-         *
49
-         * @since 1.5.7
50
-         */
51
-        do_action('geodir_after_review_list_title'); ?>
46
+		/**
47
+		 * Called after displaying review listing title.
48
+		 *
49
+		 * @since 1.5.7
50
+		 */
51
+		do_action('geodir_after_review_list_title'); ?>
52 52
 
53 53
         <ol class="commentlist">
54 54
             <?php $reverse_top_level = is_plugin_active('geodir_review_rating_manager/geodir_review_rating_manager.php') ? false : null; ?>
55 55
 			<?php wp_list_comments(array('callback' => 'geodir_comment', 'reverse_top_level' => $reverse_top_level, 'style' => 'ol'));
56
-            ?>
56
+			?>
57 57
         </ol><!-- .commentlist -->
58 58
 
59 59
         <?php if (get_comment_pages_count() > 1 && get_option('page_comments')) : // are there comments to navigate through ?>
@@ -68,51 +68,51 @@  discard block
 block discarded – undo
68 68
         <?php endif; // check for comment navigation ?>
69 69
 
70 70
         <?php
71
-        /* If there are no comments and comments are closed, let's leave a note.
71
+		/* If there are no comments and comments are closed, let's leave a note.
72 72
          * But we only want the note on posts and pages that had comments in the first place.
73 73
          */
74
-        if (!comments_open() && get_comments_number()) : ?>
74
+		if (!comments_open() && get_comments_number()) : ?>
75 75
             <p class="nocomments"><?php _e('Reviews are closed.', 'geodirectory'); ?></p>
76 76
         <?php endif; ?>
77 77
 
78 78
     <?php endif; // have_comments() ?>
79 79
 
80 80
     <?php
81
-    /**
82
-     * Called before displaying "Leave a review form".
83
-     *
84
-     * If you would like to wrap "review form" inside a div this is the best place to hook your open div. @see geodir_after_review_form to print your closing div.
85
-     * Also If you would like to wrap "reviews" inside a div this is the best place to print your closing div. @see geodir_before_review_list to print your open div.
86
-     *
87
-     * @since 1.5.7
88
-     */
89
-    do_action('geodir_before_review_form'); ?>
81
+	/**
82
+	 * Called before displaying "Leave a review form".
83
+	 *
84
+	 * If you would like to wrap "review form" inside a div this is the best place to hook your open div. @see geodir_after_review_form to print your closing div.
85
+	 * Also If you would like to wrap "reviews" inside a div this is the best place to print your closing div. @see geodir_before_review_list to print your open div.
86
+	 *
87
+	 * @since 1.5.7
88
+	 */
89
+	do_action('geodir_before_review_form'); ?>
90 90
 
91 91
     <?php
92
-    /**
93
-     * Filters comment form args
94
-     *
95
-     * If you would like to modify your comment form args, use this filter. @see https://codex.wordpress.org/Function_Reference/comment_form for accepted args.
96
-     *
97
-     * @since 1.0.0
98
-     */
99
-    $args = apply_filters('geodir_review_form_args', array(
100
-        'title_reply' => __('Leave a Review', 'geodirectory'),
101
-        'label_submit' => __('Post Review', 'geodirectory'),
102
-        'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
103
-        'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>'
104
-    ));
105
-    comment_form($args);
106
-    ?>
92
+	/**
93
+	 * Filters comment form args
94
+	 *
95
+	 * If you would like to modify your comment form args, use this filter. @see https://codex.wordpress.org/Function_Reference/comment_form for accepted args.
96
+	 *
97
+	 * @since 1.0.0
98
+	 */
99
+	$args = apply_filters('geodir_review_form_args', array(
100
+		'title_reply' => __('Leave a Review', 'geodirectory'),
101
+		'label_submit' => __('Post Review', 'geodirectory'),
102
+		'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
103
+		'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>'
104
+	));
105
+	comment_form($args);
106
+	?>
107 107
 
108 108
     <?php
109
-    /**
110
-     * Called after displaying "Leave a review form".
111
-     *
112
-     * If you would like to wrap "review form" inside a div this is the best place to print your closing div. @see geodir_before_review_form to print your open div.
113
-     *
114
-     * @since 1.5.7
115
-     */
116
-    do_action('geodir_after_review_form'); ?>
109
+	/**
110
+	 * Called after displaying "Leave a review form".
111
+	 *
112
+	 * If you would like to wrap "review form" inside a div this is the best place to print your closing div. @see geodir_before_review_form to print your open div.
113
+	 *
114
+	 * @since 1.5.7
115
+	 */
116
+	do_action('geodir_after_review_form'); ?>
117 117
 
118 118
 </div><!-- #comments .comments-area -->
119 119
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@
 block discarded – undo
99 99
     $args = apply_filters('geodir_review_form_args', array(
100 100
         'title_reply' => __('Leave a Review', 'geodirectory'),
101 101
         'label_submit' => __('Post Review', 'geodirectory'),
102
-        'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
103
-        'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>'
102
+        'comment_field' => '<p class="comment-form-comment"><label for="comment">'.__('Review text', 'geodirectory').'</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
103
+        'must_log_in' => '<p class="must-log-in">'.sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()).'</p>'
104 104
     ));
105 105
     comment_form($args);
106 106
     ?>
Please login to merge, or discard this patch.