@@ -10,47 +10,47 @@ discard block |
||
10 | 10 | global $wpdb; |
11 | 11 | |
12 | 12 | if (get_option('geodirectory' . '_db_version') != GEODIRECTORY_VERSION) { |
13 | - /** |
|
14 | - * Include custom database table related functions. |
|
15 | - * |
|
16 | - * @since 1.0.0 |
|
17 | - * @package GeoDirectory |
|
18 | - */ |
|
19 | - include_once('geodirectory-admin/admin_db_install.php'); |
|
20 | - add_action('plugins_loaded', 'geodirectory_upgrade_all', 10); |
|
21 | - if (GEODIRECTORY_VERSION <= '1.3.6') { |
|
22 | - add_action('plugins_loaded', 'geodir_upgrade_136', 11); |
|
23 | - } |
|
13 | + /** |
|
14 | + * Include custom database table related functions. |
|
15 | + * |
|
16 | + * @since 1.0.0 |
|
17 | + * @package GeoDirectory |
|
18 | + */ |
|
19 | + include_once('geodirectory-admin/admin_db_install.php'); |
|
20 | + add_action('plugins_loaded', 'geodirectory_upgrade_all', 10); |
|
21 | + if (GEODIRECTORY_VERSION <= '1.3.6') { |
|
22 | + add_action('plugins_loaded', 'geodir_upgrade_136', 11); |
|
23 | + } |
|
24 | 24 | |
25 | - if (GEODIRECTORY_VERSION <= '1.4.6') { |
|
26 | - add_action('init', 'geodir_upgrade_146', 11); |
|
27 | - } |
|
25 | + if (GEODIRECTORY_VERSION <= '1.4.6') { |
|
26 | + add_action('init', 'geodir_upgrade_146', 11); |
|
27 | + } |
|
28 | 28 | |
29 | - if (GEODIRECTORY_VERSION <= '1.4.8') { |
|
30 | - add_action('init', 'geodir_upgrade_148', 11); |
|
31 | - } |
|
29 | + if (GEODIRECTORY_VERSION <= '1.4.8') { |
|
30 | + add_action('init', 'geodir_upgrade_148', 11); |
|
31 | + } |
|
32 | 32 | |
33 | - if (GEODIRECTORY_VERSION <= '1.5.0') { |
|
34 | - add_action('init', 'geodir_upgrade_150', 11); |
|
35 | - } |
|
33 | + if (GEODIRECTORY_VERSION <= '1.5.0') { |
|
34 | + add_action('init', 'geodir_upgrade_150', 11); |
|
35 | + } |
|
36 | 36 | |
37 | - if (GEODIRECTORY_VERSION <= '1.5.2') { |
|
38 | - add_action('init', 'geodir_upgrade_152', 11); |
|
39 | - } |
|
37 | + if (GEODIRECTORY_VERSION <= '1.5.2') { |
|
38 | + add_action('init', 'geodir_upgrade_152', 11); |
|
39 | + } |
|
40 | 40 | |
41 | - if (GEODIRECTORY_VERSION <= '1.5.3') { |
|
42 | - add_action('init', 'geodir_upgrade_153', 11); |
|
43 | - } |
|
41 | + if (GEODIRECTORY_VERSION <= '1.5.3') { |
|
42 | + add_action('init', 'geodir_upgrade_153', 11); |
|
43 | + } |
|
44 | 44 | |
45 | - if (GEODIRECTORY_VERSION <= '1.5.4') { |
|
46 | - add_action('init', 'geodir_upgrade_154', 11); |
|
47 | - } |
|
45 | + if (GEODIRECTORY_VERSION <= '1.5.4') { |
|
46 | + add_action('init', 'geodir_upgrade_154', 11); |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | 50 | |
51 | - add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions |
|
51 | + add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions |
|
52 | 52 | |
53 | - update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION); |
|
53 | + update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION); |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | */ |
64 | 64 | function geodirectory_upgrade_all() |
65 | 65 | { |
66 | - geodir_create_tables(); |
|
67 | - geodir_update_review_db(); |
|
68 | - gd_install_theme_compat(); |
|
69 | - gd_convert_custom_field_display(); |
|
66 | + geodir_create_tables(); |
|
67 | + geodir_update_review_db(); |
|
68 | + gd_install_theme_compat(); |
|
69 | + gd_convert_custom_field_display(); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | function geodir_upgrade_136() |
79 | 79 | { |
80 | - geodir_fix_review_overall_rating(); |
|
80 | + geodir_fix_review_overall_rating(); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @package GeoDirectory |
88 | 88 | */ |
89 | 89 | function geodir_upgrade_146(){ |
90 | - gd_convert_virtual_pages(); |
|
90 | + gd_convert_virtual_pages(); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @package GeoDirectory |
98 | 98 | */ |
99 | 99 | function geodir_upgrade_150(){ |
100 | - gd_fix_cpt_rewrite_slug(); |
|
100 | + gd_fix_cpt_rewrite_slug(); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | * @package GeoDirectory |
110 | 110 | */ |
111 | 111 | function geodir_upgrade_148(){ |
112 | - /* |
|
112 | + /* |
|
113 | 113 | * Blank the users google password if present as we now use oAuth 2.0 |
114 | 114 | */ |
115 | - update_option('geodir_ga_pass',''); |
|
116 | - update_option('geodir_ga_user',''); |
|
115 | + update_option('geodir_ga_pass',''); |
|
116 | + update_option('geodir_ga_user',''); |
|
117 | 117 | |
118 | 118 | } |
119 | 119 | |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | * @package GeoDirectory |
126 | 126 | */ |
127 | 127 | function geodir_upgrade_153(){ |
128 | - geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
129 | - geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
128 | + geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
129 | + geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * @package GeoDirectory |
137 | 137 | */ |
138 | 138 | function geodir_upgrade_154(){ |
139 | - geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
139 | + geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @package GeoDirectory |
147 | 147 | */ |
148 | 148 | function geodir_upgrade_152(){ |
149 | - gd_fix_address_detail_table_limit(); |
|
149 | + gd_fix_address_detail_table_limit(); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | |
@@ -162,12 +162,12 @@ discard block |
||
162 | 162 | */ |
163 | 163 | function geodir_update_review_db() |
164 | 164 | { |
165 | - global $wpdb, $plugin_prefix; |
|
165 | + global $wpdb, $plugin_prefix; |
|
166 | 166 | |
167 | - geodir_fix_review_date(); |
|
168 | - geodir_fix_review_post_status(); |
|
169 | - geodir_fix_review_content(); |
|
170 | - geodir_fix_review_location(); |
|
167 | + geodir_fix_review_date(); |
|
168 | + geodir_fix_review_post_status(); |
|
169 | + geodir_fix_review_content(); |
|
170 | + geodir_fix_review_location(); |
|
171 | 171 | |
172 | 172 | } |
173 | 173 | |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | */ |
181 | 181 | function geodir_fix_review_date() |
182 | 182 | { |
183 | - global $wpdb; |
|
184 | - $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'"); |
|
183 | + global $wpdb; |
|
184 | + $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'"); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | /** |
@@ -193,8 +193,8 @@ discard block |
||
193 | 193 | */ |
194 | 194 | function geodir_fix_review_post_status() |
195 | 195 | { |
196 | - global $wpdb; |
|
197 | - $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'"); |
|
196 | + global $wpdb; |
|
197 | + $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'"); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -207,12 +207,12 @@ discard block |
||
207 | 207 | */ |
208 | 208 | function geodir_fix_review_content() |
209 | 209 | { |
210 | - global $wpdb; |
|
211 | - if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) { |
|
212 | - return true; |
|
213 | - } else { |
|
214 | - return false; |
|
215 | - } |
|
210 | + global $wpdb; |
|
211 | + if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) { |
|
212 | + return true; |
|
213 | + } else { |
|
214 | + return false; |
|
215 | + } |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
@@ -225,20 +225,20 @@ discard block |
||
225 | 225 | */ |
226 | 226 | function geodir_fix_review_location() |
227 | 227 | { |
228 | - global $wpdb; |
|
228 | + global $wpdb; |
|
229 | 229 | |
230 | - $all_postypes = geodir_get_posttypes(); |
|
230 | + $all_postypes = geodir_get_posttypes(); |
|
231 | 231 | |
232 | - if (!empty($all_postypes)) { |
|
233 | - foreach ($all_postypes as $key) { |
|
234 | - // update each GD CTP |
|
232 | + if (!empty($all_postypes)) { |
|
233 | + foreach ($all_postypes as $key) { |
|
234 | + // update each GD CTP |
|
235 | 235 | |
236 | - $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city, gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL"); |
|
236 | + $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city, gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL"); |
|
237 | 237 | |
238 | - } |
|
239 | - return true; |
|
240 | - } |
|
241 | - return false; |
|
238 | + } |
|
239 | + return true; |
|
240 | + } |
|
241 | + return false; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
@@ -250,82 +250,82 @@ discard block |
||
250 | 250 | */ |
251 | 251 | function geodir_fix_review_overall_rating() |
252 | 252 | { |
253 | - global $wpdb; |
|
253 | + global $wpdb; |
|
254 | 254 | |
255 | - $all_postypes = geodir_get_posttypes(); |
|
255 | + $all_postypes = geodir_get_posttypes(); |
|
256 | 256 | |
257 | - if (!empty($all_postypes)) { |
|
258 | - foreach ($all_postypes as $key) { |
|
259 | - // update each GD CTP |
|
260 | - $reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d"); |
|
257 | + if (!empty($all_postypes)) { |
|
258 | + foreach ($all_postypes as $key) { |
|
259 | + // update each GD CTP |
|
260 | + $reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d"); |
|
261 | 261 | |
262 | - if (!empty($reviews)) { |
|
263 | - foreach ($reviews as $post_id) { |
|
264 | - geodir_update_postrating($post_id->post_id, $key); |
|
265 | - } |
|
262 | + if (!empty($reviews)) { |
|
263 | + foreach ($reviews as $post_id) { |
|
264 | + geodir_update_postrating($post_id->post_id, $key); |
|
265 | + } |
|
266 | 266 | |
267 | - } |
|
267 | + } |
|
268 | 268 | |
269 | - } |
|
269 | + } |
|
270 | 270 | |
271 | - } |
|
271 | + } |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | |
275 | 275 | function gd_convert_custom_field_display(){ |
276 | - global $wpdb; |
|
276 | + global $wpdb; |
|
277 | 277 | |
278 | - $field_info = $wpdb->get_results("select * from " . GEODIR_CUSTOM_FIELDS_TABLE); |
|
278 | + $field_info = $wpdb->get_results("select * from " . GEODIR_CUSTOM_FIELDS_TABLE); |
|
279 | 279 | |
280 | - $has_run = get_option('gd_convert_custom_field_display'); |
|
281 | - if($has_run){return;} |
|
280 | + $has_run = get_option('gd_convert_custom_field_display'); |
|
281 | + if($has_run){return;} |
|
282 | 282 | |
283 | - // set the field_type_key for standard fields |
|
284 | - $wpdb->query("UPDATE ".GEODIR_CUSTOM_FIELDS_TABLE." SET field_type_key = field_type"); |
|
283 | + // set the field_type_key for standard fields |
|
284 | + $wpdb->query("UPDATE ".GEODIR_CUSTOM_FIELDS_TABLE." SET field_type_key = field_type"); |
|
285 | 285 | |
286 | 286 | |
287 | - if(is_array( $field_info)){ |
|
287 | + if(is_array( $field_info)){ |
|
288 | 288 | |
289 | - foreach( $field_info as $cf){ |
|
289 | + foreach( $field_info as $cf){ |
|
290 | 290 | |
291 | - $id = $cf->id; |
|
291 | + $id = $cf->id; |
|
292 | 292 | |
293 | - if(!property_exists($cf,'show_in') || !$id){return;} |
|
293 | + if(!property_exists($cf,'show_in') || !$id){return;} |
|
294 | 294 | |
295 | - $show_in_arr = array(); |
|
295 | + $show_in_arr = array(); |
|
296 | 296 | |
297 | - if($cf->is_default){ |
|
298 | - $show_in_arr[] = "[detail]"; |
|
299 | - } |
|
297 | + if($cf->is_default){ |
|
298 | + $show_in_arr[] = "[detail]"; |
|
299 | + } |
|
300 | 300 | |
301 | - if($cf->show_on_detail){ |
|
302 | - $show_in_arr[] = "[moreinfo]"; |
|
303 | - } |
|
301 | + if($cf->show_on_detail){ |
|
302 | + $show_in_arr[] = "[moreinfo]"; |
|
303 | + } |
|
304 | 304 | |
305 | - if($cf->show_on_listing){ |
|
306 | - $show_in_arr[] = "[listing]"; |
|
307 | - } |
|
305 | + if($cf->show_on_listing){ |
|
306 | + $show_in_arr[] = "[listing]"; |
|
307 | + } |
|
308 | 308 | |
309 | - if($cf->show_as_tab || $cf->htmlvar_name=='geodir_video' || $cf->htmlvar_name=='geodir_special_offers'){ |
|
310 | - $show_in_arr[] = "[owntab]"; |
|
311 | - } |
|
309 | + if($cf->show_as_tab || $cf->htmlvar_name=='geodir_video' || $cf->htmlvar_name=='geodir_special_offers'){ |
|
310 | + $show_in_arr[] = "[owntab]"; |
|
311 | + } |
|
312 | 312 | |
313 | - if($cf->htmlvar_name=='post' || $cf->htmlvar_name=='geodir_contact' || $cf->htmlvar_name=='geodir_timing'){ |
|
314 | - $show_in_arr[] = "[mapbubble]"; |
|
315 | - } |
|
313 | + if($cf->htmlvar_name=='post' || $cf->htmlvar_name=='geodir_contact' || $cf->htmlvar_name=='geodir_timing'){ |
|
314 | + $show_in_arr[] = "[mapbubble]"; |
|
315 | + } |
|
316 | 316 | |
317 | - if(!empty($show_in_arr )){ |
|
318 | - $show_in_arr = implode(',',$show_in_arr); |
|
319 | - }else{ |
|
320 | - $show_in_arr = ''; |
|
321 | - } |
|
317 | + if(!empty($show_in_arr )){ |
|
318 | + $show_in_arr = implode(',',$show_in_arr); |
|
319 | + }else{ |
|
320 | + $show_in_arr = ''; |
|
321 | + } |
|
322 | 322 | |
323 | - $wpdb->query("UPDATE ".GEODIR_CUSTOM_FIELDS_TABLE." SET show_in='$show_in_arr' WHERE id=$id"); |
|
323 | + $wpdb->query("UPDATE ".GEODIR_CUSTOM_FIELDS_TABLE." SET show_in='$show_in_arr' WHERE id=$id"); |
|
324 | 324 | |
325 | - } |
|
325 | + } |
|
326 | 326 | |
327 | - update_option('gd_convert_custom_field_display',1); |
|
328 | - } |
|
327 | + update_option('gd_convert_custom_field_display',1); |
|
328 | + } |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | ############################################ |
@@ -341,367 +341,367 @@ discard block |
||
341 | 341 | */ |
342 | 342 | function gd_install_theme_compat() |
343 | 343 | { |
344 | - global $wpdb; |
|
344 | + global $wpdb; |
|
345 | 345 | |
346 | - $theme_compat = array(); |
|
347 | - $theme_compat = get_option('gd_theme_compats'); |
|
346 | + $theme_compat = array(); |
|
347 | + $theme_compat = get_option('gd_theme_compats'); |
|
348 | 348 | //GDF |
349 | - $theme_compat['GeoDirectory_Framework'] = array( |
|
350 | - 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
351 | - 'geodir_wrapper_open_class' => '', |
|
352 | - 'geodir_wrapper_open_replace' => '', |
|
353 | - 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
354 | - 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
355 | - 'geodir_wrapper_content_open_class' => '', |
|
356 | - 'geodir_wrapper_content_open_replace' => '', |
|
357 | - 'geodir_wrapper_content_close_replace' => '', |
|
358 | - 'geodir_article_open_id' => '', |
|
359 | - 'geodir_article_open_class' => '', |
|
360 | - 'geodir_article_open_replace' => '', |
|
361 | - 'geodir_article_close_replace' => '', |
|
362 | - 'geodir_sidebar_right_open_id' => '', |
|
363 | - 'geodir_sidebar_right_open_class' => '', |
|
364 | - 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
365 | - 'geodir_sidebar_right_close_replace' => '', |
|
366 | - 'geodir_sidebar_left_open_id' => '', |
|
367 | - 'geodir_sidebar_left_open_class' => '', |
|
368 | - 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
369 | - 'geodir_sidebar_left_close_replace' => '', |
|
370 | - 'geodir_main_content_open_id' => '', |
|
371 | - 'geodir_main_content_open_class' => '', |
|
372 | - 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
373 | - 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
374 | - 'geodir_top_content_add' => '', |
|
375 | - 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
376 | - 'geodir_before_widget_filter' => '', |
|
377 | - 'geodir_after_widget_filter' => '', |
|
378 | - 'geodir_theme_compat_css' => '', |
|
379 | - 'geodir_theme_compat_js' => '', |
|
380 | - 'geodir_theme_compat_default_options' => '', |
|
381 | - 'geodir_theme_compat_code' => '' |
|
382 | - ); |
|
349 | + $theme_compat['GeoDirectory_Framework'] = array( |
|
350 | + 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
351 | + 'geodir_wrapper_open_class' => '', |
|
352 | + 'geodir_wrapper_open_replace' => '', |
|
353 | + 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
354 | + 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
355 | + 'geodir_wrapper_content_open_class' => '', |
|
356 | + 'geodir_wrapper_content_open_replace' => '', |
|
357 | + 'geodir_wrapper_content_close_replace' => '', |
|
358 | + 'geodir_article_open_id' => '', |
|
359 | + 'geodir_article_open_class' => '', |
|
360 | + 'geodir_article_open_replace' => '', |
|
361 | + 'geodir_article_close_replace' => '', |
|
362 | + 'geodir_sidebar_right_open_id' => '', |
|
363 | + 'geodir_sidebar_right_open_class' => '', |
|
364 | + 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
365 | + 'geodir_sidebar_right_close_replace' => '', |
|
366 | + 'geodir_sidebar_left_open_id' => '', |
|
367 | + 'geodir_sidebar_left_open_class' => '', |
|
368 | + 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
369 | + 'geodir_sidebar_left_close_replace' => '', |
|
370 | + 'geodir_main_content_open_id' => '', |
|
371 | + 'geodir_main_content_open_class' => '', |
|
372 | + 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
373 | + 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
374 | + 'geodir_top_content_add' => '', |
|
375 | + 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
376 | + 'geodir_before_widget_filter' => '', |
|
377 | + 'geodir_after_widget_filter' => '', |
|
378 | + 'geodir_theme_compat_css' => '', |
|
379 | + 'geodir_theme_compat_js' => '', |
|
380 | + 'geodir_theme_compat_default_options' => '', |
|
381 | + 'geodir_theme_compat_code' => '' |
|
382 | + ); |
|
383 | 383 | |
384 | 384 | //Directory Theme |
385 | - $theme_compat['Directory_Starter'] = array( |
|
386 | - 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
387 | - 'geodir_wrapper_open_class' => '', |
|
388 | - 'geodir_wrapper_open_replace' => '', |
|
389 | - 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
390 | - 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
391 | - 'geodir_wrapper_content_open_class' => '', |
|
392 | - 'geodir_wrapper_content_open_replace' => '', |
|
393 | - 'geodir_wrapper_content_close_replace' => '', |
|
394 | - 'geodir_article_open_id' => '', |
|
395 | - 'geodir_article_open_class' => '', |
|
396 | - 'geodir_article_open_replace' => '', |
|
397 | - 'geodir_article_close_replace' => '', |
|
398 | - 'geodir_sidebar_right_open_id' => '', |
|
399 | - 'geodir_sidebar_right_open_class' => '', |
|
400 | - 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
401 | - 'geodir_sidebar_right_close_replace' => '', |
|
402 | - 'geodir_sidebar_left_open_id' => '', |
|
403 | - 'geodir_sidebar_left_open_class' => '', |
|
404 | - 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
405 | - 'geodir_sidebar_left_close_replace' => '', |
|
406 | - 'geodir_main_content_open_id' => '', |
|
407 | - 'geodir_main_content_open_class' => '', |
|
408 | - 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
409 | - 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
410 | - 'geodir_top_content_add' => '', |
|
411 | - 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
412 | - 'geodir_before_widget_filter' => '', |
|
413 | - 'geodir_after_widget_filter' => '', |
|
414 | - 'geodir_theme_compat_css' => '', |
|
415 | - 'geodir_theme_compat_js' => '', |
|
416 | - 'geodir_theme_compat_default_options' => '', |
|
417 | - 'geodir_theme_compat_code' => '' |
|
418 | - ); |
|
385 | + $theme_compat['Directory_Starter'] = array( |
|
386 | + 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
387 | + 'geodir_wrapper_open_class' => '', |
|
388 | + 'geodir_wrapper_open_replace' => '', |
|
389 | + 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
390 | + 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
391 | + 'geodir_wrapper_content_open_class' => '', |
|
392 | + 'geodir_wrapper_content_open_replace' => '', |
|
393 | + 'geodir_wrapper_content_close_replace' => '', |
|
394 | + 'geodir_article_open_id' => '', |
|
395 | + 'geodir_article_open_class' => '', |
|
396 | + 'geodir_article_open_replace' => '', |
|
397 | + 'geodir_article_close_replace' => '', |
|
398 | + 'geodir_sidebar_right_open_id' => '', |
|
399 | + 'geodir_sidebar_right_open_class' => '', |
|
400 | + 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
401 | + 'geodir_sidebar_right_close_replace' => '', |
|
402 | + 'geodir_sidebar_left_open_id' => '', |
|
403 | + 'geodir_sidebar_left_open_class' => '', |
|
404 | + 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
405 | + 'geodir_sidebar_left_close_replace' => '', |
|
406 | + 'geodir_main_content_open_id' => '', |
|
407 | + 'geodir_main_content_open_class' => '', |
|
408 | + 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
409 | + 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
410 | + 'geodir_top_content_add' => '', |
|
411 | + 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
412 | + 'geodir_before_widget_filter' => '', |
|
413 | + 'geodir_after_widget_filter' => '', |
|
414 | + 'geodir_theme_compat_css' => '', |
|
415 | + 'geodir_theme_compat_js' => '', |
|
416 | + 'geodir_theme_compat_default_options' => '', |
|
417 | + 'geodir_theme_compat_code' => '' |
|
418 | + ); |
|
419 | 419 | |
420 | 420 | //Jobby |
421 | - $theme_compat['Jobby'] = $theme_compat['Directory_Starter']; |
|
421 | + $theme_compat['Jobby'] = $theme_compat['Directory_Starter']; |
|
422 | 422 | |
423 | 423 | //GeoProperty |
424 | - $theme_compat['GeoProperty'] = $theme_compat['Directory_Starter']; |
|
424 | + $theme_compat['GeoProperty'] = $theme_compat['Directory_Starter']; |
|
425 | 425 | |
426 | 426 | //Avada |
427 | - $theme_compat['Avada'] = array( |
|
428 | - 'geodir_wrapper_open_id' => '', |
|
429 | - 'geodir_wrapper_open_class' => '', |
|
430 | - 'geodir_wrapper_open_replace' => '<!-- removed -->', |
|
431 | - 'geodir_wrapper_close_replace' => '<!-- removed -->', |
|
432 | - 'geodir_wrapper_content_open_id' => 'content', |
|
433 | - 'geodir_wrapper_content_open_class' => '', |
|
434 | - 'geodir_wrapper_content_open_replace' => '', |
|
435 | - 'geodir_wrapper_content_close_replace' => '', |
|
436 | - 'geodir_article_open_id' => '', |
|
437 | - 'geodir_article_open_class' => '', |
|
438 | - 'geodir_article_open_replace' => '', |
|
439 | - 'geodir_article_close_replace' => '', |
|
440 | - 'geodir_sidebar_right_open_id' => '', |
|
441 | - 'geodir_sidebar_right_open_class' => '', |
|
442 | - 'geodir_sidebar_right_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
443 | - 'geodir_sidebar_right_close_replace' => '</div><!-- end sidebar -->', |
|
444 | - 'geodir_sidebar_left_open_id' => '', |
|
445 | - 'geodir_sidebar_left_open_class' => '', |
|
446 | - 'geodir_sidebar_left_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
447 | - 'geodir_sidebar_left_close_replace' => '</div><!-- end sidebar -->', |
|
448 | - 'geodir_main_content_open_id' => '', |
|
449 | - 'geodir_main_content_open_class' => '', |
|
450 | - 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
451 | - 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
452 | - 'geodir_top_content_add' => '', |
|
453 | - 'geodir_before_main_content_add' => '', |
|
454 | - 'geodir_before_widget_filter' => '', |
|
455 | - 'geodir_after_widget_filter' => '', |
|
456 | - 'geodir_theme_compat_css' => stripslashes('.geodir-sidebar-left{float:left}select,textarea{border-style:solid;border-width:1px}.top-menu li > div{visibility:visible}.geodir-chosen-container-single .chosen-single{height:auto}ul li#menu-item-gd-location-switcher ul{width:222px}ul li#menu-item-gd-location-switcher ul li{padding-right:0!important}#mobile-nav li#mobile-menu-item-gd-location-switcher li a{padding-left:10px;padding-right:10px}#menu-item-gd-location-switcher dd,#mobile-menu-item-gd-location-switcher{margin-left:0}#menu-item-gd-location-switcher dd a{display:block}.geodir-chosen-container .chosen-results li.highlighted{background-color:#eee;background-image:none;color:#444}#mobile-nav li.mobile-nav-item li a:before{content:\'\';margin:0}#mobile-nav li.mobile-nav-item li a{padding:10px;width:auto}.geodir-listing-search{text-align:center}.geodir-search{float:none;margin:0}.geodir-search select,.geodir-search .search_by_post,.geodir-search input[type="text"],.geodir-search button[type="button"], .geodir-search input[type="button"],.geodir-search input[type="submit"]{display:inline-block;float:none}.geodir-cat-list ul li,.map_category ul li{list-style-type:none}.wpgeo-avada .page-title ul li:after{content:\'\'}.top_banner_section{margin-bottom:0}.geodir-category-list-in{margin:0;padding:15px}.geodir_full_page .geodir-cat-list .widget-title{margin-top:0}.geodir_full_page .geodir-cat-list ul li{padding-left:0}.geodir-loc-bar{border:none;margin:0;padding:0}.geodir-loc-bar-in{padding:15px 0}.geodir_full_page section.widget{margin-bottom:20px}.sidebar .geodir-loginbox-list li{margin-bottom:10px;padding-bottom:10px}.sidebar .geodir-loginbox-list li a{display:block}.sidebar .geodir-chosen-container .chosen-results li{margin:0;padding:5px 6px}.sidebar .geodir-chosen-container .chosen-results li.highlighted{background:#eee;background-image:none;color:#000}.sidebar .geodir_category_list_view li.geodir-gridview{display:inline-block;margin-bottom:15px}.wpgeo-avada.double-sidebars #main #sidebar{margin-left:3%}.wpgeo-avada.double-sidebars #main #sidebar-2{margin-left:-100%}.wpgeo-avada.double-sidebars #content{float:left;margin-left:0}.geodir_full_page section.widget{margin-bottom: 0px;} .sidebar .widget .geodir-hide {display: none;}li.fusion-mobile-nav-item .geodir_location_tab_container a:before{content: "" !important; margin-right: auto !important;}li.fusion-mobile-nav-item .geodir_location_tab_container a{padding-left:5px !important;}'), |
|
457 | - 'geodir_theme_compat_js' => '', |
|
458 | - 'geodir_theme_compat_default_options' => '', |
|
459 | - 'geodir_theme_compat_code' => 'Avada' |
|
460 | - ); |
|
427 | + $theme_compat['Avada'] = array( |
|
428 | + 'geodir_wrapper_open_id' => '', |
|
429 | + 'geodir_wrapper_open_class' => '', |
|
430 | + 'geodir_wrapper_open_replace' => '<!-- removed -->', |
|
431 | + 'geodir_wrapper_close_replace' => '<!-- removed -->', |
|
432 | + 'geodir_wrapper_content_open_id' => 'content', |
|
433 | + 'geodir_wrapper_content_open_class' => '', |
|
434 | + 'geodir_wrapper_content_open_replace' => '', |
|
435 | + 'geodir_wrapper_content_close_replace' => '', |
|
436 | + 'geodir_article_open_id' => '', |
|
437 | + 'geodir_article_open_class' => '', |
|
438 | + 'geodir_article_open_replace' => '', |
|
439 | + 'geodir_article_close_replace' => '', |
|
440 | + 'geodir_sidebar_right_open_id' => '', |
|
441 | + 'geodir_sidebar_right_open_class' => '', |
|
442 | + 'geodir_sidebar_right_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
443 | + 'geodir_sidebar_right_close_replace' => '</div><!-- end sidebar -->', |
|
444 | + 'geodir_sidebar_left_open_id' => '', |
|
445 | + 'geodir_sidebar_left_open_class' => '', |
|
446 | + 'geodir_sidebar_left_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
447 | + 'geodir_sidebar_left_close_replace' => '</div><!-- end sidebar -->', |
|
448 | + 'geodir_main_content_open_id' => '', |
|
449 | + 'geodir_main_content_open_class' => '', |
|
450 | + 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
451 | + 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
452 | + 'geodir_top_content_add' => '', |
|
453 | + 'geodir_before_main_content_add' => '', |
|
454 | + 'geodir_before_widget_filter' => '', |
|
455 | + 'geodir_after_widget_filter' => '', |
|
456 | + 'geodir_theme_compat_css' => stripslashes('.geodir-sidebar-left{float:left}select,textarea{border-style:solid;border-width:1px}.top-menu li > div{visibility:visible}.geodir-chosen-container-single .chosen-single{height:auto}ul li#menu-item-gd-location-switcher ul{width:222px}ul li#menu-item-gd-location-switcher ul li{padding-right:0!important}#mobile-nav li#mobile-menu-item-gd-location-switcher li a{padding-left:10px;padding-right:10px}#menu-item-gd-location-switcher dd,#mobile-menu-item-gd-location-switcher{margin-left:0}#menu-item-gd-location-switcher dd a{display:block}.geodir-chosen-container .chosen-results li.highlighted{background-color:#eee;background-image:none;color:#444}#mobile-nav li.mobile-nav-item li a:before{content:\'\';margin:0}#mobile-nav li.mobile-nav-item li a{padding:10px;width:auto}.geodir-listing-search{text-align:center}.geodir-search{float:none;margin:0}.geodir-search select,.geodir-search .search_by_post,.geodir-search input[type="text"],.geodir-search button[type="button"], .geodir-search input[type="button"],.geodir-search input[type="submit"]{display:inline-block;float:none}.geodir-cat-list ul li,.map_category ul li{list-style-type:none}.wpgeo-avada .page-title ul li:after{content:\'\'}.top_banner_section{margin-bottom:0}.geodir-category-list-in{margin:0;padding:15px}.geodir_full_page .geodir-cat-list .widget-title{margin-top:0}.geodir_full_page .geodir-cat-list ul li{padding-left:0}.geodir-loc-bar{border:none;margin:0;padding:0}.geodir-loc-bar-in{padding:15px 0}.geodir_full_page section.widget{margin-bottom:20px}.sidebar .geodir-loginbox-list li{margin-bottom:10px;padding-bottom:10px}.sidebar .geodir-loginbox-list li a{display:block}.sidebar .geodir-chosen-container .chosen-results li{margin:0;padding:5px 6px}.sidebar .geodir-chosen-container .chosen-results li.highlighted{background:#eee;background-image:none;color:#000}.sidebar .geodir_category_list_view li.geodir-gridview{display:inline-block;margin-bottom:15px}.wpgeo-avada.double-sidebars #main #sidebar{margin-left:3%}.wpgeo-avada.double-sidebars #main #sidebar-2{margin-left:-100%}.wpgeo-avada.double-sidebars #content{float:left;margin-left:0}.geodir_full_page section.widget{margin-bottom: 0px;} .sidebar .widget .geodir-hide {display: none;}li.fusion-mobile-nav-item .geodir_location_tab_container a:before{content: "" !important; margin-right: auto !important;}li.fusion-mobile-nav-item .geodir_location_tab_container a{padding-left:5px !important;}'), |
|
457 | + 'geodir_theme_compat_js' => '', |
|
458 | + 'geodir_theme_compat_default_options' => '', |
|
459 | + 'geodir_theme_compat_code' => 'Avada' |
|
460 | + ); |
|
461 | 461 | |
462 | 462 | //Enfold |
463 | - $theme_compat['Enfold'] = array( |
|
464 | - 'geodir_wrapper_open_id' => '', |
|
465 | - 'geodir_wrapper_open_class' => '', |
|
466 | - 'geodir_wrapper_open_replace' => '', |
|
467 | - 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
468 | - 'geodir_wrapper_content_open_id' => '', |
|
469 | - 'geodir_wrapper_content_open_class' => '', |
|
470 | - 'geodir_wrapper_content_open_replace' => '', |
|
471 | - 'geodir_wrapper_content_close_replace' => '</div></main>', |
|
472 | - 'geodir_article_open_id' => '', |
|
473 | - 'geodir_article_open_class' => '', |
|
474 | - 'geodir_article_open_replace' => '', |
|
475 | - 'geodir_article_close_replace' => '', |
|
476 | - 'geodir_sidebar_right_open_id' => '', |
|
477 | - 'geodir_sidebar_right_open_class' => '', |
|
478 | - 'geodir_sidebar_right_open_replace' => '', |
|
479 | - 'geodir_sidebar_right_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
480 | - 'geodir_sidebar_left_open_id' => '', |
|
481 | - 'geodir_sidebar_left_open_class' => '', |
|
482 | - 'geodir_sidebar_left_open_replace' => '', |
|
483 | - 'geodir_sidebar_left_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
484 | - 'geodir_main_content_open_id' => '', |
|
485 | - 'geodir_main_content_open_class' => '', |
|
486 | - 'geodir_main_content_open_replace' => '', |
|
487 | - 'geodir_main_content_close_replace' => '', |
|
488 | - 'geodir_top_content_add' => '', |
|
489 | - 'geodir_before_main_content_add' => '', |
|
490 | - 'geodir_before_widget_filter' => '', |
|
491 | - 'geodir_after_widget_filter' => '', |
|
492 | - 'geodir_theme_compat_css' => stripslashes('.geodir_full_page .top_banner_section{margin-bottom:0}.widget .geodir-cat-list ul li{clear:none}.wpgeo-enfold .av-main-nav ul{width:222px}.geodir-listing-search .geodir-loc-bar{border-top:none;padding:0}#main .geodir-listing-search,.geodir-listing-search .geodir-loc-bar{margin-bottom:0}#main .geodir-loc-bar-in,#main .geodir-category-list-in{background-color:#fcfcfc;margin:20px 0;padding:20px}#main .geodir_full_page .geodir-loc-bar-in,#main .geodir_full_page .geodir-loc-bar,#main .geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}#main .geodir-loc-bar-in{padding:20px}#main .geodir-search{margin:0;width:100%}#main .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#main .geodir-search input[type="text"]{margin:0 3% 0 0;padding:10px;width:32.4%}#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"]{font-size:inherit;line-height:2.25;margin:0;padding:7px;width:13%}.enfold-home-top section.widget{margin:0;padding:0}.enfold-home-top .top_banner_section{margin-bottom:0}.enfold-home-top .geodir-loc-bar{background:#fcfcfc;border:none;margin:0;padding:0}#main .enfold-home-top .geodir-loc-bar-in{background:none;border:none;margin:0 auto;padding:20px 0}#main .geodir-breadcrumb{border-bottom-style:solid;border-bottom-width:1px}#gd-tabs dt{clear:none}#geodir_slider ul li{list-style-type:none;margin:0;padding:0}#respond{clear:both}#comments .comments-title span{display:inline;font-size:inherit;font-weight:700}#reviewsTab .comments-area .bypostauthor cite span{display:inline}#top #comments .commentlist .comment,#top #comments .commentlist .comment > div{min-height:0}.commentlist .commenttext{padding-top:15px}#comment_imagesdropbox{margin-bottom:20px}.wpgeo-enfold .geodir_category_list_view li{margin-left:0;padding:0}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_category_list_view li .geodir-post-img{display:block}.wpgeo-enfold .geodir_event_listing_calendar tr.title{background:#ccc}@media only screen and (max-width:480px){.geodir_category_list_view li .geodir-content,.geodir_category_list_view li .geodir-post-img,.geodir_category_list_view li .geodir-addinfo{float:none;width:100%;margin:10px 0}#main .geodir-search input[type="text"],#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"],#main .geodir-search select{margin:10px 0;width:100%}}#main .geodir_full_page section:last-child .geodir-loc-bar{margin-bottom: -1px;border-bottom: none;}'), |
|
493 | - 'geodir_theme_compat_js' => '', |
|
494 | - 'geodir_theme_compat_default_options' => '', |
|
495 | - 'geodir_theme_compat_code' => 'Enfold' |
|
496 | - ); |
|
463 | + $theme_compat['Enfold'] = array( |
|
464 | + 'geodir_wrapper_open_id' => '', |
|
465 | + 'geodir_wrapper_open_class' => '', |
|
466 | + 'geodir_wrapper_open_replace' => '', |
|
467 | + 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
468 | + 'geodir_wrapper_content_open_id' => '', |
|
469 | + 'geodir_wrapper_content_open_class' => '', |
|
470 | + 'geodir_wrapper_content_open_replace' => '', |
|
471 | + 'geodir_wrapper_content_close_replace' => '</div></main>', |
|
472 | + 'geodir_article_open_id' => '', |
|
473 | + 'geodir_article_open_class' => '', |
|
474 | + 'geodir_article_open_replace' => '', |
|
475 | + 'geodir_article_close_replace' => '', |
|
476 | + 'geodir_sidebar_right_open_id' => '', |
|
477 | + 'geodir_sidebar_right_open_class' => '', |
|
478 | + 'geodir_sidebar_right_open_replace' => '', |
|
479 | + 'geodir_sidebar_right_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
480 | + 'geodir_sidebar_left_open_id' => '', |
|
481 | + 'geodir_sidebar_left_open_class' => '', |
|
482 | + 'geodir_sidebar_left_open_replace' => '', |
|
483 | + 'geodir_sidebar_left_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
484 | + 'geodir_main_content_open_id' => '', |
|
485 | + 'geodir_main_content_open_class' => '', |
|
486 | + 'geodir_main_content_open_replace' => '', |
|
487 | + 'geodir_main_content_close_replace' => '', |
|
488 | + 'geodir_top_content_add' => '', |
|
489 | + 'geodir_before_main_content_add' => '', |
|
490 | + 'geodir_before_widget_filter' => '', |
|
491 | + 'geodir_after_widget_filter' => '', |
|
492 | + 'geodir_theme_compat_css' => stripslashes('.geodir_full_page .top_banner_section{margin-bottom:0}.widget .geodir-cat-list ul li{clear:none}.wpgeo-enfold .av-main-nav ul{width:222px}.geodir-listing-search .geodir-loc-bar{border-top:none;padding:0}#main .geodir-listing-search,.geodir-listing-search .geodir-loc-bar{margin-bottom:0}#main .geodir-loc-bar-in,#main .geodir-category-list-in{background-color:#fcfcfc;margin:20px 0;padding:20px}#main .geodir_full_page .geodir-loc-bar-in,#main .geodir_full_page .geodir-loc-bar,#main .geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}#main .geodir-loc-bar-in{padding:20px}#main .geodir-search{margin:0;width:100%}#main .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#main .geodir-search input[type="text"]{margin:0 3% 0 0;padding:10px;width:32.4%}#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"]{font-size:inherit;line-height:2.25;margin:0;padding:7px;width:13%}.enfold-home-top section.widget{margin:0;padding:0}.enfold-home-top .top_banner_section{margin-bottom:0}.enfold-home-top .geodir-loc-bar{background:#fcfcfc;border:none;margin:0;padding:0}#main .enfold-home-top .geodir-loc-bar-in{background:none;border:none;margin:0 auto;padding:20px 0}#main .geodir-breadcrumb{border-bottom-style:solid;border-bottom-width:1px}#gd-tabs dt{clear:none}#geodir_slider ul li{list-style-type:none;margin:0;padding:0}#respond{clear:both}#comments .comments-title span{display:inline;font-size:inherit;font-weight:700}#reviewsTab .comments-area .bypostauthor cite span{display:inline}#top #comments .commentlist .comment,#top #comments .commentlist .comment > div{min-height:0}.commentlist .commenttext{padding-top:15px}#comment_imagesdropbox{margin-bottom:20px}.wpgeo-enfold .geodir_category_list_view li{margin-left:0;padding:0}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_category_list_view li .geodir-post-img{display:block}.wpgeo-enfold .geodir_event_listing_calendar tr.title{background:#ccc}@media only screen and (max-width:480px){.geodir_category_list_view li .geodir-content,.geodir_category_list_view li .geodir-post-img,.geodir_category_list_view li .geodir-addinfo{float:none;width:100%;margin:10px 0}#main .geodir-search input[type="text"],#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"],#main .geodir-search select{margin:10px 0;width:100%}}#main .geodir_full_page section:last-child .geodir-loc-bar{margin-bottom: -1px;border-bottom: none;}'), |
|
493 | + 'geodir_theme_compat_js' => '', |
|
494 | + 'geodir_theme_compat_default_options' => '', |
|
495 | + 'geodir_theme_compat_code' => 'Enfold' |
|
496 | + ); |
|
497 | 497 | |
498 | 498 | // X |
499 | - $theme_compat['X'] = array( |
|
500 | - 'geodir_wrapper_open_id' => '', |
|
501 | - 'geodir_wrapper_open_class' => '', |
|
502 | - 'geodir_wrapper_open_replace' => '', |
|
503 | - 'geodir_wrapper_close_replace' => '', |
|
504 | - 'geodir_wrapper_content_open_id' => '', |
|
505 | - 'geodir_wrapper_content_open_class' => '', |
|
506 | - 'geodir_wrapper_content_open_replace' => '', |
|
507 | - 'geodir_wrapper_content_close_replace' => '', |
|
508 | - 'geodir_article_open_id' => '', |
|
509 | - 'geodir_article_open_class' => '', |
|
510 | - 'geodir_article_open_replace' => '', |
|
511 | - 'geodir_article_close_replace' => '', |
|
512 | - 'geodir_sidebar_right_open_id' => '', |
|
513 | - 'geodir_sidebar_right_open_class' => '', |
|
514 | - 'geodir_sidebar_right_open_replace' => '', |
|
515 | - 'geodir_sidebar_right_close_replace' => '', |
|
516 | - 'geodir_sidebar_left_open_id' => '', |
|
517 | - 'geodir_sidebar_left_open_class' => '', |
|
518 | - 'geodir_sidebar_left_open_replace' => '', |
|
519 | - 'geodir_sidebar_left_close_replace' => '', |
|
520 | - 'geodir_main_content_open_id' => '', |
|
521 | - 'geodir_main_content_open_class' => '', |
|
522 | - 'geodir_main_content_open_replace' => '', |
|
523 | - 'geodir_main_content_close_replace' => '', |
|
524 | - 'geodir_top_content_add' => '', |
|
525 | - 'geodir_before_main_content_add' => '', |
|
526 | - 'geodir_before_widget_filter' => '', |
|
527 | - 'geodir_after_widget_filter' => '', |
|
528 | - 'geodir_theme_compat_css' => stripslashes('.x-colophon.bottom{clear:both}#geodir-main-content,.geodir_flex-container{margin-top:16px}.geodir-x ul{list-style:none}.widget ul.geodir_category_list_view{border:none}.geodir_category_list_view li.geodir-gridview:last-child{border-bottom:1px solid #e1e1e1}.home .x-header-landmark{display:none}.geodir-x .x-main .geodir_advance_search_widget{margin:0}.geodir-x .top_banner_section{margin-bottom:0}.geodir-loc-bar{background:rgba(0,0,0,0.05);margin:0;padding:0}.geodir-loc-bar-in{background:none;border:none;padding:10px}.geodir-search{margin:0;width:100%}.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{border:1px solid #ccc;box-shadow:none;height:auto;line-height:21px;margin:0 1% 0 0;padding:5px 10px}.widget .geodir-search select,.geodir-search input[type="text"]{width:28%}.geodir-search input[type="submit"],.geodir-search input[type="button"]{line-height:19px;margin-right:0;width:11%}.geodir-search input:hover[type="submit"],.geodir-search input:hover[type="button"]{background:#333;color:#fff}.geodir-cat-list .widget-title{margin-top:0}.geodir-x .geodir-category-list-in{background:rgba(0,0,0,0.05);border:none}.widget .geodir-cat-list ul.geodir-popular-cat-list{border:none;border-radius:0;box-shadow:none}.geodir_full_page .geodir-cat-list ul li{border:none}.geodir_full_page .geodir-cat-list ul li a{border:none}.post-type-archive .geodir-loc-bar{border:none;margin-top:20px}#menu-item-gd-location-switcher dd{margin-left:0}.geodir-chosen-container-single .chosen-single{height:auto}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_full_page section.widget{clear:both}.x-ethos .entry-title{margin-bottom:20px}.x-ethos .geodir-chosen-container-single .chosen-single{padding:0 0 0 8px}.x-ethos .widget ul li a,.x-ethos .geodir_category_list_view li{color:#333}@media only screen and (max-width:767px){.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{margin:0 0 10px;width:100%}}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-loc-bar,.geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-category-list-in{border-bottom:1px solid rgba(0,0,0,0.1)}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
529 | - 'geodir_theme_compat_js' => '', |
|
530 | - 'geodir_theme_compat_default_options' => '', |
|
531 | - 'geodir_theme_compat_code' => 'X' |
|
532 | - ); |
|
499 | + $theme_compat['X'] = array( |
|
500 | + 'geodir_wrapper_open_id' => '', |
|
501 | + 'geodir_wrapper_open_class' => '', |
|
502 | + 'geodir_wrapper_open_replace' => '', |
|
503 | + 'geodir_wrapper_close_replace' => '', |
|
504 | + 'geodir_wrapper_content_open_id' => '', |
|
505 | + 'geodir_wrapper_content_open_class' => '', |
|
506 | + 'geodir_wrapper_content_open_replace' => '', |
|
507 | + 'geodir_wrapper_content_close_replace' => '', |
|
508 | + 'geodir_article_open_id' => '', |
|
509 | + 'geodir_article_open_class' => '', |
|
510 | + 'geodir_article_open_replace' => '', |
|
511 | + 'geodir_article_close_replace' => '', |
|
512 | + 'geodir_sidebar_right_open_id' => '', |
|
513 | + 'geodir_sidebar_right_open_class' => '', |
|
514 | + 'geodir_sidebar_right_open_replace' => '', |
|
515 | + 'geodir_sidebar_right_close_replace' => '', |
|
516 | + 'geodir_sidebar_left_open_id' => '', |
|
517 | + 'geodir_sidebar_left_open_class' => '', |
|
518 | + 'geodir_sidebar_left_open_replace' => '', |
|
519 | + 'geodir_sidebar_left_close_replace' => '', |
|
520 | + 'geodir_main_content_open_id' => '', |
|
521 | + 'geodir_main_content_open_class' => '', |
|
522 | + 'geodir_main_content_open_replace' => '', |
|
523 | + 'geodir_main_content_close_replace' => '', |
|
524 | + 'geodir_top_content_add' => '', |
|
525 | + 'geodir_before_main_content_add' => '', |
|
526 | + 'geodir_before_widget_filter' => '', |
|
527 | + 'geodir_after_widget_filter' => '', |
|
528 | + 'geodir_theme_compat_css' => stripslashes('.x-colophon.bottom{clear:both}#geodir-main-content,.geodir_flex-container{margin-top:16px}.geodir-x ul{list-style:none}.widget ul.geodir_category_list_view{border:none}.geodir_category_list_view li.geodir-gridview:last-child{border-bottom:1px solid #e1e1e1}.home .x-header-landmark{display:none}.geodir-x .x-main .geodir_advance_search_widget{margin:0}.geodir-x .top_banner_section{margin-bottom:0}.geodir-loc-bar{background:rgba(0,0,0,0.05);margin:0;padding:0}.geodir-loc-bar-in{background:none;border:none;padding:10px}.geodir-search{margin:0;width:100%}.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{border:1px solid #ccc;box-shadow:none;height:auto;line-height:21px;margin:0 1% 0 0;padding:5px 10px}.widget .geodir-search select,.geodir-search input[type="text"]{width:28%}.geodir-search input[type="submit"],.geodir-search input[type="button"]{line-height:19px;margin-right:0;width:11%}.geodir-search input:hover[type="submit"],.geodir-search input:hover[type="button"]{background:#333;color:#fff}.geodir-cat-list .widget-title{margin-top:0}.geodir-x .geodir-category-list-in{background:rgba(0,0,0,0.05);border:none}.widget .geodir-cat-list ul.geodir-popular-cat-list{border:none;border-radius:0;box-shadow:none}.geodir_full_page .geodir-cat-list ul li{border:none}.geodir_full_page .geodir-cat-list ul li a{border:none}.post-type-archive .geodir-loc-bar{border:none;margin-top:20px}#menu-item-gd-location-switcher dd{margin-left:0}.geodir-chosen-container-single .chosen-single{height:auto}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_full_page section.widget{clear:both}.x-ethos .entry-title{margin-bottom:20px}.x-ethos .geodir-chosen-container-single .chosen-single{padding:0 0 0 8px}.x-ethos .widget ul li a,.x-ethos .geodir_category_list_view li{color:#333}@media only screen and (max-width:767px){.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{margin:0 0 10px;width:100%}}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-loc-bar,.geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-category-list-in{border-bottom:1px solid rgba(0,0,0,0.1)}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
529 | + 'geodir_theme_compat_js' => '', |
|
530 | + 'geodir_theme_compat_default_options' => '', |
|
531 | + 'geodir_theme_compat_code' => 'X' |
|
532 | + ); |
|
533 | 533 | |
534 | 534 | // Divi |
535 | - $theme_compat['Divi'] = array( |
|
536 | - 'geodir_wrapper_open_id' => 'main-content', |
|
537 | - 'geodir_wrapper_open_class' => '', |
|
538 | - 'geodir_wrapper_open_replace' => '', |
|
539 | - 'geodir_wrapper_close_replace' => '', |
|
540 | - 'geodir_wrapper_content_open_id' => 'left-area', |
|
541 | - 'geodir_wrapper_content_open_class' => '', |
|
542 | - 'geodir_wrapper_content_open_replace' => '<div class="container"><div id="content-area" class="clearfix"><div id="[id]" class="[class]" role="main" >', |
|
543 | - 'geodir_wrapper_content_close_replace' => '', |
|
544 | - 'geodir_article_open_id' => '', |
|
545 | - 'geodir_article_open_class' => '', |
|
546 | - 'geodir_article_open_replace' => '', |
|
547 | - 'geodir_article_close_replace' => '', |
|
548 | - 'geodir_sidebar_right_open_id' => 'sidebar', |
|
549 | - 'geodir_sidebar_right_open_class' => '', |
|
550 | - 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
551 | - 'geodir_sidebar_right_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
552 | - 'geodir_sidebar_left_open_id' => 'sidebar', |
|
553 | - 'geodir_sidebar_left_open_class' => '', |
|
554 | - 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
555 | - 'geodir_sidebar_left_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
556 | - 'geodir_main_content_open_id' => '', |
|
557 | - 'geodir_main_content_open_class' => '', |
|
558 | - 'geodir_main_content_open_replace' => '', |
|
559 | - 'geodir_main_content_close_replace' => '', |
|
560 | - 'geodir_top_content_add' => '', |
|
561 | - 'geodir_before_main_content_add' => '', |
|
562 | - 'geodir_before_widget_filter' => '', |
|
563 | - 'geodir_after_widget_filter' => '', |
|
564 | - 'geodir_theme_compat_css' => stripslashes('#left-area ul.geodir-direction-nav{list-style-type:none}#sidebar .geodir-company_info{margin-left:30px}#sidebar .geodir-widget{float:none;margin:0 0 30px 30px}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.archive .entry-header,.geodir-breadcrumb{border-bottom:1px solid #e2e2e2}.archive .entry-header h1,ul#breadcrumbs{margin:0 auto;width:1080px}#left-area ul.geodir_category_list_view{padding:10px 0}.nav li#menu-item-gd-location-switcher ul{width:222px}#menu-item-gd-location-switcher li.gd-location-switcher-menu-item{padding-right:0}#menu-item-gd-location-switcher dd{margin-left:0}#menu-item-gd-location-switcher .geodir_location_tab_container dd a{padding:5px;width:auto}@media only screen and ( max-width: 980px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:690px}}@media only screen and ( max-width: 767px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:400px}}@media only screen and ( max-width: 479px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:280px}}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
565 | - 'geodir_theme_compat_js' => '', |
|
566 | - 'geodir_theme_compat_default_options' => '', |
|
567 | - 'geodir_theme_compat_code' => 'Divi' |
|
568 | - ); |
|
535 | + $theme_compat['Divi'] = array( |
|
536 | + 'geodir_wrapper_open_id' => 'main-content', |
|
537 | + 'geodir_wrapper_open_class' => '', |
|
538 | + 'geodir_wrapper_open_replace' => '', |
|
539 | + 'geodir_wrapper_close_replace' => '', |
|
540 | + 'geodir_wrapper_content_open_id' => 'left-area', |
|
541 | + 'geodir_wrapper_content_open_class' => '', |
|
542 | + 'geodir_wrapper_content_open_replace' => '<div class="container"><div id="content-area" class="clearfix"><div id="[id]" class="[class]" role="main" >', |
|
543 | + 'geodir_wrapper_content_close_replace' => '', |
|
544 | + 'geodir_article_open_id' => '', |
|
545 | + 'geodir_article_open_class' => '', |
|
546 | + 'geodir_article_open_replace' => '', |
|
547 | + 'geodir_article_close_replace' => '', |
|
548 | + 'geodir_sidebar_right_open_id' => 'sidebar', |
|
549 | + 'geodir_sidebar_right_open_class' => '', |
|
550 | + 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
551 | + 'geodir_sidebar_right_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
552 | + 'geodir_sidebar_left_open_id' => 'sidebar', |
|
553 | + 'geodir_sidebar_left_open_class' => '', |
|
554 | + 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
555 | + 'geodir_sidebar_left_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
556 | + 'geodir_main_content_open_id' => '', |
|
557 | + 'geodir_main_content_open_class' => '', |
|
558 | + 'geodir_main_content_open_replace' => '', |
|
559 | + 'geodir_main_content_close_replace' => '', |
|
560 | + 'geodir_top_content_add' => '', |
|
561 | + 'geodir_before_main_content_add' => '', |
|
562 | + 'geodir_before_widget_filter' => '', |
|
563 | + 'geodir_after_widget_filter' => '', |
|
564 | + 'geodir_theme_compat_css' => stripslashes('#left-area ul.geodir-direction-nav{list-style-type:none}#sidebar .geodir-company_info{margin-left:30px}#sidebar .geodir-widget{float:none;margin:0 0 30px 30px}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.archive .entry-header,.geodir-breadcrumb{border-bottom:1px solid #e2e2e2}.archive .entry-header h1,ul#breadcrumbs{margin:0 auto;width:1080px}#left-area ul.geodir_category_list_view{padding:10px 0}.nav li#menu-item-gd-location-switcher ul{width:222px}#menu-item-gd-location-switcher li.gd-location-switcher-menu-item{padding-right:0}#menu-item-gd-location-switcher dd{margin-left:0}#menu-item-gd-location-switcher .geodir_location_tab_container dd a{padding:5px;width:auto}@media only screen and ( max-width: 980px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:690px}}@media only screen and ( max-width: 767px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:400px}}@media only screen and ( max-width: 479px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:280px}}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
565 | + 'geodir_theme_compat_js' => '', |
|
566 | + 'geodir_theme_compat_default_options' => '', |
|
567 | + 'geodir_theme_compat_code' => 'Divi' |
|
568 | + ); |
|
569 | 569 | |
570 | 570 | // Genesis |
571 | - $theme_compat['Genesis'] = array( |
|
572 | - 'geodir_wrapper_open_id' => '', |
|
573 | - 'geodir_wrapper_open_class' => 'content-sidebar-wrap', |
|
574 | - 'geodir_wrapper_open_replace' => '', |
|
575 | - 'geodir_wrapper_close_replace' => '', |
|
576 | - 'geodir_wrapper_content_open_id' => '', |
|
577 | - 'geodir_wrapper_content_open_class' => 'content', |
|
578 | - 'geodir_wrapper_content_open_replace' => '<div class="[class]" role="main" >', |
|
579 | - 'geodir_wrapper_content_close_replace' => '', |
|
580 | - 'geodir_article_open_id' => '', |
|
581 | - 'geodir_article_open_class' => '', |
|
582 | - 'geodir_article_open_replace' => '', |
|
583 | - 'geodir_article_close_replace' => '', |
|
584 | - 'geodir_sidebar_right_open_id' => '', |
|
585 | - 'geodir_sidebar_right_open_class' => 'sidebar sidebar-primary widget-area', |
|
586 | - 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
587 | - 'geodir_sidebar_right_close_replace' => '', |
|
588 | - 'geodir_sidebar_left_open_id' => '', |
|
589 | - 'geodir_sidebar_left_open_class' => 'sidebar sidebar-secondary widget-area', |
|
590 | - 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
591 | - 'geodir_sidebar_left_close_replace' => '', |
|
592 | - 'geodir_main_content_open_id' => '', |
|
593 | - 'geodir_main_content_open_class' => '', |
|
594 | - 'geodir_main_content_open_replace' => '<main id="[id]" class="entry [class]" role="main">', |
|
595 | - 'geodir_main_content_close_replace' => '', |
|
596 | - 'geodir_top_content_add' => '', |
|
597 | - 'geodir_before_main_content_add' => '', |
|
598 | - 'geodir_before_widget_filter' => '', |
|
599 | - 'geodir_after_widget_filter' => '', |
|
600 | - 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-gd-location-switcher menu-item-has-children gd-location-switcher', |
|
601 | - 'geodir_theme_compat_css' => stripslashes('.full-width-content #geodir-wrapper-content{width:100%}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}.content{float:left}.sidebar-content .content,.sidebar-content #geodir-wrapper-content{float:right}.sidebar .geodir-company_info{background-color:#fff;border:none}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.geodir-breadcrumb-bar{margin-bottom:-35px} .search-page .entry-title,.listings-page .entry-title{font-size: 20px;}.site-inner .geodir-breadcrumb-bar{margin-bottom:0px}'), |
|
602 | - 'geodir_theme_compat_js' => '', |
|
603 | - 'geodir_theme_compat_default_options' => '', |
|
604 | - 'geodir_theme_compat_code' => 'Genesis' |
|
605 | - ); |
|
571 | + $theme_compat['Genesis'] = array( |
|
572 | + 'geodir_wrapper_open_id' => '', |
|
573 | + 'geodir_wrapper_open_class' => 'content-sidebar-wrap', |
|
574 | + 'geodir_wrapper_open_replace' => '', |
|
575 | + 'geodir_wrapper_close_replace' => '', |
|
576 | + 'geodir_wrapper_content_open_id' => '', |
|
577 | + 'geodir_wrapper_content_open_class' => 'content', |
|
578 | + 'geodir_wrapper_content_open_replace' => '<div class="[class]" role="main" >', |
|
579 | + 'geodir_wrapper_content_close_replace' => '', |
|
580 | + 'geodir_article_open_id' => '', |
|
581 | + 'geodir_article_open_class' => '', |
|
582 | + 'geodir_article_open_replace' => '', |
|
583 | + 'geodir_article_close_replace' => '', |
|
584 | + 'geodir_sidebar_right_open_id' => '', |
|
585 | + 'geodir_sidebar_right_open_class' => 'sidebar sidebar-primary widget-area', |
|
586 | + 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
587 | + 'geodir_sidebar_right_close_replace' => '', |
|
588 | + 'geodir_sidebar_left_open_id' => '', |
|
589 | + 'geodir_sidebar_left_open_class' => 'sidebar sidebar-secondary widget-area', |
|
590 | + 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
591 | + 'geodir_sidebar_left_close_replace' => '', |
|
592 | + 'geodir_main_content_open_id' => '', |
|
593 | + 'geodir_main_content_open_class' => '', |
|
594 | + 'geodir_main_content_open_replace' => '<main id="[id]" class="entry [class]" role="main">', |
|
595 | + 'geodir_main_content_close_replace' => '', |
|
596 | + 'geodir_top_content_add' => '', |
|
597 | + 'geodir_before_main_content_add' => '', |
|
598 | + 'geodir_before_widget_filter' => '', |
|
599 | + 'geodir_after_widget_filter' => '', |
|
600 | + 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-gd-location-switcher menu-item-has-children gd-location-switcher', |
|
601 | + 'geodir_theme_compat_css' => stripslashes('.full-width-content #geodir-wrapper-content{width:100%}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}.content{float:left}.sidebar-content .content,.sidebar-content #geodir-wrapper-content{float:right}.sidebar .geodir-company_info{background-color:#fff;border:none}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.geodir-breadcrumb-bar{margin-bottom:-35px} .search-page .entry-title,.listings-page .entry-title{font-size: 20px;}.site-inner .geodir-breadcrumb-bar{margin-bottom:0px}'), |
|
602 | + 'geodir_theme_compat_js' => '', |
|
603 | + 'geodir_theme_compat_default_options' => '', |
|
604 | + 'geodir_theme_compat_code' => 'Genesis' |
|
605 | + ); |
|
606 | 606 | |
607 | 607 | // Jupiter |
608 | - $theme_compat['Jupiter'] = array( |
|
609 | - 'geodir_wrapper_open_id' => '', |
|
610 | - 'geodir_wrapper_open_class' => '', |
|
611 | - 'geodir_wrapper_open_replace' => '<div id="theme-page"><div class="mk-main-wrapper-holder"><div class="theme-page-wrapper mk-main-wrapper mk-grid vc_row-fluid">', |
|
612 | - 'geodir_wrapper_close_replace' => '</div></div></div>', |
|
613 | - 'geodir_wrapper_content_open_id' => '', |
|
614 | - 'geodir_wrapper_content_open_class' => '', |
|
615 | - 'geodir_wrapper_content_open_replace' => '', |
|
616 | - 'geodir_wrapper_content_close_replace' => '', |
|
617 | - 'geodir_article_open_id' => '', |
|
618 | - 'geodir_article_open_class' => '', |
|
619 | - 'geodir_article_open_replace' => '', |
|
620 | - 'geodir_article_close_replace' => '', |
|
621 | - 'geodir_sidebar_right_open_id' => 'mk-sidebar', |
|
622 | - 'geodir_sidebar_right_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
623 | - 'geodir_sidebar_right_open_replace' => '', |
|
624 | - 'geodir_sidebar_right_close_replace' => '', |
|
625 | - 'geodir_sidebar_left_open_id' => 'mk-sidebar', |
|
626 | - 'geodir_sidebar_left_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
627 | - 'geodir_sidebar_left_open_replace' => '', |
|
628 | - 'geodir_sidebar_left_close_replace' => '', |
|
629 | - 'geodir_main_content_open_id' => '', |
|
630 | - 'geodir_main_content_open_class' => '', |
|
631 | - 'geodir_main_content_open_replace' => '', |
|
632 | - 'geodir_main_content_close_replace' => '', |
|
633 | - 'geodir_top_content_add' => '', |
|
634 | - 'geodir_before_main_content_add' => '', |
|
635 | - 'geodir_before_widget_filter' => '', |
|
636 | - 'geodir_after_widget_filter' => '', |
|
637 | - 'geodir_before_title_filter' => '<h3 class="widgettitle geodir-widget-title">', |
|
638 | - 'geodir_after_title_filter' => '', |
|
639 | - 'geodir_menu_li_class_filter' => 'menu-item menu-item-has-children no-mega-menu', |
|
640 | - 'geodir_sub_menu_ul_class_filter' => '', |
|
641 | - 'geodir_sub_menu_li_class_filter' => '', |
|
642 | - 'geodir_menu_a_class_filter' => 'menu-item-link', |
|
643 | - 'geodir_sub_menu_a_class_filter' => 'menu-item-link one-page-nav-item', |
|
644 | - 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-type-social menu-item-type-social gd-location-switcher menu-item-has-children no-mega-menu', |
|
645 | - 'geodir_location_switcher_menu_a_class_filter' => 'menu-item-link', |
|
646 | - 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
647 | - 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
648 | - 'geodir_theme_compat_css' => stripslashes('.geodir-widget li,.geodir_category_list_view li{margin:0}#theme-page h3.geodir-entry-title{font-size:14px}#menu-item-gd-location-switcher dd{line-height:44px}#menu-item-gd-location-switcher .geodir_location_sugestion{line-height:20px}.geodir_loginbox{overflow:visible}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
649 | - 'geodir_theme_compat_js' => '', |
|
650 | - 'geodir_theme_compat_default_options' => '', |
|
651 | - 'geodir_theme_compat_code' => 'Jupiter' |
|
652 | - ); |
|
608 | + $theme_compat['Jupiter'] = array( |
|
609 | + 'geodir_wrapper_open_id' => '', |
|
610 | + 'geodir_wrapper_open_class' => '', |
|
611 | + 'geodir_wrapper_open_replace' => '<div id="theme-page"><div class="mk-main-wrapper-holder"><div class="theme-page-wrapper mk-main-wrapper mk-grid vc_row-fluid">', |
|
612 | + 'geodir_wrapper_close_replace' => '</div></div></div>', |
|
613 | + 'geodir_wrapper_content_open_id' => '', |
|
614 | + 'geodir_wrapper_content_open_class' => '', |
|
615 | + 'geodir_wrapper_content_open_replace' => '', |
|
616 | + 'geodir_wrapper_content_close_replace' => '', |
|
617 | + 'geodir_article_open_id' => '', |
|
618 | + 'geodir_article_open_class' => '', |
|
619 | + 'geodir_article_open_replace' => '', |
|
620 | + 'geodir_article_close_replace' => '', |
|
621 | + 'geodir_sidebar_right_open_id' => 'mk-sidebar', |
|
622 | + 'geodir_sidebar_right_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
623 | + 'geodir_sidebar_right_open_replace' => '', |
|
624 | + 'geodir_sidebar_right_close_replace' => '', |
|
625 | + 'geodir_sidebar_left_open_id' => 'mk-sidebar', |
|
626 | + 'geodir_sidebar_left_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
627 | + 'geodir_sidebar_left_open_replace' => '', |
|
628 | + 'geodir_sidebar_left_close_replace' => '', |
|
629 | + 'geodir_main_content_open_id' => '', |
|
630 | + 'geodir_main_content_open_class' => '', |
|
631 | + 'geodir_main_content_open_replace' => '', |
|
632 | + 'geodir_main_content_close_replace' => '', |
|
633 | + 'geodir_top_content_add' => '', |
|
634 | + 'geodir_before_main_content_add' => '', |
|
635 | + 'geodir_before_widget_filter' => '', |
|
636 | + 'geodir_after_widget_filter' => '', |
|
637 | + 'geodir_before_title_filter' => '<h3 class="widgettitle geodir-widget-title">', |
|
638 | + 'geodir_after_title_filter' => '', |
|
639 | + 'geodir_menu_li_class_filter' => 'menu-item menu-item-has-children no-mega-menu', |
|
640 | + 'geodir_sub_menu_ul_class_filter' => '', |
|
641 | + 'geodir_sub_menu_li_class_filter' => '', |
|
642 | + 'geodir_menu_a_class_filter' => 'menu-item-link', |
|
643 | + 'geodir_sub_menu_a_class_filter' => 'menu-item-link one-page-nav-item', |
|
644 | + 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-type-social menu-item-type-social gd-location-switcher menu-item-has-children no-mega-menu', |
|
645 | + 'geodir_location_switcher_menu_a_class_filter' => 'menu-item-link', |
|
646 | + 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
647 | + 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
648 | + 'geodir_theme_compat_css' => stripslashes('.geodir-widget li,.geodir_category_list_view li{margin:0}#theme-page h3.geodir-entry-title{font-size:14px}#menu-item-gd-location-switcher dd{line-height:44px}#menu-item-gd-location-switcher .geodir_location_sugestion{line-height:20px}.geodir_loginbox{overflow:visible}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
649 | + 'geodir_theme_compat_js' => '', |
|
650 | + 'geodir_theme_compat_default_options' => '', |
|
651 | + 'geodir_theme_compat_code' => 'Jupiter' |
|
652 | + ); |
|
653 | 653 | |
654 | 654 | // Multi News |
655 | - $theme_compat['Multi_News'] = array( |
|
656 | - 'geodir_wrapper_open_id' => '', |
|
657 | - 'geodir_wrapper_open_class' => 'main-container clearfix', |
|
658 | - 'geodir_wrapper_open_replace' => '', |
|
659 | - 'geodir_wrapper_close_replace' => '', |
|
660 | - 'geodir_wrapper_content_open_id' => '', |
|
661 | - 'geodir_wrapper_content_open_class' => '', |
|
662 | - 'geodir_wrapper_content_open_replace' => '<div class="main-left" ><div class="main-content "><div class="site-content page-wrap">', |
|
663 | - 'geodir_wrapper_content_close_replace' => '</div></div></div>', |
|
664 | - 'geodir_article_open_id' => '', |
|
665 | - 'geodir_article_open_class' => '', |
|
666 | - 'geodir_article_open_replace' => '', |
|
667 | - 'geodir_article_close_replace' => '', |
|
668 | - 'geodir_sidebar_right_open_id' => '', |
|
669 | - 'geodir_sidebar_right_open_class' => '', |
|
670 | - 'geodir_sidebar_right_open_replace' => '<aside class="sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
671 | - 'geodir_sidebar_right_close_replace' => '', |
|
672 | - 'geodir_sidebar_left_open_id' => '', |
|
673 | - 'geodir_sidebar_left_open_class' => '', |
|
674 | - 'geodir_sidebar_left_open_replace' => '<aside class="secondary-sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
675 | - 'geodir_sidebar_left_close_replace' => '', |
|
676 | - 'geodir_main_content_open_id' => '', |
|
677 | - 'geodir_main_content_open_class' => '', |
|
678 | - 'geodir_main_content_open_replace' => '<div class="site-content page-wrap">', |
|
679 | - 'geodir_main_content_close_replace' => '</div>', |
|
680 | - 'geodir_top_content_add' => '', |
|
681 | - 'geodir_before_main_content_add' => '', |
|
682 | - 'geodir_full_page_class_filter' => 'section full-width-section', |
|
683 | - 'geodir_before_widget_filter' => '', |
|
684 | - 'geodir_after_widget_filter' => '', |
|
685 | - 'geodir_before_title_filter' => '<div class="widget-title"><h2>', |
|
686 | - 'geodir_after_title_filter' => '</h2></div>', |
|
687 | - 'geodir_menu_li_class_filter' => '', |
|
688 | - 'geodir_sub_menu_ul_class_filter' => '', |
|
689 | - 'geodir_sub_menu_li_class_filter' => '', |
|
690 | - 'geodir_menu_a_class_filter' => '', |
|
691 | - 'geodir_sub_menu_a_class_filter' => '', |
|
692 | - 'geodir_location_switcher_menu_li_class_filter' => '', |
|
693 | - 'geodir_location_switcher_menu_a_class_filter' => '', |
|
694 | - 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
695 | - 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
696 | - 'geodir_theme_compat_css' => stripslashes('.full-width-section .geodir-search{margin:0;width:100%}.geodir_full_page .geodir-search{margin:0 auto;float:none}.geodir-search input[type=button],.geodir-search input[type=submit]{width:13%}.geodir-search input[type=text]{border:1px solid #ddd;border-radius:0;padding:0 8px}.geodir-category-list-in,.geodir-loc-bar-in{background:#f2f2f2;border-color:#dbdbdb}.geodir-category-list-in{margin-top:0}.geodir-cat-list .widget-title h2{margin:-13px -13px 13px}.widget .geodir-cat-list ul li.geodir-pcat-show a:before{display:none!important}.widget .geodir-cat-list ul li.geodir-pcat-show i{margin-right:5px}.container .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#geodir_carousel,#geodir_slider{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;margin-bottom:20px!important;border:1px solid #e1e1e1;box-shadow:none}#geodir_carousel{padding:10px}.geodir-tabs-content ol.commentlist{margin:40px 0;padding:0}li#post_mapTab{min-height:400px}#reviewsTab ol.commentlist li{border-bottom:none}#reviewsTab ol.commentlist li article.comment{border-bottom:1px solid #e1e1e1;padding-bottom:10px}.comment-content .rating{display:none}.comment-respond .gd_rating{margin-bottom:20px}div.geodir-rating{width:85px!important}.comment-respond .comment-notes{margin-bottom:10px}.average-review span,.comment-form label,.dtreviewed,.geodir-details-sidebar-user-links a,.geodir-viewall,.geodir_more_info span,.reviewer,dl.geodir-tab-head dd a{font-family:"Archivo Narrow",sans-serif}section.comment-content{margin:0 0 0 12%}#reviewsTab .comments-area .comment-content{width:auto}section.comment-content .description,section.comment-content p{margin:15px 0}dl.geodir-tab-head dd a{background:#f3f3f3;margin-top:-1px;font-size:14px;padding:0 15px}dl.geodir-tab-head dd.geodir-tab-active a{padding-bottom:1px}.geodir-widget .geodir_list_heading,.geodir-widget h3.widget-title{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px;color:#2d2d2d}.geodir-widget .geodir_list_heading h3{background:0 0;border:none}.geodir-widget .geodir_list_heading{margin:-13px -14px 13px}.geodir-map-listing-page{border-width:1px 0 0;border-style:solid;border-color:#dbdbdb}.geodir-sidebar-wrap .geodir-company_info{margin:15px}.geodir-details-sidebar-social-sharing iframe{float:left}.geodir-details-sidebar-rating{overflow:hidden}.geodir-details-sidebar-rating .gd_rating_show,.geodir-details-sidebar-rating .geodir-rating{float:left;margin-right:15px}.geodir-details-sidebar-rating span.item{float:left;margin-top:5px}.geodir-details-sidebar-rating .average-review{top:-4px;position:relative}.geodir-details-sidebar-rating span.item img{margin-top:5px}.geodir_full_page{background:#fff;border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 0 #e5e5e5;box-shadow:0 1px 0 #e5e5e5;padding:15px;margin-bottom:20px;clear:both}.geodir_map_container .main_list img{margin:0 5px}.geodir_category_list_view li.geodir-gridview .geodir-post-img .geodir_thumbnail{margin-bottom:10px}.geodir-addinfo .geodir-pinpoint,.geodir-addinfo a i{margin-right:5px}.geodir_category_list_view li.geodir-gridview h3{font-size:18px;margin-bottom:10px}#related_listingTab ul.geodir_category_list_view{padding:0!important}#reviewsTab #comments .gd_rating{margin-top:5px}.widget .geodir_category_list_view li .geodir-entry-content,.widget .geodir_category_list_view li a:before{display:none!important}.geodir_category_list_view li .geodir-entry-title{margin-bottom:10px}.widget ul.geodir_category_list_view{padding:15px}.sidebar .widget .geodir_category_list_view li{width:calc(100% - 25px)}.widget .geodir-loginbox-list li{overflow:visible!important}.widget ul.chosen-results{margin:0!important}.main_list_selecter{margin-right:5px}.geodir-viewall{float:right;width:auto!important}.widget-title h2{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px}.widget:first-child .geodir_list_heading .widget-title{margin-top:0}.geodir_list_heading .widget-title{float:left;width:80%;margin-top:0}.geodir_list_heading .widget-title h2{padding:0 px;background:0 0;border:none;height:auto;line-height:auto}.chosen-default:before{content:none;display:none;position:absolute;margin-left:-1000000px;float:left}#geodir-wrapper .entry-crumbs{margin-bottom:20px}.geodir-search .mom-select{float:left;width:150px;margin:5px;border:1px solid #ddd;height:40px}.iprelative .gm-style .gm-style-iw{width:100%!important}'), |
|
697 | - 'geodir_theme_compat_js' => 'jQuery(document).ready(function(e){e(".geodir_full_page").length&&""===e.trim(e(".geodir_full_page").html())&&e(".geodir_full_page").css({display:"none"})});', |
|
698 | - 'geodir_theme_compat_default_options' => '', |
|
699 | - 'geodir_theme_compat_code' => 'Multi_News' |
|
700 | - ); |
|
701 | - |
|
702 | - update_option('gd_theme_compats', $theme_compat); |
|
703 | - |
|
704 | - gd_set_theme_compat();// set the compat pack if avail |
|
655 | + $theme_compat['Multi_News'] = array( |
|
656 | + 'geodir_wrapper_open_id' => '', |
|
657 | + 'geodir_wrapper_open_class' => 'main-container clearfix', |
|
658 | + 'geodir_wrapper_open_replace' => '', |
|
659 | + 'geodir_wrapper_close_replace' => '', |
|
660 | + 'geodir_wrapper_content_open_id' => '', |
|
661 | + 'geodir_wrapper_content_open_class' => '', |
|
662 | + 'geodir_wrapper_content_open_replace' => '<div class="main-left" ><div class="main-content "><div class="site-content page-wrap">', |
|
663 | + 'geodir_wrapper_content_close_replace' => '</div></div></div>', |
|
664 | + 'geodir_article_open_id' => '', |
|
665 | + 'geodir_article_open_class' => '', |
|
666 | + 'geodir_article_open_replace' => '', |
|
667 | + 'geodir_article_close_replace' => '', |
|
668 | + 'geodir_sidebar_right_open_id' => '', |
|
669 | + 'geodir_sidebar_right_open_class' => '', |
|
670 | + 'geodir_sidebar_right_open_replace' => '<aside class="sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
671 | + 'geodir_sidebar_right_close_replace' => '', |
|
672 | + 'geodir_sidebar_left_open_id' => '', |
|
673 | + 'geodir_sidebar_left_open_class' => '', |
|
674 | + 'geodir_sidebar_left_open_replace' => '<aside class="secondary-sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
675 | + 'geodir_sidebar_left_close_replace' => '', |
|
676 | + 'geodir_main_content_open_id' => '', |
|
677 | + 'geodir_main_content_open_class' => '', |
|
678 | + 'geodir_main_content_open_replace' => '<div class="site-content page-wrap">', |
|
679 | + 'geodir_main_content_close_replace' => '</div>', |
|
680 | + 'geodir_top_content_add' => '', |
|
681 | + 'geodir_before_main_content_add' => '', |
|
682 | + 'geodir_full_page_class_filter' => 'section full-width-section', |
|
683 | + 'geodir_before_widget_filter' => '', |
|
684 | + 'geodir_after_widget_filter' => '', |
|
685 | + 'geodir_before_title_filter' => '<div class="widget-title"><h2>', |
|
686 | + 'geodir_after_title_filter' => '</h2></div>', |
|
687 | + 'geodir_menu_li_class_filter' => '', |
|
688 | + 'geodir_sub_menu_ul_class_filter' => '', |
|
689 | + 'geodir_sub_menu_li_class_filter' => '', |
|
690 | + 'geodir_menu_a_class_filter' => '', |
|
691 | + 'geodir_sub_menu_a_class_filter' => '', |
|
692 | + 'geodir_location_switcher_menu_li_class_filter' => '', |
|
693 | + 'geodir_location_switcher_menu_a_class_filter' => '', |
|
694 | + 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
695 | + 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
696 | + 'geodir_theme_compat_css' => stripslashes('.full-width-section .geodir-search{margin:0;width:100%}.geodir_full_page .geodir-search{margin:0 auto;float:none}.geodir-search input[type=button],.geodir-search input[type=submit]{width:13%}.geodir-search input[type=text]{border:1px solid #ddd;border-radius:0;padding:0 8px}.geodir-category-list-in,.geodir-loc-bar-in{background:#f2f2f2;border-color:#dbdbdb}.geodir-category-list-in{margin-top:0}.geodir-cat-list .widget-title h2{margin:-13px -13px 13px}.widget .geodir-cat-list ul li.geodir-pcat-show a:before{display:none!important}.widget .geodir-cat-list ul li.geodir-pcat-show i{margin-right:5px}.container .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#geodir_carousel,#geodir_slider{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;margin-bottom:20px!important;border:1px solid #e1e1e1;box-shadow:none}#geodir_carousel{padding:10px}.geodir-tabs-content ol.commentlist{margin:40px 0;padding:0}li#post_mapTab{min-height:400px}#reviewsTab ol.commentlist li{border-bottom:none}#reviewsTab ol.commentlist li article.comment{border-bottom:1px solid #e1e1e1;padding-bottom:10px}.comment-content .rating{display:none}.comment-respond .gd_rating{margin-bottom:20px}div.geodir-rating{width:85px!important}.comment-respond .comment-notes{margin-bottom:10px}.average-review span,.comment-form label,.dtreviewed,.geodir-details-sidebar-user-links a,.geodir-viewall,.geodir_more_info span,.reviewer,dl.geodir-tab-head dd a{font-family:"Archivo Narrow",sans-serif}section.comment-content{margin:0 0 0 12%}#reviewsTab .comments-area .comment-content{width:auto}section.comment-content .description,section.comment-content p{margin:15px 0}dl.geodir-tab-head dd a{background:#f3f3f3;margin-top:-1px;font-size:14px;padding:0 15px}dl.geodir-tab-head dd.geodir-tab-active a{padding-bottom:1px}.geodir-widget .geodir_list_heading,.geodir-widget h3.widget-title{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px;color:#2d2d2d}.geodir-widget .geodir_list_heading h3{background:0 0;border:none}.geodir-widget .geodir_list_heading{margin:-13px -14px 13px}.geodir-map-listing-page{border-width:1px 0 0;border-style:solid;border-color:#dbdbdb}.geodir-sidebar-wrap .geodir-company_info{margin:15px}.geodir-details-sidebar-social-sharing iframe{float:left}.geodir-details-sidebar-rating{overflow:hidden}.geodir-details-sidebar-rating .gd_rating_show,.geodir-details-sidebar-rating .geodir-rating{float:left;margin-right:15px}.geodir-details-sidebar-rating span.item{float:left;margin-top:5px}.geodir-details-sidebar-rating .average-review{top:-4px;position:relative}.geodir-details-sidebar-rating span.item img{margin-top:5px}.geodir_full_page{background:#fff;border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 0 #e5e5e5;box-shadow:0 1px 0 #e5e5e5;padding:15px;margin-bottom:20px;clear:both}.geodir_map_container .main_list img{margin:0 5px}.geodir_category_list_view li.geodir-gridview .geodir-post-img .geodir_thumbnail{margin-bottom:10px}.geodir-addinfo .geodir-pinpoint,.geodir-addinfo a i{margin-right:5px}.geodir_category_list_view li.geodir-gridview h3{font-size:18px;margin-bottom:10px}#related_listingTab ul.geodir_category_list_view{padding:0!important}#reviewsTab #comments .gd_rating{margin-top:5px}.widget .geodir_category_list_view li .geodir-entry-content,.widget .geodir_category_list_view li a:before{display:none!important}.geodir_category_list_view li .geodir-entry-title{margin-bottom:10px}.widget ul.geodir_category_list_view{padding:15px}.sidebar .widget .geodir_category_list_view li{width:calc(100% - 25px)}.widget .geodir-loginbox-list li{overflow:visible!important}.widget ul.chosen-results{margin:0!important}.main_list_selecter{margin-right:5px}.geodir-viewall{float:right;width:auto!important}.widget-title h2{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px}.widget:first-child .geodir_list_heading .widget-title{margin-top:0}.geodir_list_heading .widget-title{float:left;width:80%;margin-top:0}.geodir_list_heading .widget-title h2{padding:0 px;background:0 0;border:none;height:auto;line-height:auto}.chosen-default:before{content:none;display:none;position:absolute;margin-left:-1000000px;float:left}#geodir-wrapper .entry-crumbs{margin-bottom:20px}.geodir-search .mom-select{float:left;width:150px;margin:5px;border:1px solid #ddd;height:40px}.iprelative .gm-style .gm-style-iw{width:100%!important}'), |
|
697 | + 'geodir_theme_compat_js' => 'jQuery(document).ready(function(e){e(".geodir_full_page").length&&""===e.trim(e(".geodir_full_page").html())&&e(".geodir_full_page").css({display:"none"})});', |
|
698 | + 'geodir_theme_compat_default_options' => '', |
|
699 | + 'geodir_theme_compat_code' => 'Multi_News' |
|
700 | + ); |
|
701 | + |
|
702 | + update_option('gd_theme_compats', $theme_compat); |
|
703 | + |
|
704 | + gd_set_theme_compat();// set the compat pack if avail |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | |
@@ -713,61 +713,61 @@ discard block |
||
713 | 713 | * @global object $wpdb WordPress Database object. |
714 | 714 | */ |
715 | 715 | function gd_convert_virtual_pages(){ |
716 | - global $wpdb; |
|
717 | - |
|
718 | - // Update the add listing page settings |
|
719 | - $add_listing_page = $wpdb->get_var( |
|
720 | - $wpdb->prepare( |
|
721 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
722 | - array('add-listing') |
|
723 | - ) |
|
724 | - ); |
|
725 | - |
|
726 | - if($add_listing_page){ |
|
727 | - wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') ); |
|
728 | - update_option( 'geodir_add_listing_page', $add_listing_page); |
|
729 | - } |
|
730 | - |
|
731 | - // Update the listing preview page settings |
|
732 | - $listing_preview_page = $wpdb->get_var( |
|
733 | - $wpdb->prepare( |
|
734 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
735 | - array('listing-preview') |
|
736 | - ) |
|
737 | - ); |
|
738 | - |
|
739 | - if($listing_preview_page){ |
|
740 | - wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') ); |
|
741 | - update_option( 'geodir_preview_page', $listing_preview_page); |
|
742 | - } |
|
743 | - |
|
744 | - // Update the listing success page settings |
|
745 | - $listing_success_page = $wpdb->get_var( |
|
746 | - $wpdb->prepare( |
|
747 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
748 | - array('listing-success') |
|
749 | - ) |
|
750 | - ); |
|
751 | - |
|
752 | - if($listing_success_page){ |
|
753 | - wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') ); |
|
754 | - update_option( 'geodir_success_page', $listing_success_page); |
|
755 | - } |
|
756 | - |
|
757 | - // Update the listing success page settings |
|
758 | - $location_page = $wpdb->get_var( |
|
759 | - $wpdb->prepare( |
|
760 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
761 | - array('location') |
|
762 | - ) |
|
763 | - ); |
|
764 | - |
|
765 | - if($location_page){ |
|
766 | - $location_slug = get_option('geodir_location_prefix'); |
|
767 | - if(!$location_slug ){$location_slug = 'location';} |
|
768 | - wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) ); |
|
769 | - update_option( 'geodir_location_page', $location_page); |
|
770 | - } |
|
716 | + global $wpdb; |
|
717 | + |
|
718 | + // Update the add listing page settings |
|
719 | + $add_listing_page = $wpdb->get_var( |
|
720 | + $wpdb->prepare( |
|
721 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
722 | + array('add-listing') |
|
723 | + ) |
|
724 | + ); |
|
725 | + |
|
726 | + if($add_listing_page){ |
|
727 | + wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') ); |
|
728 | + update_option( 'geodir_add_listing_page', $add_listing_page); |
|
729 | + } |
|
730 | + |
|
731 | + // Update the listing preview page settings |
|
732 | + $listing_preview_page = $wpdb->get_var( |
|
733 | + $wpdb->prepare( |
|
734 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
735 | + array('listing-preview') |
|
736 | + ) |
|
737 | + ); |
|
738 | + |
|
739 | + if($listing_preview_page){ |
|
740 | + wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') ); |
|
741 | + update_option( 'geodir_preview_page', $listing_preview_page); |
|
742 | + } |
|
743 | + |
|
744 | + // Update the listing success page settings |
|
745 | + $listing_success_page = $wpdb->get_var( |
|
746 | + $wpdb->prepare( |
|
747 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
748 | + array('listing-success') |
|
749 | + ) |
|
750 | + ); |
|
751 | + |
|
752 | + if($listing_success_page){ |
|
753 | + wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') ); |
|
754 | + update_option( 'geodir_success_page', $listing_success_page); |
|
755 | + } |
|
756 | + |
|
757 | + // Update the listing success page settings |
|
758 | + $location_page = $wpdb->get_var( |
|
759 | + $wpdb->prepare( |
|
760 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
761 | + array('location') |
|
762 | + ) |
|
763 | + ); |
|
764 | + |
|
765 | + if($location_page){ |
|
766 | + $location_slug = get_option('geodir_location_prefix'); |
|
767 | + if(!$location_slug ){$location_slug = 'location';} |
|
768 | + wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) ); |
|
769 | + update_option( 'geodir_location_page', $location_page); |
|
770 | + } |
|
771 | 771 | |
772 | 772 | } |
773 | 773 | |
@@ -781,31 +781,31 @@ discard block |
||
781 | 781 | function gd_fix_cpt_rewrite_slug() |
782 | 782 | { |
783 | 783 | |
784 | - $alt_post_types = array(); |
|
785 | - $post_types = get_option('geodir_post_types'); |
|
784 | + $alt_post_types = array(); |
|
785 | + $post_types = get_option('geodir_post_types'); |
|
786 | 786 | |
787 | 787 | |
788 | - if (is_array($post_types)){ |
|
788 | + if (is_array($post_types)){ |
|
789 | 789 | |
790 | - foreach ($post_types as $post_type => $args) { |
|
790 | + foreach ($post_types as $post_type => $args) { |
|
791 | 791 | |
792 | 792 | |
793 | - if(isset($args['rewrite']['slug'])){ |
|
794 | - $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']); |
|
795 | - } |
|
793 | + if(isset($args['rewrite']['slug'])){ |
|
794 | + $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']); |
|
795 | + } |
|
796 | 796 | |
797 | - $alt_post_types[$post_type] = $args; |
|
797 | + $alt_post_types[$post_type] = $args; |
|
798 | 798 | |
799 | - } |
|
800 | - } |
|
799 | + } |
|
800 | + } |
|
801 | 801 | |
802 | - if(!empty($alt_post_types)) { |
|
803 | - update_option('geodir_post_types',$alt_post_types); |
|
804 | - } |
|
802 | + if(!empty($alt_post_types)) { |
|
803 | + update_option('geodir_post_types',$alt_post_types); |
|
804 | + } |
|
805 | 805 | |
806 | 806 | |
807 | - // flush the rewrite rules |
|
808 | - flush_rewrite_rules(); |
|
807 | + // flush the rewrite rules |
|
808 | + flush_rewrite_rules(); |
|
809 | 809 | } |
810 | 810 | |
811 | 811 | |
@@ -818,18 +818,18 @@ discard block |
||
818 | 818 | */ |
819 | 819 | function gd_fix_address_detail_table_limit() |
820 | 820 | { |
821 | - global $wpdb; |
|
822 | - |
|
823 | - $all_postypes = geodir_get_posttypes(); |
|
824 | - |
|
825 | - if (!empty($all_postypes)) { |
|
826 | - foreach ($all_postypes as $key) { |
|
827 | - // update each GD CTP |
|
828 | - try { |
|
829 | - $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL"); |
|
830 | - } catch(Exception $e) { |
|
831 | - error_log( 'Error: ' . $e->getMessage() ); |
|
832 | - } |
|
833 | - } |
|
834 | - } |
|
821 | + global $wpdb; |
|
822 | + |
|
823 | + $all_postypes = geodir_get_posttypes(); |
|
824 | + |
|
825 | + if (!empty($all_postypes)) { |
|
826 | + foreach ($all_postypes as $key) { |
|
827 | + // update each GD CTP |
|
828 | + try { |
|
829 | + $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL"); |
|
830 | + } catch(Exception $e) { |
|
831 | + error_log( 'Error: ' . $e->getMessage() ); |
|
832 | + } |
|
833 | + } |
|
834 | + } |
|
835 | 835 | } |
@@ -21,84 +21,84 @@ discard block |
||
21 | 21 | */ |
22 | 22 | function geodir_cf_checkbox($html,$location,$cf,$p=''){ |
23 | 23 | |
24 | - // check we have the post value |
|
25 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
26 | - else{ global $post;} |
|
27 | - |
|
28 | - if(!is_array($cf) && $cf!=''){ |
|
29 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
30 | - if(!$cf){return NULL;} |
|
31 | - } |
|
32 | - |
|
33 | - $html_var = $cf['htmlvar_name']; |
|
34 | - |
|
35 | - // Check if there is a location specific filter. |
|
36 | - if(has_filter("geodir_custom_field_output_checkbox_loc_{$location}")){ |
|
37 | - /** |
|
38 | - * Filter the checkbox html by location. |
|
39 | - * |
|
40 | - * @param string $html The html to filter. |
|
41 | - * @param array $cf The custom field array. |
|
42 | - * @since 1.6.6 |
|
43 | - */ |
|
44 | - $html = apply_filters("geodir_custom_field_output_checkbox_loc_{$location}",$html,$cf); |
|
45 | - } |
|
46 | - |
|
47 | - // Check if there is a custom field specific filter. |
|
48 | - if(has_filter("geodir_custom_field_output_checkbox_var_{$html_var}")){ |
|
49 | - /** |
|
50 | - * Filter the checkbox html by individual custom field. |
|
51 | - * |
|
52 | - * @param string $html The html to filter. |
|
53 | - * @param string $location The location to output the html. |
|
54 | - * @param array $cf The custom field array. |
|
55 | - * @since 1.6.6 |
|
56 | - */ |
|
57 | - $html = apply_filters("geodir_custom_field_output_checkbox_var_{$html_var}",$html,$location,$cf); |
|
58 | - } |
|
59 | - |
|
60 | - // Check if there is a custom field key specific filter. |
|
61 | - if(has_filter("geodir_custom_field_output_checkbox_key_{$cf['field_type_key']}")){ |
|
62 | - /** |
|
63 | - * Filter the checkbox html by field type key. |
|
64 | - * |
|
65 | - * @param string $html The html to filter. |
|
66 | - * @param string $location The location to output the html. |
|
67 | - * @param array $cf The custom field array. |
|
68 | - * @since 1.6.6 |
|
69 | - */ |
|
70 | - $html = apply_filters("geodir_custom_field_output_checkbox_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
71 | - } |
|
72 | - |
|
73 | - // If not html then we run the standard output. |
|
74 | - if(empty($html)){ |
|
75 | - |
|
76 | - if ( (int) $post->{$html_var} == 1 ): |
|
77 | - |
|
78 | - if ( $post->{$html_var} == '1' ): |
|
79 | - $html_val = __( 'Yes', 'geodirectory' ); |
|
80 | - else: |
|
81 | - $html_val = __( 'No', 'geodirectory' ); |
|
82 | - endif; |
|
83 | - |
|
84 | - $field_icon = geodir_field_icon_proccess($cf); |
|
85 | - if (strpos($field_icon, 'http') !== false) { |
|
86 | - $field_icon_af = ''; |
|
87 | - } elseif ($field_icon == '') { |
|
88 | - $field_icon_af = ''; |
|
89 | - } else { |
|
90 | - $field_icon_af = $field_icon; |
|
91 | - $field_icon = ''; |
|
92 | - } |
|
93 | - |
|
94 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-checkbox" style="' . $field_icon . '">' . $field_icon_af; |
|
95 | - $html .= ( trim( $cf['site_title'] ) ) ? __( $cf['site_title'], 'geodirectory' ) . ': ' : ''; |
|
96 | - $html .= '</span>' . $html_val . '</div>'; |
|
97 | - endif; |
|
98 | - |
|
99 | - } |
|
100 | - |
|
101 | - return $html; |
|
24 | + // check we have the post value |
|
25 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
26 | + else{ global $post;} |
|
27 | + |
|
28 | + if(!is_array($cf) && $cf!=''){ |
|
29 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
30 | + if(!$cf){return NULL;} |
|
31 | + } |
|
32 | + |
|
33 | + $html_var = $cf['htmlvar_name']; |
|
34 | + |
|
35 | + // Check if there is a location specific filter. |
|
36 | + if(has_filter("geodir_custom_field_output_checkbox_loc_{$location}")){ |
|
37 | + /** |
|
38 | + * Filter the checkbox html by location. |
|
39 | + * |
|
40 | + * @param string $html The html to filter. |
|
41 | + * @param array $cf The custom field array. |
|
42 | + * @since 1.6.6 |
|
43 | + */ |
|
44 | + $html = apply_filters("geodir_custom_field_output_checkbox_loc_{$location}",$html,$cf); |
|
45 | + } |
|
46 | + |
|
47 | + // Check if there is a custom field specific filter. |
|
48 | + if(has_filter("geodir_custom_field_output_checkbox_var_{$html_var}")){ |
|
49 | + /** |
|
50 | + * Filter the checkbox html by individual custom field. |
|
51 | + * |
|
52 | + * @param string $html The html to filter. |
|
53 | + * @param string $location The location to output the html. |
|
54 | + * @param array $cf The custom field array. |
|
55 | + * @since 1.6.6 |
|
56 | + */ |
|
57 | + $html = apply_filters("geodir_custom_field_output_checkbox_var_{$html_var}",$html,$location,$cf); |
|
58 | + } |
|
59 | + |
|
60 | + // Check if there is a custom field key specific filter. |
|
61 | + if(has_filter("geodir_custom_field_output_checkbox_key_{$cf['field_type_key']}")){ |
|
62 | + /** |
|
63 | + * Filter the checkbox html by field type key. |
|
64 | + * |
|
65 | + * @param string $html The html to filter. |
|
66 | + * @param string $location The location to output the html. |
|
67 | + * @param array $cf The custom field array. |
|
68 | + * @since 1.6.6 |
|
69 | + */ |
|
70 | + $html = apply_filters("geodir_custom_field_output_checkbox_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
71 | + } |
|
72 | + |
|
73 | + // If not html then we run the standard output. |
|
74 | + if(empty($html)){ |
|
75 | + |
|
76 | + if ( (int) $post->{$html_var} == 1 ): |
|
77 | + |
|
78 | + if ( $post->{$html_var} == '1' ): |
|
79 | + $html_val = __( 'Yes', 'geodirectory' ); |
|
80 | + else: |
|
81 | + $html_val = __( 'No', 'geodirectory' ); |
|
82 | + endif; |
|
83 | + |
|
84 | + $field_icon = geodir_field_icon_proccess($cf); |
|
85 | + if (strpos($field_icon, 'http') !== false) { |
|
86 | + $field_icon_af = ''; |
|
87 | + } elseif ($field_icon == '') { |
|
88 | + $field_icon_af = ''; |
|
89 | + } else { |
|
90 | + $field_icon_af = $field_icon; |
|
91 | + $field_icon = ''; |
|
92 | + } |
|
93 | + |
|
94 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-checkbox" style="' . $field_icon . '">' . $field_icon_af; |
|
95 | + $html .= ( trim( $cf['site_title'] ) ) ? __( $cf['site_title'], 'geodirectory' ) . ': ' : ''; |
|
96 | + $html .= '</span>' . $html_val . '</div>'; |
|
97 | + endif; |
|
98 | + |
|
99 | + } |
|
100 | + |
|
101 | + return $html; |
|
102 | 102 | } |
103 | 103 | add_filter('geodir_custom_field_output_checkbox','geodir_cf_checkbox',10,3); |
104 | 104 | |
@@ -115,71 +115,71 @@ discard block |
||
115 | 115 | */ |
116 | 116 | function geodir_cf_fieldset($html,$location,$cf,$p=''){ |
117 | 117 | |
118 | - // check we have the post value |
|
119 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
120 | - else{ global $post;} |
|
121 | - |
|
122 | - if(!is_array($cf) && $cf!=''){ |
|
123 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
124 | - if(!$cf){return NULL;} |
|
125 | - } |
|
126 | - |
|
127 | - $html_var = $cf['htmlvar_name']; |
|
128 | - |
|
129 | - // Check if there is a location specific filter. |
|
130 | - if(has_filter("geodir_custom_field_output_fieldset_loc_{$location}")){ |
|
131 | - /** |
|
132 | - * Filter the fieldset html by location. |
|
133 | - * |
|
134 | - * @param string $html The html to filter. |
|
135 | - * @param array $cf The custom field array. |
|
136 | - * @since 1.6.6 |
|
137 | - */ |
|
138 | - $html = apply_filters("geodir_custom_field_output_fieldset_loc_{$location}",$html,$cf); |
|
139 | - } |
|
140 | - |
|
141 | - // Check if there is a custom field specific filter. |
|
142 | - if(has_filter("geodir_custom_field_output_fieldset_var_{$html_var}")){ |
|
143 | - /** |
|
144 | - * Filter the fieldset html by individual custom field. |
|
145 | - * |
|
146 | - * @param string $html The html to filter. |
|
147 | - * @param string $location The location to output the html. |
|
148 | - * @param array $cf The custom field array. |
|
149 | - * @since 1.6.6 |
|
150 | - */ |
|
151 | - $html = apply_filters("geodir_custom_field_output_fieldset_var_{$html_var}",$html,$location,$cf); |
|
152 | - } |
|
153 | - |
|
154 | - // Check if there is a custom field key specific filter. |
|
155 | - if(has_filter("geodir_custom_field_output_fieldset_key_{$cf['field_type_key']}")){ |
|
156 | - /** |
|
157 | - * Filter the fieldset html by field type key. |
|
158 | - * |
|
159 | - * @param string $html The html to filter. |
|
160 | - * @param string $location The location to output the html. |
|
161 | - * @param array $cf The custom field array. |
|
162 | - * @since 1.6.6 |
|
163 | - */ |
|
164 | - $html = apply_filters("geodir_custom_field_output_fieldset_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
165 | - } |
|
166 | - |
|
167 | - // If not html then we run the standard output. |
|
168 | - if(empty($html)){ |
|
169 | - |
|
170 | - global $field_set_start; |
|
171 | - $fieldset_class = 'fieldset-'.sanitize_title_with_dashes($cf['site_title']); |
|
172 | - |
|
173 | - if ($field_set_start == 1) { |
|
174 | - $html = ''; |
|
175 | - } else { |
|
176 | - $html = '<h2 class="'.$fieldset_class.'">'. __($cf['site_title'], 'geodirectory') . '</h2>'; |
|
177 | - //$field_set_start = 1; |
|
178 | - } |
|
179 | - |
|
180 | - } |
|
181 | - |
|
182 | - return $html; |
|
118 | + // check we have the post value |
|
119 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
120 | + else{ global $post;} |
|
121 | + |
|
122 | + if(!is_array($cf) && $cf!=''){ |
|
123 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
124 | + if(!$cf){return NULL;} |
|
125 | + } |
|
126 | + |
|
127 | + $html_var = $cf['htmlvar_name']; |
|
128 | + |
|
129 | + // Check if there is a location specific filter. |
|
130 | + if(has_filter("geodir_custom_field_output_fieldset_loc_{$location}")){ |
|
131 | + /** |
|
132 | + * Filter the fieldset html by location. |
|
133 | + * |
|
134 | + * @param string $html The html to filter. |
|
135 | + * @param array $cf The custom field array. |
|
136 | + * @since 1.6.6 |
|
137 | + */ |
|
138 | + $html = apply_filters("geodir_custom_field_output_fieldset_loc_{$location}",$html,$cf); |
|
139 | + } |
|
140 | + |
|
141 | + // Check if there is a custom field specific filter. |
|
142 | + if(has_filter("geodir_custom_field_output_fieldset_var_{$html_var}")){ |
|
143 | + /** |
|
144 | + * Filter the fieldset html by individual custom field. |
|
145 | + * |
|
146 | + * @param string $html The html to filter. |
|
147 | + * @param string $location The location to output the html. |
|
148 | + * @param array $cf The custom field array. |
|
149 | + * @since 1.6.6 |
|
150 | + */ |
|
151 | + $html = apply_filters("geodir_custom_field_output_fieldset_var_{$html_var}",$html,$location,$cf); |
|
152 | + } |
|
153 | + |
|
154 | + // Check if there is a custom field key specific filter. |
|
155 | + if(has_filter("geodir_custom_field_output_fieldset_key_{$cf['field_type_key']}")){ |
|
156 | + /** |
|
157 | + * Filter the fieldset html by field type key. |
|
158 | + * |
|
159 | + * @param string $html The html to filter. |
|
160 | + * @param string $location The location to output the html. |
|
161 | + * @param array $cf The custom field array. |
|
162 | + * @since 1.6.6 |
|
163 | + */ |
|
164 | + $html = apply_filters("geodir_custom_field_output_fieldset_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
165 | + } |
|
166 | + |
|
167 | + // If not html then we run the standard output. |
|
168 | + if(empty($html)){ |
|
169 | + |
|
170 | + global $field_set_start; |
|
171 | + $fieldset_class = 'fieldset-'.sanitize_title_with_dashes($cf['site_title']); |
|
172 | + |
|
173 | + if ($field_set_start == 1) { |
|
174 | + $html = ''; |
|
175 | + } else { |
|
176 | + $html = '<h2 class="'.$fieldset_class.'">'. __($cf['site_title'], 'geodirectory') . '</h2>'; |
|
177 | + //$field_set_start = 1; |
|
178 | + } |
|
179 | + |
|
180 | + } |
|
181 | + |
|
182 | + return $html; |
|
183 | 183 | } |
184 | 184 | add_filter('geodir_custom_field_output_fieldset','geodir_cf_fieldset',10,3); |
185 | 185 | |
@@ -196,106 +196,106 @@ discard block |
||
196 | 196 | */ |
197 | 197 | function geodir_cf_url($html,$location,$cf,$p=''){ |
198 | 198 | |
199 | - // check we have the post value |
|
200 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
201 | - else{ global $post;} |
|
202 | - |
|
203 | - if(!is_array($cf) && $cf!=''){ |
|
204 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
205 | - if(!$cf){return NULL;} |
|
206 | - } |
|
207 | - |
|
208 | - $html_var = $cf['htmlvar_name']; |
|
209 | - |
|
210 | - // Check if there is a location specific filter. |
|
211 | - if(has_filter("geodir_custom_field_output_url_loc_{$location}")){ |
|
212 | - /** |
|
213 | - * Filter the url html by location. |
|
214 | - * |
|
215 | - * @param string $html The html to filter. |
|
216 | - * @param array $cf The custom field array. |
|
217 | - * @since 1.6.6 |
|
218 | - */ |
|
219 | - $html = apply_filters("geodir_custom_field_output_url_loc_{$location}",$html,$cf); |
|
220 | - } |
|
221 | - |
|
222 | - // Check if there is a custom field specific filter. |
|
223 | - if(has_filter("geodir_custom_field_output_url_var_{$html_var}")){ |
|
224 | - /** |
|
225 | - * Filter the url html by individual custom field. |
|
226 | - * |
|
227 | - * @param string $html The html to filter. |
|
228 | - * @param string $location The location to output the html. |
|
229 | - * @param array $cf The custom field array. |
|
230 | - * @since 1.6.6 |
|
231 | - */ |
|
232 | - $html = apply_filters("geodir_custom_field_output_url_var_{$html_var}",$html,$location,$cf); |
|
233 | - } |
|
234 | - |
|
235 | - // Check if there is a custom field key specific filter. |
|
236 | - if(has_filter("geodir_custom_field_output_url_key_{$cf['field_type_key']}")){ |
|
237 | - /** |
|
238 | - * Filter the url html by field type key. |
|
239 | - * |
|
240 | - * @param string $html The html to filter. |
|
241 | - * @param string $location The location to output the html. |
|
242 | - * @param array $cf The custom field array. |
|
243 | - * @since 1.6.6 |
|
244 | - */ |
|
245 | - $html = apply_filters("geodir_custom_field_output_url_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
246 | - } |
|
247 | - |
|
248 | - // If not html then we run the standard output. |
|
249 | - if(empty($html)){ |
|
250 | - |
|
251 | - if ($post->{$cf['htmlvar_name']}): |
|
252 | - |
|
253 | - $field_icon = geodir_field_icon_proccess($cf); |
|
254 | - if (strpos($field_icon, 'http') !== false) { |
|
255 | - $field_icon_af = ''; |
|
256 | - } elseif ($field_icon == '') { |
|
257 | - |
|
258 | - if ($cf['name'] == 'geodir_facebook') { |
|
259 | - $field_icon_af = '<i class="fa fa-facebook-square"></i>'; |
|
260 | - } elseif ($cf['name'] == 'geodir_twitter') { |
|
261 | - $field_icon_af = '<i class="fa fa-twitter-square"></i>'; |
|
262 | - } else { |
|
263 | - $field_icon_af = '<i class="fa fa-link"></i>'; |
|
264 | - } |
|
265 | - |
|
266 | - } else { |
|
267 | - $field_icon_af = $field_icon; |
|
268 | - $field_icon = ''; |
|
269 | - } |
|
270 | - |
|
271 | - $a_url = geodir_parse_custom_field_url($post->{$cf['htmlvar_name']}); |
|
272 | - |
|
273 | - |
|
274 | - $website = !empty($a_url['url']) ? $a_url['url'] : ''; |
|
275 | - $title = !empty($a_url['label']) ? $a_url['label'] : $cf['site_title']; |
|
276 | - if(!empty($cf['default_value'])){$title = $cf['default_value'];} |
|
277 | - $title = $title != '' ? __(stripslashes($title), 'geodirectory') : ''; |
|
278 | - |
|
279 | - |
|
280 | - |
|
281 | - // all search engines that use the nofollow value exclude links that use it from their ranking calculation |
|
282 | - $rel = strpos($website, get_site_url()) !== false ? '' : 'rel="nofollow"'; |
|
283 | - /** |
|
284 | - * Filter custom field website name. |
|
285 | - * |
|
286 | - * @since 1.0.0 |
|
287 | - * |
|
288 | - * @param string $title Website Title. |
|
289 | - * @param string $website Website URL. |
|
290 | - * @param int $post->ID Post ID. |
|
291 | - */ |
|
292 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . '<a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . apply_filters('geodir_custom_field_website_name', $title, $website, $post->ID) . '</strong></a></span></div>'; |
|
293 | - |
|
294 | - endif; |
|
295 | - |
|
296 | - } |
|
297 | - |
|
298 | - return $html; |
|
199 | + // check we have the post value |
|
200 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
201 | + else{ global $post;} |
|
202 | + |
|
203 | + if(!is_array($cf) && $cf!=''){ |
|
204 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
205 | + if(!$cf){return NULL;} |
|
206 | + } |
|
207 | + |
|
208 | + $html_var = $cf['htmlvar_name']; |
|
209 | + |
|
210 | + // Check if there is a location specific filter. |
|
211 | + if(has_filter("geodir_custom_field_output_url_loc_{$location}")){ |
|
212 | + /** |
|
213 | + * Filter the url html by location. |
|
214 | + * |
|
215 | + * @param string $html The html to filter. |
|
216 | + * @param array $cf The custom field array. |
|
217 | + * @since 1.6.6 |
|
218 | + */ |
|
219 | + $html = apply_filters("geodir_custom_field_output_url_loc_{$location}",$html,$cf); |
|
220 | + } |
|
221 | + |
|
222 | + // Check if there is a custom field specific filter. |
|
223 | + if(has_filter("geodir_custom_field_output_url_var_{$html_var}")){ |
|
224 | + /** |
|
225 | + * Filter the url html by individual custom field. |
|
226 | + * |
|
227 | + * @param string $html The html to filter. |
|
228 | + * @param string $location The location to output the html. |
|
229 | + * @param array $cf The custom field array. |
|
230 | + * @since 1.6.6 |
|
231 | + */ |
|
232 | + $html = apply_filters("geodir_custom_field_output_url_var_{$html_var}",$html,$location,$cf); |
|
233 | + } |
|
234 | + |
|
235 | + // Check if there is a custom field key specific filter. |
|
236 | + if(has_filter("geodir_custom_field_output_url_key_{$cf['field_type_key']}")){ |
|
237 | + /** |
|
238 | + * Filter the url html by field type key. |
|
239 | + * |
|
240 | + * @param string $html The html to filter. |
|
241 | + * @param string $location The location to output the html. |
|
242 | + * @param array $cf The custom field array. |
|
243 | + * @since 1.6.6 |
|
244 | + */ |
|
245 | + $html = apply_filters("geodir_custom_field_output_url_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
246 | + } |
|
247 | + |
|
248 | + // If not html then we run the standard output. |
|
249 | + if(empty($html)){ |
|
250 | + |
|
251 | + if ($post->{$cf['htmlvar_name']}): |
|
252 | + |
|
253 | + $field_icon = geodir_field_icon_proccess($cf); |
|
254 | + if (strpos($field_icon, 'http') !== false) { |
|
255 | + $field_icon_af = ''; |
|
256 | + } elseif ($field_icon == '') { |
|
257 | + |
|
258 | + if ($cf['name'] == 'geodir_facebook') { |
|
259 | + $field_icon_af = '<i class="fa fa-facebook-square"></i>'; |
|
260 | + } elseif ($cf['name'] == 'geodir_twitter') { |
|
261 | + $field_icon_af = '<i class="fa fa-twitter-square"></i>'; |
|
262 | + } else { |
|
263 | + $field_icon_af = '<i class="fa fa-link"></i>'; |
|
264 | + } |
|
265 | + |
|
266 | + } else { |
|
267 | + $field_icon_af = $field_icon; |
|
268 | + $field_icon = ''; |
|
269 | + } |
|
270 | + |
|
271 | + $a_url = geodir_parse_custom_field_url($post->{$cf['htmlvar_name']}); |
|
272 | + |
|
273 | + |
|
274 | + $website = !empty($a_url['url']) ? $a_url['url'] : ''; |
|
275 | + $title = !empty($a_url['label']) ? $a_url['label'] : $cf['site_title']; |
|
276 | + if(!empty($cf['default_value'])){$title = $cf['default_value'];} |
|
277 | + $title = $title != '' ? __(stripslashes($title), 'geodirectory') : ''; |
|
278 | + |
|
279 | + |
|
280 | + |
|
281 | + // all search engines that use the nofollow value exclude links that use it from their ranking calculation |
|
282 | + $rel = strpos($website, get_site_url()) !== false ? '' : 'rel="nofollow"'; |
|
283 | + /** |
|
284 | + * Filter custom field website name. |
|
285 | + * |
|
286 | + * @since 1.0.0 |
|
287 | + * |
|
288 | + * @param string $title Website Title. |
|
289 | + * @param string $website Website URL. |
|
290 | + * @param int $post->ID Post ID. |
|
291 | + */ |
|
292 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . '<a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . apply_filters('geodir_custom_field_website_name', $title, $website, $post->ID) . '</strong></a></span></div>'; |
|
293 | + |
|
294 | + endif; |
|
295 | + |
|
296 | + } |
|
297 | + |
|
298 | + return $html; |
|
299 | 299 | } |
300 | 300 | add_filter('geodir_custom_field_output_url','geodir_cf_url',10,3); |
301 | 301 | |
@@ -312,80 +312,80 @@ discard block |
||
312 | 312 | */ |
313 | 313 | function geodir_cf_phone($html,$location,$cf,$p=''){ |
314 | 314 | |
315 | - // check we have the post value |
|
316 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
317 | - else{ global $post;} |
|
318 | - |
|
319 | - if(!is_array($cf) && $cf!=''){ |
|
320 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
321 | - if(!$cf){return NULL;} |
|
322 | - } |
|
323 | - |
|
324 | - $html_var = $cf['htmlvar_name']; |
|
325 | - |
|
326 | - // Check if there is a location specific filter. |
|
327 | - if(has_filter("geodir_custom_field_output_phone_loc_{$location}")){ |
|
328 | - /** |
|
329 | - * Filter the phone html by location. |
|
330 | - * |
|
331 | - * @param string $html The html to filter. |
|
332 | - * @param array $cf The custom field array. |
|
333 | - * @since 1.6.6 |
|
334 | - */ |
|
335 | - $html = apply_filters("geodir_custom_field_output_phone_loc_{$location}",$html,$cf); |
|
336 | - } |
|
337 | - |
|
338 | - // Check if there is a custom field specific filter. |
|
339 | - if(has_filter("geodir_custom_field_output_phone_var_{$html_var}")){ |
|
340 | - /** |
|
341 | - * Filter the phone html by individual custom field. |
|
342 | - * |
|
343 | - * @param string $html The html to filter. |
|
344 | - * @param string $location The location to output the html. |
|
345 | - * @param array $cf The custom field array. |
|
346 | - * @since 1.6.6 |
|
347 | - */ |
|
348 | - $html = apply_filters("geodir_custom_field_output_phone_var_{$html_var}",$html,$location,$cf); |
|
349 | - } |
|
350 | - |
|
351 | - // Check if there is a custom field key specific filter. |
|
352 | - if(has_filter("geodir_custom_field_output_phone_key_{$cf['field_type_key']}")){ |
|
353 | - /** |
|
354 | - * Filter the phone html by field type key. |
|
355 | - * |
|
356 | - * @param string $html The html to filter. |
|
357 | - * @param string $location The location to output the html. |
|
358 | - * @param array $cf The custom field array. |
|
359 | - * @since 1.6.6 |
|
360 | - */ |
|
361 | - $html = apply_filters("geodir_custom_field_output_phone_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
362 | - } |
|
363 | - |
|
364 | - // If not html then we run the standard output. |
|
365 | - if(empty($html)){ |
|
366 | - |
|
367 | - if ($post->{$cf['htmlvar_name']}): |
|
368 | - |
|
369 | - $field_icon = geodir_field_icon_proccess($cf); |
|
370 | - if (strpos($field_icon, 'http') !== false) { |
|
371 | - $field_icon_af = ''; |
|
372 | - } elseif ($field_icon == '') { |
|
373 | - $field_icon_af = '<i class="fa fa-phone"></i>'; |
|
374 | - } else { |
|
375 | - $field_icon_af = $field_icon; |
|
376 | - $field_icon = ''; |
|
377 | - } |
|
378 | - |
|
379 | - |
|
380 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-contact" style="' . $field_icon . '">' . $field_icon_af . |
|
381 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ' '; |
|
382 | - $html .= '</span><a href="tel:' . preg_replace('/[^0-9+]/', '', $post->{$cf['htmlvar_name']}) . '">' . $post->{$cf['htmlvar_name']} . '</a></div>'; |
|
383 | - |
|
384 | - endif; |
|
385 | - |
|
386 | - } |
|
387 | - |
|
388 | - return $html; |
|
315 | + // check we have the post value |
|
316 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
317 | + else{ global $post;} |
|
318 | + |
|
319 | + if(!is_array($cf) && $cf!=''){ |
|
320 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
321 | + if(!$cf){return NULL;} |
|
322 | + } |
|
323 | + |
|
324 | + $html_var = $cf['htmlvar_name']; |
|
325 | + |
|
326 | + // Check if there is a location specific filter. |
|
327 | + if(has_filter("geodir_custom_field_output_phone_loc_{$location}")){ |
|
328 | + /** |
|
329 | + * Filter the phone html by location. |
|
330 | + * |
|
331 | + * @param string $html The html to filter. |
|
332 | + * @param array $cf The custom field array. |
|
333 | + * @since 1.6.6 |
|
334 | + */ |
|
335 | + $html = apply_filters("geodir_custom_field_output_phone_loc_{$location}",$html,$cf); |
|
336 | + } |
|
337 | + |
|
338 | + // Check if there is a custom field specific filter. |
|
339 | + if(has_filter("geodir_custom_field_output_phone_var_{$html_var}")){ |
|
340 | + /** |
|
341 | + * Filter the phone html by individual custom field. |
|
342 | + * |
|
343 | + * @param string $html The html to filter. |
|
344 | + * @param string $location The location to output the html. |
|
345 | + * @param array $cf The custom field array. |
|
346 | + * @since 1.6.6 |
|
347 | + */ |
|
348 | + $html = apply_filters("geodir_custom_field_output_phone_var_{$html_var}",$html,$location,$cf); |
|
349 | + } |
|
350 | + |
|
351 | + // Check if there is a custom field key specific filter. |
|
352 | + if(has_filter("geodir_custom_field_output_phone_key_{$cf['field_type_key']}")){ |
|
353 | + /** |
|
354 | + * Filter the phone html by field type key. |
|
355 | + * |
|
356 | + * @param string $html The html to filter. |
|
357 | + * @param string $location The location to output the html. |
|
358 | + * @param array $cf The custom field array. |
|
359 | + * @since 1.6.6 |
|
360 | + */ |
|
361 | + $html = apply_filters("geodir_custom_field_output_phone_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
362 | + } |
|
363 | + |
|
364 | + // If not html then we run the standard output. |
|
365 | + if(empty($html)){ |
|
366 | + |
|
367 | + if ($post->{$cf['htmlvar_name']}): |
|
368 | + |
|
369 | + $field_icon = geodir_field_icon_proccess($cf); |
|
370 | + if (strpos($field_icon, 'http') !== false) { |
|
371 | + $field_icon_af = ''; |
|
372 | + } elseif ($field_icon == '') { |
|
373 | + $field_icon_af = '<i class="fa fa-phone"></i>'; |
|
374 | + } else { |
|
375 | + $field_icon_af = $field_icon; |
|
376 | + $field_icon = ''; |
|
377 | + } |
|
378 | + |
|
379 | + |
|
380 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-contact" style="' . $field_icon . '">' . $field_icon_af . |
|
381 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ' '; |
|
382 | + $html .= '</span><a href="tel:' . preg_replace('/[^0-9+]/', '', $post->{$cf['htmlvar_name']}) . '">' . $post->{$cf['htmlvar_name']} . '</a></div>'; |
|
383 | + |
|
384 | + endif; |
|
385 | + |
|
386 | + } |
|
387 | + |
|
388 | + return $html; |
|
389 | 389 | } |
390 | 390 | add_filter('geodir_custom_field_output_phone','geodir_cf_phone',10,3); |
391 | 391 | |
@@ -402,85 +402,85 @@ discard block |
||
402 | 402 | */ |
403 | 403 | function geodir_cf_time($html,$location,$cf,$p=''){ |
404 | 404 | |
405 | - // check we have the post value |
|
406 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
407 | - else{ global $post;} |
|
408 | - |
|
409 | - if(!is_array($cf) && $cf!=''){ |
|
410 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
411 | - if(!$cf){return NULL;} |
|
412 | - } |
|
413 | - |
|
414 | - $html_var = $cf['htmlvar_name']; |
|
415 | - |
|
416 | - // Check if there is a location specific filter. |
|
417 | - if(has_filter("geodir_custom_field_output_time_loc_{$location}")){ |
|
418 | - /** |
|
419 | - * Filter the time html by location. |
|
420 | - * |
|
421 | - * @param string $html The html to filter. |
|
422 | - * @param array $cf The custom field array. |
|
423 | - * @since 1.6.6 |
|
424 | - */ |
|
425 | - $html = apply_filters("geodir_custom_field_output_time_loc_{$location}",$html,$cf); |
|
426 | - } |
|
427 | - |
|
428 | - // Check if there is a custom field specific filter. |
|
429 | - if(has_filter("geodir_custom_field_output_time_var_{$html_var}")){ |
|
430 | - /** |
|
431 | - * Filter the time html by individual custom field. |
|
432 | - * |
|
433 | - * @param string $html The html to filter. |
|
434 | - * @param string $location The location to output the html. |
|
435 | - * @param array $cf The custom field array. |
|
436 | - * @since 1.6.6 |
|
437 | - */ |
|
438 | - $html = apply_filters("geodir_custom_field_output_time_var_{$html_var}",$html,$location,$cf); |
|
439 | - } |
|
440 | - |
|
441 | - // Check if there is a custom field key specific filter. |
|
442 | - if(has_filter("geodir_custom_field_output_time_key_{$cf['field_type_key']}")){ |
|
443 | - /** |
|
444 | - * Filter the time html by field type key. |
|
445 | - * |
|
446 | - * @param string $html The html to filter. |
|
447 | - * @param string $location The location to output the html. |
|
448 | - * @param array $cf The custom field array. |
|
449 | - * @since 1.6.6 |
|
450 | - */ |
|
451 | - $html = apply_filters("geodir_custom_field_output_time_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
452 | - } |
|
453 | - |
|
454 | - // If not html then we run the standard output. |
|
455 | - if(empty($html)){ |
|
456 | - |
|
457 | - if ($post->{$cf['htmlvar_name']}): |
|
458 | - |
|
459 | - $value = ''; |
|
460 | - if ($post->{$cf['htmlvar_name']} != '') |
|
461 | - //$value = date('h:i',strtotime($post->{$cf['htmlvar_name']})); |
|
462 | - $value = date(get_option('time_format'), strtotime($post->{$cf['htmlvar_name']})); |
|
463 | - |
|
464 | - $field_icon = geodir_field_icon_proccess($cf); |
|
465 | - if (strpos($field_icon, 'http') !== false) { |
|
466 | - $field_icon_af = ''; |
|
467 | - } elseif ($field_icon == '') { |
|
468 | - $field_icon_af = '<i class="fa fa-clock-o"></i>'; |
|
469 | - } else { |
|
470 | - $field_icon_af = $field_icon; |
|
471 | - $field_icon = ''; |
|
472 | - } |
|
473 | - |
|
474 | - |
|
475 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-time" style="' . $field_icon . '">' . $field_icon_af; |
|
476 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ' '; |
|
477 | - $html .= '</span>' . $value . '</div>'; |
|
478 | - |
|
479 | - endif; |
|
480 | - |
|
481 | - } |
|
482 | - |
|
483 | - return $html; |
|
405 | + // check we have the post value |
|
406 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
407 | + else{ global $post;} |
|
408 | + |
|
409 | + if(!is_array($cf) && $cf!=''){ |
|
410 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
411 | + if(!$cf){return NULL;} |
|
412 | + } |
|
413 | + |
|
414 | + $html_var = $cf['htmlvar_name']; |
|
415 | + |
|
416 | + // Check if there is a location specific filter. |
|
417 | + if(has_filter("geodir_custom_field_output_time_loc_{$location}")){ |
|
418 | + /** |
|
419 | + * Filter the time html by location. |
|
420 | + * |
|
421 | + * @param string $html The html to filter. |
|
422 | + * @param array $cf The custom field array. |
|
423 | + * @since 1.6.6 |
|
424 | + */ |
|
425 | + $html = apply_filters("geodir_custom_field_output_time_loc_{$location}",$html,$cf); |
|
426 | + } |
|
427 | + |
|
428 | + // Check if there is a custom field specific filter. |
|
429 | + if(has_filter("geodir_custom_field_output_time_var_{$html_var}")){ |
|
430 | + /** |
|
431 | + * Filter the time html by individual custom field. |
|
432 | + * |
|
433 | + * @param string $html The html to filter. |
|
434 | + * @param string $location The location to output the html. |
|
435 | + * @param array $cf The custom field array. |
|
436 | + * @since 1.6.6 |
|
437 | + */ |
|
438 | + $html = apply_filters("geodir_custom_field_output_time_var_{$html_var}",$html,$location,$cf); |
|
439 | + } |
|
440 | + |
|
441 | + // Check if there is a custom field key specific filter. |
|
442 | + if(has_filter("geodir_custom_field_output_time_key_{$cf['field_type_key']}")){ |
|
443 | + /** |
|
444 | + * Filter the time html by field type key. |
|
445 | + * |
|
446 | + * @param string $html The html to filter. |
|
447 | + * @param string $location The location to output the html. |
|
448 | + * @param array $cf The custom field array. |
|
449 | + * @since 1.6.6 |
|
450 | + */ |
|
451 | + $html = apply_filters("geodir_custom_field_output_time_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
452 | + } |
|
453 | + |
|
454 | + // If not html then we run the standard output. |
|
455 | + if(empty($html)){ |
|
456 | + |
|
457 | + if ($post->{$cf['htmlvar_name']}): |
|
458 | + |
|
459 | + $value = ''; |
|
460 | + if ($post->{$cf['htmlvar_name']} != '') |
|
461 | + //$value = date('h:i',strtotime($post->{$cf['htmlvar_name']})); |
|
462 | + $value = date(get_option('time_format'), strtotime($post->{$cf['htmlvar_name']})); |
|
463 | + |
|
464 | + $field_icon = geodir_field_icon_proccess($cf); |
|
465 | + if (strpos($field_icon, 'http') !== false) { |
|
466 | + $field_icon_af = ''; |
|
467 | + } elseif ($field_icon == '') { |
|
468 | + $field_icon_af = '<i class="fa fa-clock-o"></i>'; |
|
469 | + } else { |
|
470 | + $field_icon_af = $field_icon; |
|
471 | + $field_icon = ''; |
|
472 | + } |
|
473 | + |
|
474 | + |
|
475 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-time" style="' . $field_icon . '">' . $field_icon_af; |
|
476 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ' '; |
|
477 | + $html .= '</span>' . $value . '</div>'; |
|
478 | + |
|
479 | + endif; |
|
480 | + |
|
481 | + } |
|
482 | + |
|
483 | + return $html; |
|
484 | 484 | } |
485 | 485 | add_filter('geodir_custom_field_output_time','geodir_cf_time',10,3); |
486 | 486 | |
@@ -496,111 +496,111 @@ discard block |
||
496 | 496 | * @return string The html to output for the custom field. |
497 | 497 | */ |
498 | 498 | function geodir_cf_datepicker($html,$location,$cf,$p=''){ |
499 | - global $preview; |
|
500 | - // check we have the post value |
|
501 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
502 | - else{ global $post;} |
|
503 | - |
|
504 | - if(!is_array($cf) && $cf!=''){ |
|
505 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
506 | - if(!$cf){return NULL;} |
|
507 | - } |
|
508 | - |
|
509 | - $html_var = $cf['htmlvar_name']; |
|
510 | - |
|
511 | - // Check if there is a location specific filter. |
|
512 | - if(has_filter("geodir_custom_field_output_datepicker_loc_{$location}")){ |
|
513 | - /** |
|
514 | - * Filter the datepicker html by location. |
|
515 | - * |
|
516 | - * @param string $html The html to filter. |
|
517 | - * @param array $cf The custom field array. |
|
518 | - * @since 1.6.6 |
|
519 | - */ |
|
520 | - $html = apply_filters("geodir_custom_field_output_datepicker_loc_{$location}",$html,$cf); |
|
521 | - } |
|
522 | - |
|
523 | - // Check if there is a custom field specific filter. |
|
524 | - if(has_filter("geodir_custom_field_output_datepicker_var_{$html_var}")){ |
|
525 | - /** |
|
526 | - * Filter the datepicker html by individual custom field. |
|
527 | - * |
|
528 | - * @param string $html The html to filter. |
|
529 | - * @param string $location The location to output the html. |
|
530 | - * @param array $cf The custom field array. |
|
531 | - * @since 1.6.6 |
|
532 | - */ |
|
533 | - $html = apply_filters("geodir_custom_field_output_datepicker_var_{$html_var}",$html,$location,$cf); |
|
534 | - } |
|
535 | - |
|
536 | - // Check if there is a custom field key specific filter. |
|
537 | - if(has_filter("geodir_custom_field_output_datepicker_key_{$cf['field_type_key']}")){ |
|
538 | - /** |
|
539 | - * Filter the datepicker html by field type key. |
|
540 | - * |
|
541 | - * @param string $html The html to filter. |
|
542 | - * @param string $location The location to output the html. |
|
543 | - * @param array $cf The custom field array. |
|
544 | - * @since 1.6.6 |
|
545 | - */ |
|
546 | - $html = apply_filters("geodir_custom_field_output_datepicker_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
547 | - } |
|
548 | - |
|
549 | - // If not html then we run the standard output. |
|
550 | - if(empty($html)){ |
|
551 | - |
|
552 | - if ($post->{$cf['htmlvar_name']}): |
|
553 | - |
|
554 | - $date_format = geodir_default_date_format(); |
|
555 | - if ($cf['extra_fields'] != '') { |
|
556 | - $date_format = unserialize($cf['extra_fields']); |
|
557 | - $date_format = $date_format['date_format']; |
|
558 | - } |
|
559 | - // check if we need to change the format or not |
|
560 | - $date_format_len = strlen(str_replace(' ', '', $date_format)); |
|
561 | - if($date_format_len>5){// if greater then 4 then it's the old style format. |
|
562 | - |
|
563 | - $search = array('dd','d','DD','mm','m','MM','yy'); //jQuery UI datepicker format |
|
564 | - $replace = array('d','j','l','m','n','F','Y');//PHP date format |
|
565 | - |
|
566 | - $date_format = str_replace($search, $replace, $date_format); |
|
567 | - |
|
568 | - $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y' ) ? str_replace('/', '-', $post->{$cf['htmlvar_name']}) : $post->{$cf['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format |
|
569 | - }else{ |
|
570 | - $post_htmlvar_value = $post->{$cf['htmlvar_name']}; |
|
571 | - } |
|
572 | - |
|
573 | - if ($post->{$cf['htmlvar_name']} != '' && $post->{$cf['htmlvar_name']}!="0000-00-00") { |
|
574 | - $date_format_from = $preview ? $date_format : 'Y-m-d'; |
|
575 | - $value = geodir_date($post_htmlvar_value, $date_format, $date_format_from); // save as sql format Y-m-d |
|
576 | - //$post_htmlvar_value = strpos($post_htmlvar_value, '/') !== false ? str_replace('/', '-', $post_htmlvar_value) : $post_htmlvar_value; |
|
577 | - //$value = date_i18n($date_format, strtotime($post_htmlvar_value)); |
|
578 | - }else{ |
|
579 | - return ''; |
|
580 | - } |
|
581 | - |
|
582 | - $field_icon = geodir_field_icon_proccess($cf); |
|
583 | - |
|
584 | - if (strpos($field_icon, 'http') !== false) { |
|
585 | - $field_icon_af = ''; |
|
586 | - } elseif ($field_icon == '') { |
|
587 | - $field_icon_af = '<i class="fa fa-calendar"></i>'; |
|
588 | - } else { |
|
589 | - $field_icon_af = $field_icon; |
|
590 | - $field_icon = ''; |
|
591 | - } |
|
592 | - |
|
593 | - |
|
594 | - |
|
595 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-datepicker" style="' . $field_icon . '">' . $field_icon_af; |
|
596 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
597 | - $html .= '</span>' . $value . '</div>'; |
|
598 | - |
|
599 | - endif; |
|
600 | - |
|
601 | - } |
|
602 | - |
|
603 | - return $html; |
|
499 | + global $preview; |
|
500 | + // check we have the post value |
|
501 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
502 | + else{ global $post;} |
|
503 | + |
|
504 | + if(!is_array($cf) && $cf!=''){ |
|
505 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
506 | + if(!$cf){return NULL;} |
|
507 | + } |
|
508 | + |
|
509 | + $html_var = $cf['htmlvar_name']; |
|
510 | + |
|
511 | + // Check if there is a location specific filter. |
|
512 | + if(has_filter("geodir_custom_field_output_datepicker_loc_{$location}")){ |
|
513 | + /** |
|
514 | + * Filter the datepicker html by location. |
|
515 | + * |
|
516 | + * @param string $html The html to filter. |
|
517 | + * @param array $cf The custom field array. |
|
518 | + * @since 1.6.6 |
|
519 | + */ |
|
520 | + $html = apply_filters("geodir_custom_field_output_datepicker_loc_{$location}",$html,$cf); |
|
521 | + } |
|
522 | + |
|
523 | + // Check if there is a custom field specific filter. |
|
524 | + if(has_filter("geodir_custom_field_output_datepicker_var_{$html_var}")){ |
|
525 | + /** |
|
526 | + * Filter the datepicker html by individual custom field. |
|
527 | + * |
|
528 | + * @param string $html The html to filter. |
|
529 | + * @param string $location The location to output the html. |
|
530 | + * @param array $cf The custom field array. |
|
531 | + * @since 1.6.6 |
|
532 | + */ |
|
533 | + $html = apply_filters("geodir_custom_field_output_datepicker_var_{$html_var}",$html,$location,$cf); |
|
534 | + } |
|
535 | + |
|
536 | + // Check if there is a custom field key specific filter. |
|
537 | + if(has_filter("geodir_custom_field_output_datepicker_key_{$cf['field_type_key']}")){ |
|
538 | + /** |
|
539 | + * Filter the datepicker html by field type key. |
|
540 | + * |
|
541 | + * @param string $html The html to filter. |
|
542 | + * @param string $location The location to output the html. |
|
543 | + * @param array $cf The custom field array. |
|
544 | + * @since 1.6.6 |
|
545 | + */ |
|
546 | + $html = apply_filters("geodir_custom_field_output_datepicker_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
547 | + } |
|
548 | + |
|
549 | + // If not html then we run the standard output. |
|
550 | + if(empty($html)){ |
|
551 | + |
|
552 | + if ($post->{$cf['htmlvar_name']}): |
|
553 | + |
|
554 | + $date_format = geodir_default_date_format(); |
|
555 | + if ($cf['extra_fields'] != '') { |
|
556 | + $date_format = unserialize($cf['extra_fields']); |
|
557 | + $date_format = $date_format['date_format']; |
|
558 | + } |
|
559 | + // check if we need to change the format or not |
|
560 | + $date_format_len = strlen(str_replace(' ', '', $date_format)); |
|
561 | + if($date_format_len>5){// if greater then 4 then it's the old style format. |
|
562 | + |
|
563 | + $search = array('dd','d','DD','mm','m','MM','yy'); //jQuery UI datepicker format |
|
564 | + $replace = array('d','j','l','m','n','F','Y');//PHP date format |
|
565 | + |
|
566 | + $date_format = str_replace($search, $replace, $date_format); |
|
567 | + |
|
568 | + $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y' ) ? str_replace('/', '-', $post->{$cf['htmlvar_name']}) : $post->{$cf['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format |
|
569 | + }else{ |
|
570 | + $post_htmlvar_value = $post->{$cf['htmlvar_name']}; |
|
571 | + } |
|
572 | + |
|
573 | + if ($post->{$cf['htmlvar_name']} != '' && $post->{$cf['htmlvar_name']}!="0000-00-00") { |
|
574 | + $date_format_from = $preview ? $date_format : 'Y-m-d'; |
|
575 | + $value = geodir_date($post_htmlvar_value, $date_format, $date_format_from); // save as sql format Y-m-d |
|
576 | + //$post_htmlvar_value = strpos($post_htmlvar_value, '/') !== false ? str_replace('/', '-', $post_htmlvar_value) : $post_htmlvar_value; |
|
577 | + //$value = date_i18n($date_format, strtotime($post_htmlvar_value)); |
|
578 | + }else{ |
|
579 | + return ''; |
|
580 | + } |
|
581 | + |
|
582 | + $field_icon = geodir_field_icon_proccess($cf); |
|
583 | + |
|
584 | + if (strpos($field_icon, 'http') !== false) { |
|
585 | + $field_icon_af = ''; |
|
586 | + } elseif ($field_icon == '') { |
|
587 | + $field_icon_af = '<i class="fa fa-calendar"></i>'; |
|
588 | + } else { |
|
589 | + $field_icon_af = $field_icon; |
|
590 | + $field_icon = ''; |
|
591 | + } |
|
592 | + |
|
593 | + |
|
594 | + |
|
595 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-datepicker" style="' . $field_icon . '">' . $field_icon_af; |
|
596 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
597 | + $html .= '</span>' . $value . '</div>'; |
|
598 | + |
|
599 | + endif; |
|
600 | + |
|
601 | + } |
|
602 | + |
|
603 | + return $html; |
|
604 | 604 | } |
605 | 605 | add_filter('geodir_custom_field_output_datepicker','geodir_cf_datepicker',10,3); |
606 | 606 | |
@@ -617,84 +617,84 @@ discard block |
||
617 | 617 | */ |
618 | 618 | function geodir_cf_text($html,$location,$cf,$p=''){ |
619 | 619 | |
620 | - // check we have the post value |
|
621 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
622 | - else{ global $post;} |
|
623 | - |
|
624 | - if(!is_array($cf) && $cf!=''){ |
|
625 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
626 | - if(!$cf){return NULL;} |
|
627 | - } |
|
628 | - |
|
629 | - $html_var = $cf['htmlvar_name']; |
|
630 | - |
|
631 | - // Check if there is a location specific filter. |
|
632 | - if(has_filter("geodir_custom_field_output_text_loc_{$location}")){ |
|
633 | - /** |
|
634 | - * Filter the text html by location. |
|
635 | - * |
|
636 | - * @param string $html The html to filter. |
|
637 | - * @param array $cf The custom field array. |
|
638 | - * @since 1.6.6 |
|
639 | - */ |
|
640 | - $html = apply_filters("geodir_custom_field_output_text_loc_{$location}",$html,$cf); |
|
641 | - } |
|
642 | - |
|
643 | - // Check if there is a custom field specific filter. |
|
644 | - if(has_filter("geodir_custom_field_output_text_var_{$html_var}")){ |
|
645 | - /** |
|
646 | - * Filter the text html by individual custom field. |
|
647 | - * |
|
648 | - * @param string $html The html to filter. |
|
649 | - * @param string $location The location to output the html. |
|
650 | - * @param array $cf The custom field array. |
|
651 | - * @since 1.6.6 |
|
652 | - */ |
|
653 | - $html = apply_filters("geodir_custom_field_output_text_var_{$html_var}",$html,$location,$cf); |
|
654 | - } |
|
655 | - |
|
656 | - // Check if there is a custom field key specific filter. |
|
657 | - if(has_filter("geodir_custom_field_output_text_key_{$cf['field_type_key']}")){ |
|
658 | - /** |
|
659 | - * Filter the text html by field type key. |
|
660 | - * |
|
661 | - * @param string $html The html to filter. |
|
662 | - * @param string $location The location to output the html. |
|
663 | - * @param array $cf The custom field array. |
|
664 | - * @since 1.6.6 |
|
665 | - */ |
|
666 | - $html = apply_filters("geodir_custom_field_output_text_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
667 | - } |
|
620 | + // check we have the post value |
|
621 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
622 | + else{ global $post;} |
|
623 | + |
|
624 | + if(!is_array($cf) && $cf!=''){ |
|
625 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
626 | + if(!$cf){return NULL;} |
|
627 | + } |
|
628 | + |
|
629 | + $html_var = $cf['htmlvar_name']; |
|
630 | + |
|
631 | + // Check if there is a location specific filter. |
|
632 | + if(has_filter("geodir_custom_field_output_text_loc_{$location}")){ |
|
633 | + /** |
|
634 | + * Filter the text html by location. |
|
635 | + * |
|
636 | + * @param string $html The html to filter. |
|
637 | + * @param array $cf The custom field array. |
|
638 | + * @since 1.6.6 |
|
639 | + */ |
|
640 | + $html = apply_filters("geodir_custom_field_output_text_loc_{$location}",$html,$cf); |
|
641 | + } |
|
642 | + |
|
643 | + // Check if there is a custom field specific filter. |
|
644 | + if(has_filter("geodir_custom_field_output_text_var_{$html_var}")){ |
|
645 | + /** |
|
646 | + * Filter the text html by individual custom field. |
|
647 | + * |
|
648 | + * @param string $html The html to filter. |
|
649 | + * @param string $location The location to output the html. |
|
650 | + * @param array $cf The custom field array. |
|
651 | + * @since 1.6.6 |
|
652 | + */ |
|
653 | + $html = apply_filters("geodir_custom_field_output_text_var_{$html_var}",$html,$location,$cf); |
|
654 | + } |
|
655 | + |
|
656 | + // Check if there is a custom field key specific filter. |
|
657 | + if(has_filter("geodir_custom_field_output_text_key_{$cf['field_type_key']}")){ |
|
658 | + /** |
|
659 | + * Filter the text html by field type key. |
|
660 | + * |
|
661 | + * @param string $html The html to filter. |
|
662 | + * @param string $location The location to output the html. |
|
663 | + * @param array $cf The custom field array. |
|
664 | + * @since 1.6.6 |
|
665 | + */ |
|
666 | + $html = apply_filters("geodir_custom_field_output_text_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
667 | + } |
|
668 | 668 | |
669 | 669 | |
670 | 670 | |
671 | - // If not html then we run the standard output. |
|
672 | - if(empty($html)){ |
|
671 | + // If not html then we run the standard output. |
|
672 | + if(empty($html)){ |
|
673 | 673 | |
674 | - if (isset($post->{$cf['htmlvar_name']}) && $post->{$cf['htmlvar_name']} != '' ): |
|
674 | + if (isset($post->{$cf['htmlvar_name']}) && $post->{$cf['htmlvar_name']} != '' ): |
|
675 | 675 | |
676 | - $class = ($cf['htmlvar_name'] == 'geodir_timing') ? "geodir-i-time" : "geodir-i-text"; |
|
676 | + $class = ($cf['htmlvar_name'] == 'geodir_timing') ? "geodir-i-time" : "geodir-i-text"; |
|
677 | 677 | |
678 | - $field_icon = geodir_field_icon_proccess($cf); |
|
679 | - if (strpos($field_icon, 'http') !== false) { |
|
680 | - $field_icon_af = ''; |
|
681 | - } elseif ($field_icon == '') { |
|
682 | - $field_icon_af = ($cf['htmlvar_name'] == 'geodir_timing') ? '<i class="fa fa-clock-o"></i>' : ""; |
|
683 | - } else { |
|
684 | - $field_icon_af = $field_icon; |
|
685 | - $field_icon = ''; |
|
686 | - } |
|
678 | + $field_icon = geodir_field_icon_proccess($cf); |
|
679 | + if (strpos($field_icon, 'http') !== false) { |
|
680 | + $field_icon_af = ''; |
|
681 | + } elseif ($field_icon == '') { |
|
682 | + $field_icon_af = ($cf['htmlvar_name'] == 'geodir_timing') ? '<i class="fa fa-clock-o"></i>' : ""; |
|
683 | + } else { |
|
684 | + $field_icon_af = $field_icon; |
|
685 | + $field_icon = ''; |
|
686 | + } |
|
687 | 687 | |
688 | 688 | |
689 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="'.$class.'" style="' . $field_icon . '">' . $field_icon_af; |
|
690 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
691 | - $html .= '</span>' . $post->{$cf['htmlvar_name']} . '</div>'; |
|
689 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="'.$class.'" style="' . $field_icon . '">' . $field_icon_af; |
|
690 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
691 | + $html .= '</span>' . $post->{$cf['htmlvar_name']} . '</div>'; |
|
692 | 692 | |
693 | - endif; |
|
693 | + endif; |
|
694 | 694 | |
695 | - } |
|
695 | + } |
|
696 | 696 | |
697 | - return $html; |
|
697 | + return $html; |
|
698 | 698 | } |
699 | 699 | add_filter('geodir_custom_field_output_text','geodir_cf_text',10,3); |
700 | 700 | |
@@ -711,98 +711,98 @@ discard block |
||
711 | 711 | */ |
712 | 712 | function geodir_cf_radio($html,$location,$cf,$p=''){ |
713 | 713 | |
714 | - // check we have the post value |
|
715 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
716 | - else{ global $post;} |
|
717 | - |
|
718 | - if(!is_array($cf) && $cf!=''){ |
|
719 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
720 | - if(!$cf){return NULL;} |
|
721 | - } |
|
722 | - |
|
723 | - $html_var = $cf['htmlvar_name']; |
|
724 | - |
|
725 | - // Check if there is a location specific filter. |
|
726 | - if(has_filter("geodir_custom_field_output_radio_loc_{$location}")){ |
|
727 | - /** |
|
728 | - * Filter the radio html by location. |
|
729 | - * |
|
730 | - * @param string $html The html to filter. |
|
731 | - * @param array $cf The custom field array. |
|
732 | - * @since 1.6.6 |
|
733 | - */ |
|
734 | - $html = apply_filters("geodir_custom_field_output_radio_loc_{$location}",$html,$cf); |
|
735 | - } |
|
736 | - |
|
737 | - // Check if there is a custom field specific filter. |
|
738 | - if(has_filter("geodir_custom_field_output_radio_var_{$html_var}")){ |
|
739 | - /** |
|
740 | - * Filter the radio html by individual custom field. |
|
741 | - * |
|
742 | - * @param string $html The html to filter. |
|
743 | - * @param string $location The location to output the html. |
|
744 | - * @param array $cf The custom field array. |
|
745 | - * @since 1.6.6 |
|
746 | - */ |
|
747 | - $html = apply_filters("geodir_custom_field_output_radio_var_{$html_var}",$html,$location,$cf); |
|
748 | - } |
|
749 | - |
|
750 | - // Check if there is a custom field key specific filter. |
|
751 | - if(has_filter("geodir_custom_field_output_radio_key_{$cf['field_type_key']}")){ |
|
752 | - /** |
|
753 | - * Filter the radio html by field type key. |
|
754 | - * |
|
755 | - * @param string $html The html to filter. |
|
756 | - * @param string $location The location to output the html. |
|
757 | - * @param array $cf The custom field array. |
|
758 | - * @since 1.6.6 |
|
759 | - */ |
|
760 | - $html = apply_filters("geodir_custom_field_output_radio_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
761 | - } |
|
762 | - |
|
763 | - // If not html then we run the standard output. |
|
764 | - if(empty($html)){ |
|
765 | - |
|
766 | - $html_val = isset($post->{$cf['htmlvar_name']}) ? __($post->{$cf['htmlvar_name']}, 'geodirectory') : ''; |
|
767 | - if (isset($post->{$cf['htmlvar_name']}) && $post->{$cf['htmlvar_name']} != ''): |
|
768 | - |
|
769 | - if ($post->{$cf['htmlvar_name']} == 'f' || $post->{$cf['htmlvar_name']} == '0') { |
|
770 | - $html_val = __('No', 'geodirectory'); |
|
771 | - } else if ($post->{$cf['htmlvar_name']} == 't' || $post->{$cf['htmlvar_name']} == '1') { |
|
772 | - $html_val = __('Yes', 'geodirectory'); |
|
773 | - } else { |
|
774 | - if (!empty($cf['option_values'])) { |
|
775 | - $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
776 | - |
|
777 | - if (!empty($cf_option_values)) { |
|
778 | - foreach ($cf_option_values as $cf_option_value) { |
|
779 | - if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$cf['htmlvar_name']}) { |
|
780 | - $html_val = $cf_option_value['label']; |
|
781 | - } |
|
782 | - } |
|
783 | - } |
|
784 | - } |
|
785 | - } |
|
786 | - |
|
787 | - $field_icon = geodir_field_icon_proccess($cf); |
|
788 | - if (strpos($field_icon, 'http') !== false) { |
|
789 | - $field_icon_af = ''; |
|
790 | - } elseif ($field_icon == '') { |
|
791 | - $field_icon_af = ''; |
|
792 | - } else { |
|
793 | - $field_icon_af = $field_icon; |
|
794 | - $field_icon = ''; |
|
795 | - } |
|
796 | - |
|
797 | - |
|
798 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-radio" style="' . $field_icon . '">' . $field_icon_af; |
|
799 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
800 | - $html .= '</span>' . $html_val . '</div>'; |
|
801 | - endif; |
|
802 | - |
|
803 | - } |
|
804 | - |
|
805 | - return $html; |
|
714 | + // check we have the post value |
|
715 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
716 | + else{ global $post;} |
|
717 | + |
|
718 | + if(!is_array($cf) && $cf!=''){ |
|
719 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
720 | + if(!$cf){return NULL;} |
|
721 | + } |
|
722 | + |
|
723 | + $html_var = $cf['htmlvar_name']; |
|
724 | + |
|
725 | + // Check if there is a location specific filter. |
|
726 | + if(has_filter("geodir_custom_field_output_radio_loc_{$location}")){ |
|
727 | + /** |
|
728 | + * Filter the radio html by location. |
|
729 | + * |
|
730 | + * @param string $html The html to filter. |
|
731 | + * @param array $cf The custom field array. |
|
732 | + * @since 1.6.6 |
|
733 | + */ |
|
734 | + $html = apply_filters("geodir_custom_field_output_radio_loc_{$location}",$html,$cf); |
|
735 | + } |
|
736 | + |
|
737 | + // Check if there is a custom field specific filter. |
|
738 | + if(has_filter("geodir_custom_field_output_radio_var_{$html_var}")){ |
|
739 | + /** |
|
740 | + * Filter the radio html by individual custom field. |
|
741 | + * |
|
742 | + * @param string $html The html to filter. |
|
743 | + * @param string $location The location to output the html. |
|
744 | + * @param array $cf The custom field array. |
|
745 | + * @since 1.6.6 |
|
746 | + */ |
|
747 | + $html = apply_filters("geodir_custom_field_output_radio_var_{$html_var}",$html,$location,$cf); |
|
748 | + } |
|
749 | + |
|
750 | + // Check if there is a custom field key specific filter. |
|
751 | + if(has_filter("geodir_custom_field_output_radio_key_{$cf['field_type_key']}")){ |
|
752 | + /** |
|
753 | + * Filter the radio html by field type key. |
|
754 | + * |
|
755 | + * @param string $html The html to filter. |
|
756 | + * @param string $location The location to output the html. |
|
757 | + * @param array $cf The custom field array. |
|
758 | + * @since 1.6.6 |
|
759 | + */ |
|
760 | + $html = apply_filters("geodir_custom_field_output_radio_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
761 | + } |
|
762 | + |
|
763 | + // If not html then we run the standard output. |
|
764 | + if(empty($html)){ |
|
765 | + |
|
766 | + $html_val = isset($post->{$cf['htmlvar_name']}) ? __($post->{$cf['htmlvar_name']}, 'geodirectory') : ''; |
|
767 | + if (isset($post->{$cf['htmlvar_name']}) && $post->{$cf['htmlvar_name']} != ''): |
|
768 | + |
|
769 | + if ($post->{$cf['htmlvar_name']} == 'f' || $post->{$cf['htmlvar_name']} == '0') { |
|
770 | + $html_val = __('No', 'geodirectory'); |
|
771 | + } else if ($post->{$cf['htmlvar_name']} == 't' || $post->{$cf['htmlvar_name']} == '1') { |
|
772 | + $html_val = __('Yes', 'geodirectory'); |
|
773 | + } else { |
|
774 | + if (!empty($cf['option_values'])) { |
|
775 | + $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
776 | + |
|
777 | + if (!empty($cf_option_values)) { |
|
778 | + foreach ($cf_option_values as $cf_option_value) { |
|
779 | + if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$cf['htmlvar_name']}) { |
|
780 | + $html_val = $cf_option_value['label']; |
|
781 | + } |
|
782 | + } |
|
783 | + } |
|
784 | + } |
|
785 | + } |
|
786 | + |
|
787 | + $field_icon = geodir_field_icon_proccess($cf); |
|
788 | + if (strpos($field_icon, 'http') !== false) { |
|
789 | + $field_icon_af = ''; |
|
790 | + } elseif ($field_icon == '') { |
|
791 | + $field_icon_af = ''; |
|
792 | + } else { |
|
793 | + $field_icon_af = $field_icon; |
|
794 | + $field_icon = ''; |
|
795 | + } |
|
796 | + |
|
797 | + |
|
798 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-radio" style="' . $field_icon . '">' . $field_icon_af; |
|
799 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
800 | + $html .= '</span>' . $html_val . '</div>'; |
|
801 | + endif; |
|
802 | + |
|
803 | + } |
|
804 | + |
|
805 | + return $html; |
|
806 | 806 | } |
807 | 807 | add_filter('geodir_custom_field_output_radio','geodir_cf_radio',10,3); |
808 | 808 | |
@@ -819,92 +819,92 @@ discard block |
||
819 | 819 | */ |
820 | 820 | function geodir_cf_select($html,$location,$cf,$p=''){ |
821 | 821 | |
822 | - // check we have the post value |
|
823 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
824 | - else{ global $post;} |
|
825 | - |
|
826 | - if(!is_array($cf) && $cf!=''){ |
|
827 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
828 | - if(!$cf){return NULL;} |
|
829 | - } |
|
830 | - |
|
831 | - $html_var = $cf['htmlvar_name']; |
|
832 | - |
|
833 | - // Check if there is a location specific filter. |
|
834 | - if(has_filter("geodir_custom_field_output_select_loc_{$location}")){ |
|
835 | - /** |
|
836 | - * Filter the select html by location. |
|
837 | - * |
|
838 | - * @param string $html The html to filter. |
|
839 | - * @param array $cf The custom field array. |
|
840 | - * @since 1.6.6 |
|
841 | - */ |
|
842 | - $html = apply_filters("geodir_custom_field_output_select_loc_{$location}",$html,$cf); |
|
843 | - } |
|
844 | - |
|
845 | - // Check if there is a custom field specific filter. |
|
846 | - if(has_filter("geodir_custom_field_output_select_var_{$html_var}")){ |
|
847 | - /** |
|
848 | - * Filter the select html by individual custom field. |
|
849 | - * |
|
850 | - * @param string $html The html to filter. |
|
851 | - * @param string $location The location to output the html. |
|
852 | - * @param array $cf The custom field array. |
|
853 | - * @since 1.6.6 |
|
854 | - */ |
|
855 | - $html = apply_filters("geodir_custom_field_output_select_var_{$html_var}",$html,$location,$cf); |
|
856 | - } |
|
857 | - |
|
858 | - // Check if there is a custom field key specific filter. |
|
859 | - if(has_filter("geodir_custom_field_output_select_key_{$cf['field_type_key']}")){ |
|
860 | - /** |
|
861 | - * Filter the select html by field type key. |
|
862 | - * |
|
863 | - * @param string $html The html to filter. |
|
864 | - * @param string $location The location to output the html. |
|
865 | - * @param array $cf The custom field array. |
|
866 | - * @since 1.6.6 |
|
867 | - */ |
|
868 | - $html = apply_filters("geodir_custom_field_output_select_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
869 | - } |
|
870 | - |
|
871 | - // If not html then we run the standard output. |
|
872 | - if(empty($html)){ |
|
873 | - |
|
874 | - if ($post->{$cf['htmlvar_name']}): |
|
875 | - $field_value = __($post->{$cf['htmlvar_name']}, 'geodirectory'); |
|
876 | - |
|
877 | - if (!empty($cf['option_values'])) { |
|
878 | - $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
879 | - |
|
880 | - if (!empty($cf_option_values)) { |
|
881 | - foreach ($cf_option_values as $cf_option_value) { |
|
882 | - if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$cf['htmlvar_name']}) { |
|
883 | - //$field_value = $cf_option_value['label']; // no longer needed here. |
|
884 | - } |
|
885 | - } |
|
886 | - } |
|
887 | - } |
|
888 | - |
|
889 | - $field_icon = geodir_field_icon_proccess($cf); |
|
890 | - if (strpos($field_icon, 'http') !== false) { |
|
891 | - $field_icon_af = ''; |
|
892 | - } elseif ($field_icon == '') { |
|
893 | - $field_icon_af = ''; |
|
894 | - } else { |
|
895 | - $field_icon_af = $field_icon; |
|
896 | - $field_icon = ''; |
|
897 | - } |
|
898 | - |
|
899 | - |
|
900 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
901 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
902 | - $html .= '</span>' . $field_value . '</div>'; |
|
903 | - endif; |
|
904 | - |
|
905 | - } |
|
906 | - |
|
907 | - return $html; |
|
822 | + // check we have the post value |
|
823 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
824 | + else{ global $post;} |
|
825 | + |
|
826 | + if(!is_array($cf) && $cf!=''){ |
|
827 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
828 | + if(!$cf){return NULL;} |
|
829 | + } |
|
830 | + |
|
831 | + $html_var = $cf['htmlvar_name']; |
|
832 | + |
|
833 | + // Check if there is a location specific filter. |
|
834 | + if(has_filter("geodir_custom_field_output_select_loc_{$location}")){ |
|
835 | + /** |
|
836 | + * Filter the select html by location. |
|
837 | + * |
|
838 | + * @param string $html The html to filter. |
|
839 | + * @param array $cf The custom field array. |
|
840 | + * @since 1.6.6 |
|
841 | + */ |
|
842 | + $html = apply_filters("geodir_custom_field_output_select_loc_{$location}",$html,$cf); |
|
843 | + } |
|
844 | + |
|
845 | + // Check if there is a custom field specific filter. |
|
846 | + if(has_filter("geodir_custom_field_output_select_var_{$html_var}")){ |
|
847 | + /** |
|
848 | + * Filter the select html by individual custom field. |
|
849 | + * |
|
850 | + * @param string $html The html to filter. |
|
851 | + * @param string $location The location to output the html. |
|
852 | + * @param array $cf The custom field array. |
|
853 | + * @since 1.6.6 |
|
854 | + */ |
|
855 | + $html = apply_filters("geodir_custom_field_output_select_var_{$html_var}",$html,$location,$cf); |
|
856 | + } |
|
857 | + |
|
858 | + // Check if there is a custom field key specific filter. |
|
859 | + if(has_filter("geodir_custom_field_output_select_key_{$cf['field_type_key']}")){ |
|
860 | + /** |
|
861 | + * Filter the select html by field type key. |
|
862 | + * |
|
863 | + * @param string $html The html to filter. |
|
864 | + * @param string $location The location to output the html. |
|
865 | + * @param array $cf The custom field array. |
|
866 | + * @since 1.6.6 |
|
867 | + */ |
|
868 | + $html = apply_filters("geodir_custom_field_output_select_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
869 | + } |
|
870 | + |
|
871 | + // If not html then we run the standard output. |
|
872 | + if(empty($html)){ |
|
873 | + |
|
874 | + if ($post->{$cf['htmlvar_name']}): |
|
875 | + $field_value = __($post->{$cf['htmlvar_name']}, 'geodirectory'); |
|
876 | + |
|
877 | + if (!empty($cf['option_values'])) { |
|
878 | + $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
879 | + |
|
880 | + if (!empty($cf_option_values)) { |
|
881 | + foreach ($cf_option_values as $cf_option_value) { |
|
882 | + if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$cf['htmlvar_name']}) { |
|
883 | + //$field_value = $cf_option_value['label']; // no longer needed here. |
|
884 | + } |
|
885 | + } |
|
886 | + } |
|
887 | + } |
|
888 | + |
|
889 | + $field_icon = geodir_field_icon_proccess($cf); |
|
890 | + if (strpos($field_icon, 'http') !== false) { |
|
891 | + $field_icon_af = ''; |
|
892 | + } elseif ($field_icon == '') { |
|
893 | + $field_icon_af = ''; |
|
894 | + } else { |
|
895 | + $field_icon_af = $field_icon; |
|
896 | + $field_icon = ''; |
|
897 | + } |
|
898 | + |
|
899 | + |
|
900 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
901 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
902 | + $html .= '</span>' . $field_value . '</div>'; |
|
903 | + endif; |
|
904 | + |
|
905 | + } |
|
906 | + |
|
907 | + return $html; |
|
908 | 908 | } |
909 | 909 | add_filter('geodir_custom_field_output_select','geodir_cf_select',10,3); |
910 | 910 | |
@@ -921,117 +921,117 @@ discard block |
||
921 | 921 | */ |
922 | 922 | function geodir_cf_multiselect($html,$location,$cf,$p=''){ |
923 | 923 | |
924 | - // check we have the post value |
|
925 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
926 | - else{ global $post;} |
|
927 | - |
|
928 | - if(!is_array($cf) && $cf!=''){ |
|
929 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
930 | - if(!$cf){return NULL;} |
|
931 | - } |
|
932 | - |
|
933 | - $html_var = $cf['htmlvar_name']; |
|
934 | - |
|
935 | - // Check if there is a location specific filter. |
|
936 | - if(has_filter("geodir_custom_field_output_multiselect_loc_{$location}")){ |
|
937 | - /** |
|
938 | - * Filter the multiselect html by location. |
|
939 | - * |
|
940 | - * @param string $html The html to filter. |
|
941 | - * @param array $cf The custom field array. |
|
942 | - * @since 1.6.6 |
|
943 | - */ |
|
944 | - $html = apply_filters("geodir_custom_field_output_multiselect_loc_{$location}",$html,$cf); |
|
945 | - } |
|
946 | - |
|
947 | - // Check if there is a custom field specific filter. |
|
948 | - if(has_filter("geodir_custom_field_output_multiselect_var_{$html_var}")){ |
|
949 | - /** |
|
950 | - * Filter the multiselect html by individual custom field. |
|
951 | - * |
|
952 | - * @param string $html The html to filter. |
|
953 | - * @param string $location The location to output the html. |
|
954 | - * @param array $cf The custom field array. |
|
955 | - * @since 1.6.6 |
|
956 | - */ |
|
957 | - $html = apply_filters("geodir_custom_field_output_multiselect_var_{$html_var}",$html,$location,$cf); |
|
958 | - } |
|
959 | - |
|
960 | - // Check if there is a custom field key specific filter. |
|
961 | - if(has_filter("geodir_custom_field_output_multiselect_key_{$cf['field_type_key']}")){ |
|
962 | - /** |
|
963 | - * Filter the multiselect html by field type key. |
|
964 | - * |
|
965 | - * @param string $html The html to filter. |
|
966 | - * @param string $location The location to output the html. |
|
967 | - * @param array $cf The custom field array. |
|
968 | - * @since 1.6.6 |
|
969 | - */ |
|
970 | - $html = apply_filters("geodir_custom_field_output_multiselect_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
971 | - } |
|
972 | - |
|
973 | - // If not html then we run the standard output. |
|
974 | - if(empty($html)){ |
|
975 | - |
|
976 | - |
|
977 | - if (!empty($post->{$cf['htmlvar_name']})): |
|
978 | - |
|
979 | - if (is_array($post->{$cf['htmlvar_name']})) { |
|
980 | - $post->{$cf['htmlvar_name']} = implode(', ', $post->{$cf['htmlvar_name']}); |
|
981 | - } |
|
982 | - |
|
983 | - $field_icon = geodir_field_icon_proccess($cf); |
|
984 | - if (strpos($field_icon, 'http') !== false) { |
|
985 | - $field_icon_af = ''; |
|
986 | - } elseif ($field_icon == '') { |
|
987 | - $field_icon_af = ''; |
|
988 | - } else { |
|
989 | - $field_icon_af = $field_icon; |
|
990 | - $field_icon = ''; |
|
991 | - } |
|
992 | - |
|
993 | - $field_values = explode(',', trim($post->{$cf['htmlvar_name']}, ",")); |
|
994 | - |
|
995 | - if(is_array($field_values)){ |
|
996 | - $field_values = array_map('trim', $field_values); |
|
997 | - } |
|
998 | - |
|
999 | - $option_values = array(); |
|
1000 | - if (!empty($cf['option_values'])) { |
|
1001 | - $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
1002 | - |
|
1003 | - if (!empty($cf_option_values)) { |
|
1004 | - foreach ($cf_option_values as $cf_option_value) { |
|
1005 | - if (isset($cf_option_value['value']) && in_array($cf_option_value['value'], $field_values)) { |
|
1006 | - $option_values[] = $cf_option_value['label']; |
|
1007 | - } |
|
1008 | - } |
|
1009 | - } |
|
1010 | - } |
|
1011 | - |
|
1012 | - |
|
1013 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
1014 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1015 | - $html .= '</span>'; |
|
1016 | - |
|
1017 | - if (count($option_values) > 1) { |
|
1018 | - $html .= '<ul>'; |
|
1019 | - |
|
1020 | - foreach ($option_values as $val) { |
|
1021 | - $html .= '<li>' . $val . '</li>'; |
|
1022 | - } |
|
1023 | - |
|
1024 | - $html .= '</ul>'; |
|
1025 | - } else { |
|
1026 | - $html .= $post->{$cf['htmlvar_name']}; |
|
1027 | - } |
|
1028 | - |
|
1029 | - $html .= '</div>'; |
|
1030 | - endif; |
|
1031 | - |
|
1032 | - } |
|
1033 | - |
|
1034 | - return $html; |
|
924 | + // check we have the post value |
|
925 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
926 | + else{ global $post;} |
|
927 | + |
|
928 | + if(!is_array($cf) && $cf!=''){ |
|
929 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
930 | + if(!$cf){return NULL;} |
|
931 | + } |
|
932 | + |
|
933 | + $html_var = $cf['htmlvar_name']; |
|
934 | + |
|
935 | + // Check if there is a location specific filter. |
|
936 | + if(has_filter("geodir_custom_field_output_multiselect_loc_{$location}")){ |
|
937 | + /** |
|
938 | + * Filter the multiselect html by location. |
|
939 | + * |
|
940 | + * @param string $html The html to filter. |
|
941 | + * @param array $cf The custom field array. |
|
942 | + * @since 1.6.6 |
|
943 | + */ |
|
944 | + $html = apply_filters("geodir_custom_field_output_multiselect_loc_{$location}",$html,$cf); |
|
945 | + } |
|
946 | + |
|
947 | + // Check if there is a custom field specific filter. |
|
948 | + if(has_filter("geodir_custom_field_output_multiselect_var_{$html_var}")){ |
|
949 | + /** |
|
950 | + * Filter the multiselect html by individual custom field. |
|
951 | + * |
|
952 | + * @param string $html The html to filter. |
|
953 | + * @param string $location The location to output the html. |
|
954 | + * @param array $cf The custom field array. |
|
955 | + * @since 1.6.6 |
|
956 | + */ |
|
957 | + $html = apply_filters("geodir_custom_field_output_multiselect_var_{$html_var}",$html,$location,$cf); |
|
958 | + } |
|
959 | + |
|
960 | + // Check if there is a custom field key specific filter. |
|
961 | + if(has_filter("geodir_custom_field_output_multiselect_key_{$cf['field_type_key']}")){ |
|
962 | + /** |
|
963 | + * Filter the multiselect html by field type key. |
|
964 | + * |
|
965 | + * @param string $html The html to filter. |
|
966 | + * @param string $location The location to output the html. |
|
967 | + * @param array $cf The custom field array. |
|
968 | + * @since 1.6.6 |
|
969 | + */ |
|
970 | + $html = apply_filters("geodir_custom_field_output_multiselect_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
971 | + } |
|
972 | + |
|
973 | + // If not html then we run the standard output. |
|
974 | + if(empty($html)){ |
|
975 | + |
|
976 | + |
|
977 | + if (!empty($post->{$cf['htmlvar_name']})): |
|
978 | + |
|
979 | + if (is_array($post->{$cf['htmlvar_name']})) { |
|
980 | + $post->{$cf['htmlvar_name']} = implode(', ', $post->{$cf['htmlvar_name']}); |
|
981 | + } |
|
982 | + |
|
983 | + $field_icon = geodir_field_icon_proccess($cf); |
|
984 | + if (strpos($field_icon, 'http') !== false) { |
|
985 | + $field_icon_af = ''; |
|
986 | + } elseif ($field_icon == '') { |
|
987 | + $field_icon_af = ''; |
|
988 | + } else { |
|
989 | + $field_icon_af = $field_icon; |
|
990 | + $field_icon = ''; |
|
991 | + } |
|
992 | + |
|
993 | + $field_values = explode(',', trim($post->{$cf['htmlvar_name']}, ",")); |
|
994 | + |
|
995 | + if(is_array($field_values)){ |
|
996 | + $field_values = array_map('trim', $field_values); |
|
997 | + } |
|
998 | + |
|
999 | + $option_values = array(); |
|
1000 | + if (!empty($cf['option_values'])) { |
|
1001 | + $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
1002 | + |
|
1003 | + if (!empty($cf_option_values)) { |
|
1004 | + foreach ($cf_option_values as $cf_option_value) { |
|
1005 | + if (isset($cf_option_value['value']) && in_array($cf_option_value['value'], $field_values)) { |
|
1006 | + $option_values[] = $cf_option_value['label']; |
|
1007 | + } |
|
1008 | + } |
|
1009 | + } |
|
1010 | + } |
|
1011 | + |
|
1012 | + |
|
1013 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
1014 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1015 | + $html .= '</span>'; |
|
1016 | + |
|
1017 | + if (count($option_values) > 1) { |
|
1018 | + $html .= '<ul>'; |
|
1019 | + |
|
1020 | + foreach ($option_values as $val) { |
|
1021 | + $html .= '<li>' . $val . '</li>'; |
|
1022 | + } |
|
1023 | + |
|
1024 | + $html .= '</ul>'; |
|
1025 | + } else { |
|
1026 | + $html .= $post->{$cf['htmlvar_name']}; |
|
1027 | + } |
|
1028 | + |
|
1029 | + $html .= '</div>'; |
|
1030 | + endif; |
|
1031 | + |
|
1032 | + } |
|
1033 | + |
|
1034 | + return $html; |
|
1035 | 1035 | } |
1036 | 1036 | add_filter('geodir_custom_field_output_multiselect','geodir_cf_multiselect',10,3); |
1037 | 1037 | |
@@ -1048,152 +1048,152 @@ discard block |
||
1048 | 1048 | */ |
1049 | 1049 | function geodir_cf_email($html,$location,$cf,$p=''){ |
1050 | 1050 | |
1051 | - // check we have the post value |
|
1052 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1053 | - else{ global $post;} |
|
1054 | - |
|
1055 | - if(!is_array($cf) && $cf!=''){ |
|
1056 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1057 | - if(!$cf){return NULL;} |
|
1058 | - } |
|
1059 | - |
|
1060 | - $html_var = $cf['htmlvar_name']; |
|
1061 | - |
|
1062 | - // Check if there is a location specific filter. |
|
1063 | - if(has_filter("geodir_custom_field_output_email_loc_{$location}")){ |
|
1064 | - /** |
|
1065 | - * Filter the email html by location. |
|
1066 | - * |
|
1067 | - * @param string $html The html to filter. |
|
1068 | - * @param array $cf The custom field array. |
|
1069 | - * @since 1.6.6 |
|
1070 | - */ |
|
1071 | - $html = apply_filters("geodir_custom_field_output_email_loc_{$location}",$html,$cf); |
|
1072 | - } |
|
1073 | - |
|
1074 | - // Check if there is a custom field specific filter. |
|
1075 | - if(has_filter("geodir_custom_field_output_email_var_{$html_var}")){ |
|
1076 | - /** |
|
1077 | - * Filter the email html by individual custom field. |
|
1078 | - * |
|
1079 | - * @param string $html The html to filter. |
|
1080 | - * @param string $location The location to output the html. |
|
1081 | - * @param array $cf The custom field array. |
|
1082 | - * @since 1.6.6 |
|
1083 | - */ |
|
1084 | - $html = apply_filters("geodir_custom_field_output_email_var_{$html_var}",$html,$location,$cf); |
|
1085 | - } |
|
1086 | - |
|
1087 | - // Check if there is a custom field key specific filter. |
|
1088 | - if(has_filter("geodir_custom_field_output_email_key_{$cf['field_type_key']}")){ |
|
1089 | - /** |
|
1090 | - * Filter the email html by field type key. |
|
1091 | - * |
|
1092 | - * @param string $html The html to filter. |
|
1093 | - * @param string $location The location to output the html. |
|
1094 | - * @param array $cf The custom field array. |
|
1095 | - * @since 1.6.6 |
|
1096 | - */ |
|
1097 | - $html = apply_filters("geodir_custom_field_output_email_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1098 | - } |
|
1099 | - |
|
1100 | - // If not html then we run the standard output. |
|
1101 | - if(empty($html)){ |
|
1102 | - |
|
1103 | - global $preview; |
|
1104 | - if ($cf['htmlvar_name'] == 'geodir_email' && !(geodir_is_page('detail') || geodir_is_page('preview'))) { |
|
1105 | - return ''; // Remove Send Enquiry | Send To Friend from listings page |
|
1106 | - } |
|
1107 | - |
|
1108 | - $package_info = (array)geodir_post_package_info(array(), $post, $post->post_type); |
|
1109 | - |
|
1110 | - if ($cf['htmlvar_name'] == 'geodir_email' && ((isset($package_info['sendtofriend']) && $package_info['sendtofriend']) || $post->{$cf['htmlvar_name']})) { |
|
1111 | - $send_to_friend = true; |
|
1112 | - $b_send_inquiry = ''; |
|
1113 | - $b_sendtofriend = ''; |
|
1114 | - |
|
1115 | - $html = ''; |
|
1116 | - if (!$preview) { |
|
1117 | - $b_send_inquiry = 'b_send_inquiry'; |
|
1118 | - $b_sendtofriend = 'b_sendtofriend'; |
|
1119 | - $html = '<input type="hidden" name="geodir_popup_post_id" value="' . $post->ID . '" /><div class="geodir_display_popup_forms"></div>'; |
|
1120 | - } |
|
1121 | - |
|
1122 | - $field_icon = geodir_field_icon_proccess($cf); |
|
1123 | - if (strpos($field_icon, 'http') !== false) { |
|
1124 | - $field_icon_af = ''; |
|
1125 | - } elseif ($field_icon == '') { |
|
1126 | - $field_icon_af = '<i class="fa fa-envelope"></i>'; |
|
1127 | - } else { |
|
1128 | - $field_icon_af = $field_icon; |
|
1129 | - $field_icon = ''; |
|
1130 | - } |
|
1131 | - |
|
1132 | - $html .= '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
1133 | - $seperator = ''; |
|
1134 | - if ($post->{$cf['htmlvar_name']}) { |
|
1135 | - $html .= '<a href="javascript:void(0);" class="' . $b_send_inquiry . '" >' . SEND_INQUIRY . '</a>'; |
|
1136 | - $seperator = ' | '; |
|
1137 | - } |
|
1138 | - |
|
1139 | - if (isset($package_info['sendtofriend']) && $package_info['sendtofriend']) { |
|
1140 | - $html .= $seperator . '<a href="javascript:void(0);" class="' . $b_sendtofriend . '">' . SEND_TO_FRIEND . '</a>'; |
|
1141 | - } |
|
1142 | - |
|
1143 | - $html .= '</span></div>'; |
|
1144 | - |
|
1145 | - |
|
1146 | - if (isset($_REQUEST['send_inquiry']) && $_REQUEST['send_inquiry'] == 'success') { |
|
1147 | - $html .= '<p class="sucess_msg">' . SEND_INQUIRY_SUCCESS . '</p>'; |
|
1148 | - } elseif (isset($_REQUEST['sendtofrnd']) && $_REQUEST['sendtofrnd'] == 'success') { |
|
1149 | - $html .= '<p class="sucess_msg">' . SEND_FRIEND_SUCCESS . '</p>'; |
|
1150 | - } elseif (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'captch') { |
|
1151 | - $html .= '<p class="error_msg_fix">' . WRONG_CAPTCH_MSG . '</p>'; |
|
1152 | - } |
|
1153 | - |
|
1154 | - /*if(!$preview){require_once (geodir_plugin_path().'/geodirectory-templates/popup-forms.php');}*/ |
|
1155 | - |
|
1156 | - } else { |
|
1157 | - |
|
1158 | - if ($post->{$cf['htmlvar_name']}) { |
|
1159 | - |
|
1160 | - $field_icon = geodir_field_icon_proccess($cf); |
|
1161 | - if (strpos($field_icon, 'http') !== false) { |
|
1162 | - $field_icon_af = ''; |
|
1163 | - } elseif ($field_icon == '') { |
|
1164 | - $field_icon_af = '<i class="fa fa-envelope"></i>'; |
|
1165 | - } else { |
|
1166 | - $field_icon_af = $field_icon; |
|
1167 | - $field_icon = ''; |
|
1168 | - } |
|
1169 | - |
|
1170 | - |
|
1171 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
1172 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1173 | - $html .= '</span><span class="geodir-email-address-output">'; |
|
1174 | - $email = $post->{$cf['htmlvar_name']} ; |
|
1175 | - if($e_split = explode('@',$email)){ |
|
1176 | - /** |
|
1177 | - * Filter email custom field name output. |
|
1178 | - * |
|
1179 | - * @since 1.5.3 |
|
1180 | - * |
|
1181 | - * @param string $email The email string being output. |
|
1182 | - * @param array $cf Custom field variables array. |
|
1183 | - */ |
|
1184 | - $email_name = apply_filters('geodir_email_field_name_output',$email,$cf); |
|
1185 | - $html .= "<script>document.write('<a href=\"mailto:'+'$e_split[0]' + '@' + '$e_split[1]'+'\">$email_name</a>')</script>"; |
|
1186 | - }else{ |
|
1187 | - $html .= $email; |
|
1188 | - } |
|
1189 | - $html .= '</span></div>'; |
|
1190 | - } |
|
1191 | - |
|
1192 | - } |
|
1193 | - |
|
1194 | - } |
|
1195 | - |
|
1196 | - return $html; |
|
1051 | + // check we have the post value |
|
1052 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1053 | + else{ global $post;} |
|
1054 | + |
|
1055 | + if(!is_array($cf) && $cf!=''){ |
|
1056 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1057 | + if(!$cf){return NULL;} |
|
1058 | + } |
|
1059 | + |
|
1060 | + $html_var = $cf['htmlvar_name']; |
|
1061 | + |
|
1062 | + // Check if there is a location specific filter. |
|
1063 | + if(has_filter("geodir_custom_field_output_email_loc_{$location}")){ |
|
1064 | + /** |
|
1065 | + * Filter the email html by location. |
|
1066 | + * |
|
1067 | + * @param string $html The html to filter. |
|
1068 | + * @param array $cf The custom field array. |
|
1069 | + * @since 1.6.6 |
|
1070 | + */ |
|
1071 | + $html = apply_filters("geodir_custom_field_output_email_loc_{$location}",$html,$cf); |
|
1072 | + } |
|
1073 | + |
|
1074 | + // Check if there is a custom field specific filter. |
|
1075 | + if(has_filter("geodir_custom_field_output_email_var_{$html_var}")){ |
|
1076 | + /** |
|
1077 | + * Filter the email html by individual custom field. |
|
1078 | + * |
|
1079 | + * @param string $html The html to filter. |
|
1080 | + * @param string $location The location to output the html. |
|
1081 | + * @param array $cf The custom field array. |
|
1082 | + * @since 1.6.6 |
|
1083 | + */ |
|
1084 | + $html = apply_filters("geodir_custom_field_output_email_var_{$html_var}",$html,$location,$cf); |
|
1085 | + } |
|
1086 | + |
|
1087 | + // Check if there is a custom field key specific filter. |
|
1088 | + if(has_filter("geodir_custom_field_output_email_key_{$cf['field_type_key']}")){ |
|
1089 | + /** |
|
1090 | + * Filter the email html by field type key. |
|
1091 | + * |
|
1092 | + * @param string $html The html to filter. |
|
1093 | + * @param string $location The location to output the html. |
|
1094 | + * @param array $cf The custom field array. |
|
1095 | + * @since 1.6.6 |
|
1096 | + */ |
|
1097 | + $html = apply_filters("geodir_custom_field_output_email_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1098 | + } |
|
1099 | + |
|
1100 | + // If not html then we run the standard output. |
|
1101 | + if(empty($html)){ |
|
1102 | + |
|
1103 | + global $preview; |
|
1104 | + if ($cf['htmlvar_name'] == 'geodir_email' && !(geodir_is_page('detail') || geodir_is_page('preview'))) { |
|
1105 | + return ''; // Remove Send Enquiry | Send To Friend from listings page |
|
1106 | + } |
|
1107 | + |
|
1108 | + $package_info = (array)geodir_post_package_info(array(), $post, $post->post_type); |
|
1109 | + |
|
1110 | + if ($cf['htmlvar_name'] == 'geodir_email' && ((isset($package_info['sendtofriend']) && $package_info['sendtofriend']) || $post->{$cf['htmlvar_name']})) { |
|
1111 | + $send_to_friend = true; |
|
1112 | + $b_send_inquiry = ''; |
|
1113 | + $b_sendtofriend = ''; |
|
1114 | + |
|
1115 | + $html = ''; |
|
1116 | + if (!$preview) { |
|
1117 | + $b_send_inquiry = 'b_send_inquiry'; |
|
1118 | + $b_sendtofriend = 'b_sendtofriend'; |
|
1119 | + $html = '<input type="hidden" name="geodir_popup_post_id" value="' . $post->ID . '" /><div class="geodir_display_popup_forms"></div>'; |
|
1120 | + } |
|
1121 | + |
|
1122 | + $field_icon = geodir_field_icon_proccess($cf); |
|
1123 | + if (strpos($field_icon, 'http') !== false) { |
|
1124 | + $field_icon_af = ''; |
|
1125 | + } elseif ($field_icon == '') { |
|
1126 | + $field_icon_af = '<i class="fa fa-envelope"></i>'; |
|
1127 | + } else { |
|
1128 | + $field_icon_af = $field_icon; |
|
1129 | + $field_icon = ''; |
|
1130 | + } |
|
1131 | + |
|
1132 | + $html .= '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
1133 | + $seperator = ''; |
|
1134 | + if ($post->{$cf['htmlvar_name']}) { |
|
1135 | + $html .= '<a href="javascript:void(0);" class="' . $b_send_inquiry . '" >' . SEND_INQUIRY . '</a>'; |
|
1136 | + $seperator = ' | '; |
|
1137 | + } |
|
1138 | + |
|
1139 | + if (isset($package_info['sendtofriend']) && $package_info['sendtofriend']) { |
|
1140 | + $html .= $seperator . '<a href="javascript:void(0);" class="' . $b_sendtofriend . '">' . SEND_TO_FRIEND . '</a>'; |
|
1141 | + } |
|
1142 | + |
|
1143 | + $html .= '</span></div>'; |
|
1144 | + |
|
1145 | + |
|
1146 | + if (isset($_REQUEST['send_inquiry']) && $_REQUEST['send_inquiry'] == 'success') { |
|
1147 | + $html .= '<p class="sucess_msg">' . SEND_INQUIRY_SUCCESS . '</p>'; |
|
1148 | + } elseif (isset($_REQUEST['sendtofrnd']) && $_REQUEST['sendtofrnd'] == 'success') { |
|
1149 | + $html .= '<p class="sucess_msg">' . SEND_FRIEND_SUCCESS . '</p>'; |
|
1150 | + } elseif (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'captch') { |
|
1151 | + $html .= '<p class="error_msg_fix">' . WRONG_CAPTCH_MSG . '</p>'; |
|
1152 | + } |
|
1153 | + |
|
1154 | + /*if(!$preview){require_once (geodir_plugin_path().'/geodirectory-templates/popup-forms.php');}*/ |
|
1155 | + |
|
1156 | + } else { |
|
1157 | + |
|
1158 | + if ($post->{$cf['htmlvar_name']}) { |
|
1159 | + |
|
1160 | + $field_icon = geodir_field_icon_proccess($cf); |
|
1161 | + if (strpos($field_icon, 'http') !== false) { |
|
1162 | + $field_icon_af = ''; |
|
1163 | + } elseif ($field_icon == '') { |
|
1164 | + $field_icon_af = '<i class="fa fa-envelope"></i>'; |
|
1165 | + } else { |
|
1166 | + $field_icon_af = $field_icon; |
|
1167 | + $field_icon = ''; |
|
1168 | + } |
|
1169 | + |
|
1170 | + |
|
1171 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
1172 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1173 | + $html .= '</span><span class="geodir-email-address-output">'; |
|
1174 | + $email = $post->{$cf['htmlvar_name']} ; |
|
1175 | + if($e_split = explode('@',$email)){ |
|
1176 | + /** |
|
1177 | + * Filter email custom field name output. |
|
1178 | + * |
|
1179 | + * @since 1.5.3 |
|
1180 | + * |
|
1181 | + * @param string $email The email string being output. |
|
1182 | + * @param array $cf Custom field variables array. |
|
1183 | + */ |
|
1184 | + $email_name = apply_filters('geodir_email_field_name_output',$email,$cf); |
|
1185 | + $html .= "<script>document.write('<a href=\"mailto:'+'$e_split[0]' + '@' + '$e_split[1]'+'\">$email_name</a>')</script>"; |
|
1186 | + }else{ |
|
1187 | + $html .= $email; |
|
1188 | + } |
|
1189 | + $html .= '</span></div>'; |
|
1190 | + } |
|
1191 | + |
|
1192 | + } |
|
1193 | + |
|
1194 | + } |
|
1195 | + |
|
1196 | + return $html; |
|
1197 | 1197 | } |
1198 | 1198 | add_filter('geodir_custom_field_output_email','geodir_cf_email',10,3); |
1199 | 1199 | |
@@ -1210,130 +1210,130 @@ discard block |
||
1210 | 1210 | */ |
1211 | 1211 | function geodir_cf_file($html,$location,$cf,$p=''){ |
1212 | 1212 | |
1213 | - // check we have the post value |
|
1214 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1215 | - else{ global $post;} |
|
1216 | - |
|
1217 | - if(!is_array($cf) && $cf!=''){ |
|
1218 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1219 | - if(!$cf){return NULL;} |
|
1220 | - } |
|
1221 | - |
|
1222 | - $html_var = $cf['htmlvar_name']; |
|
1223 | - |
|
1224 | - // Check if there is a location specific filter. |
|
1225 | - if(has_filter("geodir_custom_field_output_file_loc_{$location}")){ |
|
1226 | - /** |
|
1227 | - * Filter the file html by location. |
|
1228 | - * |
|
1229 | - * @param string $html The html to filter. |
|
1230 | - * @param array $cf The custom field array. |
|
1231 | - * @since 1.6.6 |
|
1232 | - */ |
|
1233 | - $html = apply_filters("geodir_custom_field_output_file_loc_{$location}",$html,$cf); |
|
1234 | - } |
|
1235 | - |
|
1236 | - // Check if there is a custom field specific filter. |
|
1237 | - if(has_filter("geodir_custom_field_output_file_var_{$html_var}")){ |
|
1238 | - /** |
|
1239 | - * Filter the file html by individual custom field. |
|
1240 | - * |
|
1241 | - * @param string $html The html to filter. |
|
1242 | - * @param string $location The location to output the html. |
|
1243 | - * @param array $cf The custom field array. |
|
1244 | - * @since 1.6.6 |
|
1245 | - */ |
|
1246 | - $html = apply_filters("geodir_custom_field_output_file_var_{$html_var}",$html,$location,$cf); |
|
1247 | - } |
|
1248 | - |
|
1249 | - // Check if there is a custom field key specific filter. |
|
1250 | - if(has_filter("geodir_custom_field_output_file_key_{$cf['field_type_key']}")){ |
|
1251 | - /** |
|
1252 | - * Filter the file html by field type key. |
|
1253 | - * |
|
1254 | - * @param string $html The html to filter. |
|
1255 | - * @param string $location The location to output the html. |
|
1256 | - * @param array $cf The custom field array. |
|
1257 | - * @since 1.6.6 |
|
1258 | - */ |
|
1259 | - $html = apply_filters("geodir_custom_field_output_file_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1260 | - } |
|
1261 | - |
|
1262 | - // If not html then we run the standard output. |
|
1263 | - if(empty($html)){ |
|
1264 | - |
|
1265 | - if (!empty($post->{$cf['htmlvar_name']})): |
|
1266 | - |
|
1267 | - $files = explode(",", $post->{$cf['htmlvar_name']}); |
|
1268 | - if (!empty($files)): |
|
1269 | - |
|
1270 | - $extra_fields = !empty($cf['extra_fields']) ? maybe_unserialize($cf['extra_fields']) : NULL; |
|
1271 | - $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? $extra_fields['gd_file_types'] : ''; |
|
1272 | - |
|
1273 | - $file_paths = ''; |
|
1274 | - foreach ($files as $file) { |
|
1275 | - if (!empty($file)) { |
|
1276 | - |
|
1277 | - // $filetype = wp_check_filetype($file); |
|
1278 | - |
|
1279 | - $image_name_arr = explode('/', $file); |
|
1280 | - $curr_img_dir = $image_name_arr[count($image_name_arr) - 2]; |
|
1281 | - $filename = end($image_name_arr); |
|
1282 | - $img_name_arr = explode('.', $filename); |
|
1283 | - |
|
1284 | - $arr_file_type = wp_check_filetype($filename); |
|
1285 | - if (empty($arr_file_type['ext']) || empty($arr_file_type['type'])) { |
|
1286 | - continue; |
|
1287 | - } |
|
1288 | - |
|
1289 | - $uploaded_file_type = $arr_file_type['type']; |
|
1290 | - $uploaded_file_ext = $arr_file_type['ext']; |
|
1291 | - |
|
1292 | - if (!empty($allowed_file_types) && !in_array($uploaded_file_ext, $allowed_file_types)) { |
|
1293 | - continue; // Invalid file type. |
|
1294 | - } |
|
1295 | - |
|
1296 | - //$allowed_file_types = array('application/pdf', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'text/csv', 'text/plain'); |
|
1297 | - $image_file_types = array('image/jpg', 'image/jpeg', 'image/gif', 'image/png', 'image/bmp', 'image/x-icon'); |
|
1298 | - |
|
1299 | - // If the uploaded file is image |
|
1300 | - if (in_array($uploaded_file_type, $image_file_types)) { |
|
1301 | - $file_paths .= '<div class="geodir-custom-post-gallery" class="clearfix">'; |
|
1302 | - $file_paths .= '<a href="'.$file.'">'; |
|
1303 | - $file_paths .= geodir_show_image(array('src' => $file), 'thumbnail', false, false); |
|
1304 | - $file_paths .= '</a>'; |
|
1305 | - //$file_paths .= '<img src="'.$file.'" />'; |
|
1306 | - $file_paths .= '</div>'; |
|
1307 | - } else { |
|
1308 | - $ext_path = '_' . $html_var . '_'; |
|
1309 | - $filename = explode($ext_path, $filename); |
|
1310 | - $file_paths .= '<a href="' . $file . '" target="_blank">' . $filename[count($filename) - 1] . '</a>'; |
|
1311 | - } |
|
1312 | - } |
|
1313 | - } |
|
1314 | - |
|
1315 | - $field_icon = geodir_field_icon_proccess($cf); |
|
1316 | - if (strpos($field_icon, 'http') !== false) { |
|
1317 | - $field_icon_af = ''; |
|
1318 | - } elseif ($field_icon == '') { |
|
1319 | - $field_icon_af = ''; |
|
1320 | - } else { |
|
1321 | - $field_icon_af = $field_icon; |
|
1322 | - $field_icon = ''; |
|
1323 | - } |
|
1324 | - |
|
1325 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' geodir-custom-file-box ' . $cf['htmlvar_name'] . '"><div class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
1326 | - $html .= '<span style="display: inline-block; vertical-align: top; padding-right: 14px;">'; |
|
1327 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1328 | - $html .= '</span>'; |
|
1329 | - $html .= $file_paths . '</div></div>'; |
|
1330 | - |
|
1331 | - endif; |
|
1332 | - endif; |
|
1333 | - |
|
1334 | - } |
|
1335 | - |
|
1336 | - return $html; |
|
1213 | + // check we have the post value |
|
1214 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1215 | + else{ global $post;} |
|
1216 | + |
|
1217 | + if(!is_array($cf) && $cf!=''){ |
|
1218 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1219 | + if(!$cf){return NULL;} |
|
1220 | + } |
|
1221 | + |
|
1222 | + $html_var = $cf['htmlvar_name']; |
|
1223 | + |
|
1224 | + // Check if there is a location specific filter. |
|
1225 | + if(has_filter("geodir_custom_field_output_file_loc_{$location}")){ |
|
1226 | + /** |
|
1227 | + * Filter the file html by location. |
|
1228 | + * |
|
1229 | + * @param string $html The html to filter. |
|
1230 | + * @param array $cf The custom field array. |
|
1231 | + * @since 1.6.6 |
|
1232 | + */ |
|
1233 | + $html = apply_filters("geodir_custom_field_output_file_loc_{$location}",$html,$cf); |
|
1234 | + } |
|
1235 | + |
|
1236 | + // Check if there is a custom field specific filter. |
|
1237 | + if(has_filter("geodir_custom_field_output_file_var_{$html_var}")){ |
|
1238 | + /** |
|
1239 | + * Filter the file html by individual custom field. |
|
1240 | + * |
|
1241 | + * @param string $html The html to filter. |
|
1242 | + * @param string $location The location to output the html. |
|
1243 | + * @param array $cf The custom field array. |
|
1244 | + * @since 1.6.6 |
|
1245 | + */ |
|
1246 | + $html = apply_filters("geodir_custom_field_output_file_var_{$html_var}",$html,$location,$cf); |
|
1247 | + } |
|
1248 | + |
|
1249 | + // Check if there is a custom field key specific filter. |
|
1250 | + if(has_filter("geodir_custom_field_output_file_key_{$cf['field_type_key']}")){ |
|
1251 | + /** |
|
1252 | + * Filter the file html by field type key. |
|
1253 | + * |
|
1254 | + * @param string $html The html to filter. |
|
1255 | + * @param string $location The location to output the html. |
|
1256 | + * @param array $cf The custom field array. |
|
1257 | + * @since 1.6.6 |
|
1258 | + */ |
|
1259 | + $html = apply_filters("geodir_custom_field_output_file_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1260 | + } |
|
1261 | + |
|
1262 | + // If not html then we run the standard output. |
|
1263 | + if(empty($html)){ |
|
1264 | + |
|
1265 | + if (!empty($post->{$cf['htmlvar_name']})): |
|
1266 | + |
|
1267 | + $files = explode(",", $post->{$cf['htmlvar_name']}); |
|
1268 | + if (!empty($files)): |
|
1269 | + |
|
1270 | + $extra_fields = !empty($cf['extra_fields']) ? maybe_unserialize($cf['extra_fields']) : NULL; |
|
1271 | + $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? $extra_fields['gd_file_types'] : ''; |
|
1272 | + |
|
1273 | + $file_paths = ''; |
|
1274 | + foreach ($files as $file) { |
|
1275 | + if (!empty($file)) { |
|
1276 | + |
|
1277 | + // $filetype = wp_check_filetype($file); |
|
1278 | + |
|
1279 | + $image_name_arr = explode('/', $file); |
|
1280 | + $curr_img_dir = $image_name_arr[count($image_name_arr) - 2]; |
|
1281 | + $filename = end($image_name_arr); |
|
1282 | + $img_name_arr = explode('.', $filename); |
|
1283 | + |
|
1284 | + $arr_file_type = wp_check_filetype($filename); |
|
1285 | + if (empty($arr_file_type['ext']) || empty($arr_file_type['type'])) { |
|
1286 | + continue; |
|
1287 | + } |
|
1288 | + |
|
1289 | + $uploaded_file_type = $arr_file_type['type']; |
|
1290 | + $uploaded_file_ext = $arr_file_type['ext']; |
|
1291 | + |
|
1292 | + if (!empty($allowed_file_types) && !in_array($uploaded_file_ext, $allowed_file_types)) { |
|
1293 | + continue; // Invalid file type. |
|
1294 | + } |
|
1295 | + |
|
1296 | + //$allowed_file_types = array('application/pdf', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'text/csv', 'text/plain'); |
|
1297 | + $image_file_types = array('image/jpg', 'image/jpeg', 'image/gif', 'image/png', 'image/bmp', 'image/x-icon'); |
|
1298 | + |
|
1299 | + // If the uploaded file is image |
|
1300 | + if (in_array($uploaded_file_type, $image_file_types)) { |
|
1301 | + $file_paths .= '<div class="geodir-custom-post-gallery" class="clearfix">'; |
|
1302 | + $file_paths .= '<a href="'.$file.'">'; |
|
1303 | + $file_paths .= geodir_show_image(array('src' => $file), 'thumbnail', false, false); |
|
1304 | + $file_paths .= '</a>'; |
|
1305 | + //$file_paths .= '<img src="'.$file.'" />'; |
|
1306 | + $file_paths .= '</div>'; |
|
1307 | + } else { |
|
1308 | + $ext_path = '_' . $html_var . '_'; |
|
1309 | + $filename = explode($ext_path, $filename); |
|
1310 | + $file_paths .= '<a href="' . $file . '" target="_blank">' . $filename[count($filename) - 1] . '</a>'; |
|
1311 | + } |
|
1312 | + } |
|
1313 | + } |
|
1314 | + |
|
1315 | + $field_icon = geodir_field_icon_proccess($cf); |
|
1316 | + if (strpos($field_icon, 'http') !== false) { |
|
1317 | + $field_icon_af = ''; |
|
1318 | + } elseif ($field_icon == '') { |
|
1319 | + $field_icon_af = ''; |
|
1320 | + } else { |
|
1321 | + $field_icon_af = $field_icon; |
|
1322 | + $field_icon = ''; |
|
1323 | + } |
|
1324 | + |
|
1325 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' geodir-custom-file-box ' . $cf['htmlvar_name'] . '"><div class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
1326 | + $html .= '<span style="display: inline-block; vertical-align: top; padding-right: 14px;">'; |
|
1327 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1328 | + $html .= '</span>'; |
|
1329 | + $html .= $file_paths . '</div></div>'; |
|
1330 | + |
|
1331 | + endif; |
|
1332 | + endif; |
|
1333 | + |
|
1334 | + } |
|
1335 | + |
|
1336 | + return $html; |
|
1337 | 1337 | } |
1338 | 1338 | add_filter('geodir_custom_field_output_file','geodir_cf_file',10,3); |
1339 | 1339 | |
@@ -1351,80 +1351,80 @@ discard block |
||
1351 | 1351 | */ |
1352 | 1352 | function geodir_cf_textarea($html,$location,$cf,$p=''){ |
1353 | 1353 | |
1354 | - // check we have the post value |
|
1355 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1356 | - else{ global $post;} |
|
1357 | - |
|
1358 | - if(!is_array($cf) && $cf!=''){ |
|
1359 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1360 | - if(!$cf){return NULL;} |
|
1361 | - } |
|
1362 | - |
|
1363 | - $html_var = $cf['htmlvar_name']; |
|
1364 | - |
|
1365 | - // Check if there is a location specific filter. |
|
1366 | - if(has_filter("geodir_custom_field_output_textarea_loc_{$location}")){ |
|
1367 | - /** |
|
1368 | - * Filter the textarea html by location. |
|
1369 | - * |
|
1370 | - * @param string $html The html to filter. |
|
1371 | - * @param array $cf The custom field array. |
|
1372 | - * @since 1.6.6 |
|
1373 | - */ |
|
1374 | - $html = apply_filters("geodir_custom_field_output_textarea_loc_{$location}",$html,$cf); |
|
1375 | - } |
|
1376 | - |
|
1377 | - // Check if there is a custom field specific filter. |
|
1378 | - if(has_filter("geodir_custom_field_output_textarea_var_{$html_var}")){ |
|
1379 | - /** |
|
1380 | - * Filter the textarea html by individual custom field. |
|
1381 | - * |
|
1382 | - * @param string $html The html to filter. |
|
1383 | - * @param string $location The location to output the html. |
|
1384 | - * @param array $cf The custom field array. |
|
1385 | - * @since 1.6.6 |
|
1386 | - */ |
|
1387 | - $html = apply_filters("geodir_custom_field_output_textarea_var_{$html_var}",$html,$location,$cf); |
|
1388 | - } |
|
1389 | - |
|
1390 | - // Check if there is a custom field key specific filter. |
|
1391 | - if(has_filter("geodir_custom_field_output_textarea_key_{$cf['field_type_key']}")){ |
|
1392 | - /** |
|
1393 | - * Filter the textarea html by field type key. |
|
1394 | - * |
|
1395 | - * @param string $html The html to filter. |
|
1396 | - * @param string $location The location to output the html. |
|
1397 | - * @param array $cf The custom field array. |
|
1398 | - * @since 1.6.6 |
|
1399 | - */ |
|
1400 | - $html = apply_filters("geodir_custom_field_output_textarea_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1401 | - } |
|
1402 | - |
|
1403 | - // If not html then we run the standard output. |
|
1404 | - if(empty($html)){ |
|
1405 | - |
|
1406 | - if (!empty($post->{$cf['htmlvar_name']})) { |
|
1407 | - |
|
1408 | - $field_icon = geodir_field_icon_proccess($cf); |
|
1409 | - if (strpos($field_icon, 'http') !== false) { |
|
1410 | - $field_icon_af = ''; |
|
1411 | - } elseif ($field_icon == '') { |
|
1412 | - $field_icon_af = ''; |
|
1413 | - } else { |
|
1414 | - $field_icon_af = $field_icon; |
|
1415 | - $field_icon = ''; |
|
1416 | - } |
|
1417 | - |
|
1418 | - |
|
1419 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
1420 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1421 | - $html .= '</span>' . wpautop($post->{$cf['htmlvar_name']}) . '</div>'; |
|
1422 | - |
|
1423 | - } |
|
1424 | - |
|
1425 | - } |
|
1426 | - |
|
1427 | - return $html; |
|
1354 | + // check we have the post value |
|
1355 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1356 | + else{ global $post;} |
|
1357 | + |
|
1358 | + if(!is_array($cf) && $cf!=''){ |
|
1359 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1360 | + if(!$cf){return NULL;} |
|
1361 | + } |
|
1362 | + |
|
1363 | + $html_var = $cf['htmlvar_name']; |
|
1364 | + |
|
1365 | + // Check if there is a location specific filter. |
|
1366 | + if(has_filter("geodir_custom_field_output_textarea_loc_{$location}")){ |
|
1367 | + /** |
|
1368 | + * Filter the textarea html by location. |
|
1369 | + * |
|
1370 | + * @param string $html The html to filter. |
|
1371 | + * @param array $cf The custom field array. |
|
1372 | + * @since 1.6.6 |
|
1373 | + */ |
|
1374 | + $html = apply_filters("geodir_custom_field_output_textarea_loc_{$location}",$html,$cf); |
|
1375 | + } |
|
1376 | + |
|
1377 | + // Check if there is a custom field specific filter. |
|
1378 | + if(has_filter("geodir_custom_field_output_textarea_var_{$html_var}")){ |
|
1379 | + /** |
|
1380 | + * Filter the textarea html by individual custom field. |
|
1381 | + * |
|
1382 | + * @param string $html The html to filter. |
|
1383 | + * @param string $location The location to output the html. |
|
1384 | + * @param array $cf The custom field array. |
|
1385 | + * @since 1.6.6 |
|
1386 | + */ |
|
1387 | + $html = apply_filters("geodir_custom_field_output_textarea_var_{$html_var}",$html,$location,$cf); |
|
1388 | + } |
|
1389 | + |
|
1390 | + // Check if there is a custom field key specific filter. |
|
1391 | + if(has_filter("geodir_custom_field_output_textarea_key_{$cf['field_type_key']}")){ |
|
1392 | + /** |
|
1393 | + * Filter the textarea html by field type key. |
|
1394 | + * |
|
1395 | + * @param string $html The html to filter. |
|
1396 | + * @param string $location The location to output the html. |
|
1397 | + * @param array $cf The custom field array. |
|
1398 | + * @since 1.6.6 |
|
1399 | + */ |
|
1400 | + $html = apply_filters("geodir_custom_field_output_textarea_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1401 | + } |
|
1402 | + |
|
1403 | + // If not html then we run the standard output. |
|
1404 | + if(empty($html)){ |
|
1405 | + |
|
1406 | + if (!empty($post->{$cf['htmlvar_name']})) { |
|
1407 | + |
|
1408 | + $field_icon = geodir_field_icon_proccess($cf); |
|
1409 | + if (strpos($field_icon, 'http') !== false) { |
|
1410 | + $field_icon_af = ''; |
|
1411 | + } elseif ($field_icon == '') { |
|
1412 | + $field_icon_af = ''; |
|
1413 | + } else { |
|
1414 | + $field_icon_af = $field_icon; |
|
1415 | + $field_icon = ''; |
|
1416 | + } |
|
1417 | + |
|
1418 | + |
|
1419 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
1420 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1421 | + $html .= '</span>' . wpautop($post->{$cf['htmlvar_name']}) . '</div>'; |
|
1422 | + |
|
1423 | + } |
|
1424 | + |
|
1425 | + } |
|
1426 | + |
|
1427 | + return $html; |
|
1428 | 1428 | } |
1429 | 1429 | add_filter('geodir_custom_field_output_textarea','geodir_cf_textarea',10,3); |
1430 | 1430 | |
@@ -1442,79 +1442,79 @@ discard block |
||
1442 | 1442 | */ |
1443 | 1443 | function geodir_cf_html($html,$location,$cf,$p=''){ |
1444 | 1444 | |
1445 | - // check we have the post value |
|
1446 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1447 | - else{ global $post;} |
|
1448 | - |
|
1449 | - if(!is_array($cf) && $cf!=''){ |
|
1450 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1451 | - if(!$cf){return NULL;} |
|
1452 | - } |
|
1453 | - |
|
1454 | - $html_var = $cf['htmlvar_name']; |
|
1455 | - |
|
1456 | - // Check if there is a location specific filter. |
|
1457 | - if(has_filter("geodir_custom_field_output_html_loc_{$location}")){ |
|
1458 | - /** |
|
1459 | - * Filter the html html by location. |
|
1460 | - * |
|
1461 | - * @param string $html The html to filter. |
|
1462 | - * @param array $cf The custom field array. |
|
1463 | - * @since 1.6.6 |
|
1464 | - */ |
|
1465 | - $html = apply_filters("geodir_custom_field_output_html_loc_{$location}",$html,$cf); |
|
1466 | - } |
|
1467 | - |
|
1468 | - // Check if there is a custom field specific filter. |
|
1469 | - if(has_filter("geodir_custom_field_output_html_var_{$html_var}")){ |
|
1470 | - /** |
|
1471 | - * Filter the html html by individual custom field. |
|
1472 | - * |
|
1473 | - * @param string $html The html to filter. |
|
1474 | - * @param string $location The location to output the html. |
|
1475 | - * @param array $cf The custom field array. |
|
1476 | - * @since 1.6.6 |
|
1477 | - */ |
|
1478 | - $html = apply_filters("geodir_custom_field_output_html_var_{$html_var}",$html,$location,$cf); |
|
1479 | - } |
|
1480 | - |
|
1481 | - // Check if there is a custom field key specific filter. |
|
1482 | - if(has_filter("geodir_custom_field_output_html_key_{$cf['field_type_key']}")){ |
|
1483 | - /** |
|
1484 | - * Filter the html html by field type key. |
|
1485 | - * |
|
1486 | - * @param string $html The html to filter. |
|
1487 | - * @param string $location The location to output the html. |
|
1488 | - * @param array $cf The custom field array. |
|
1489 | - * @since 1.6.6 |
|
1490 | - */ |
|
1491 | - $html = apply_filters("geodir_custom_field_output_html_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1492 | - } |
|
1493 | - |
|
1494 | - // If not html then we run the standard output. |
|
1495 | - if(empty($html)){ |
|
1496 | - |
|
1497 | - if (!empty($post->{$cf['htmlvar_name']})) { |
|
1498 | - |
|
1499 | - $field_icon = geodir_field_icon_proccess($cf); |
|
1500 | - if (strpos($field_icon, 'http') !== false) { |
|
1501 | - $field_icon_af = ''; |
|
1502 | - } elseif ($field_icon == '') { |
|
1503 | - $field_icon_af = ''; |
|
1504 | - } else { |
|
1505 | - $field_icon_af = $field_icon; |
|
1506 | - $field_icon = ''; |
|
1507 | - } |
|
1508 | - |
|
1509 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
1510 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1511 | - $html .= '</span>' . wpautop($post->{$cf['htmlvar_name']}) . '</div>'; |
|
1512 | - |
|
1513 | - } |
|
1514 | - |
|
1515 | - } |
|
1516 | - |
|
1517 | - return $html; |
|
1445 | + // check we have the post value |
|
1446 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1447 | + else{ global $post;} |
|
1448 | + |
|
1449 | + if(!is_array($cf) && $cf!=''){ |
|
1450 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1451 | + if(!$cf){return NULL;} |
|
1452 | + } |
|
1453 | + |
|
1454 | + $html_var = $cf['htmlvar_name']; |
|
1455 | + |
|
1456 | + // Check if there is a location specific filter. |
|
1457 | + if(has_filter("geodir_custom_field_output_html_loc_{$location}")){ |
|
1458 | + /** |
|
1459 | + * Filter the html html by location. |
|
1460 | + * |
|
1461 | + * @param string $html The html to filter. |
|
1462 | + * @param array $cf The custom field array. |
|
1463 | + * @since 1.6.6 |
|
1464 | + */ |
|
1465 | + $html = apply_filters("geodir_custom_field_output_html_loc_{$location}",$html,$cf); |
|
1466 | + } |
|
1467 | + |
|
1468 | + // Check if there is a custom field specific filter. |
|
1469 | + if(has_filter("geodir_custom_field_output_html_var_{$html_var}")){ |
|
1470 | + /** |
|
1471 | + * Filter the html html by individual custom field. |
|
1472 | + * |
|
1473 | + * @param string $html The html to filter. |
|
1474 | + * @param string $location The location to output the html. |
|
1475 | + * @param array $cf The custom field array. |
|
1476 | + * @since 1.6.6 |
|
1477 | + */ |
|
1478 | + $html = apply_filters("geodir_custom_field_output_html_var_{$html_var}",$html,$location,$cf); |
|
1479 | + } |
|
1480 | + |
|
1481 | + // Check if there is a custom field key specific filter. |
|
1482 | + if(has_filter("geodir_custom_field_output_html_key_{$cf['field_type_key']}")){ |
|
1483 | + /** |
|
1484 | + * Filter the html html by field type key. |
|
1485 | + * |
|
1486 | + * @param string $html The html to filter. |
|
1487 | + * @param string $location The location to output the html. |
|
1488 | + * @param array $cf The custom field array. |
|
1489 | + * @since 1.6.6 |
|
1490 | + */ |
|
1491 | + $html = apply_filters("geodir_custom_field_output_html_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1492 | + } |
|
1493 | + |
|
1494 | + // If not html then we run the standard output. |
|
1495 | + if(empty($html)){ |
|
1496 | + |
|
1497 | + if (!empty($post->{$cf['htmlvar_name']})) { |
|
1498 | + |
|
1499 | + $field_icon = geodir_field_icon_proccess($cf); |
|
1500 | + if (strpos($field_icon, 'http') !== false) { |
|
1501 | + $field_icon_af = ''; |
|
1502 | + } elseif ($field_icon == '') { |
|
1503 | + $field_icon_af = ''; |
|
1504 | + } else { |
|
1505 | + $field_icon_af = $field_icon; |
|
1506 | + $field_icon = ''; |
|
1507 | + } |
|
1508 | + |
|
1509 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
1510 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1511 | + $html .= '</span>' . wpautop($post->{$cf['htmlvar_name']}) . '</div>'; |
|
1512 | + |
|
1513 | + } |
|
1514 | + |
|
1515 | + } |
|
1516 | + |
|
1517 | + return $html; |
|
1518 | 1518 | } |
1519 | 1519 | add_filter('geodir_custom_field_output_html','geodir_cf_html',10,3); |
1520 | 1520 | |
@@ -1532,113 +1532,113 @@ discard block |
||
1532 | 1532 | */ |
1533 | 1533 | function geodir_cf_taxonomy($html,$location,$cf,$p=''){ |
1534 | 1534 | |
1535 | - // check we have the post value |
|
1536 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1537 | - else{ global $post;} |
|
1538 | - |
|
1539 | - if(!is_array($cf) && $cf!=''){ |
|
1540 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1541 | - if(!$cf){return NULL;} |
|
1542 | - } |
|
1543 | - |
|
1544 | - $html_var = $cf['htmlvar_name']; |
|
1545 | - |
|
1546 | - // Check if there is a location specific filter. |
|
1547 | - if(has_filter("geodir_custom_field_output_taxonomy_loc_{$location}")){ |
|
1548 | - /** |
|
1549 | - * Filter the taxonomy html by location. |
|
1550 | - * |
|
1551 | - * @param string $html The html to filter. |
|
1552 | - * @param array $cf The custom field array. |
|
1553 | - * @since 1.6.6 |
|
1554 | - */ |
|
1555 | - $html = apply_filters("geodir_custom_field_output_taxonomy_loc_{$location}",$html,$cf); |
|
1556 | - } |
|
1557 | - |
|
1558 | - // Check if there is a custom field specific filter. |
|
1559 | - if(has_filter("geodir_custom_field_output_taxonomy_var_{$html_var}")){ |
|
1560 | - /** |
|
1561 | - * Filter the taxonomy html by individual custom field. |
|
1562 | - * |
|
1563 | - * @param string $html The html to filter. |
|
1564 | - * @param string $location The location to output the html. |
|
1565 | - * @param array $cf The custom field array. |
|
1566 | - * @since 1.6.6 |
|
1567 | - */ |
|
1568 | - $html = apply_filters("geodir_custom_field_output_taxonomy_var_{$html_var}",$html,$location,$cf); |
|
1569 | - } |
|
1570 | - |
|
1571 | - // Check if there is a custom field key specific filter. |
|
1572 | - if(has_filter("geodir_custom_field_output_taxonomy_key_{$cf['field_type_key']}")){ |
|
1573 | - /** |
|
1574 | - * Filter the taxonomy html by field type key. |
|
1575 | - * |
|
1576 | - * @param string $html The html to filter. |
|
1577 | - * @param string $location The location to output the html. |
|
1578 | - * @param array $cf The custom field array. |
|
1579 | - * @since 1.6.6 |
|
1580 | - */ |
|
1581 | - $html = apply_filters("geodir_custom_field_output_taxonomy_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1582 | - } |
|
1583 | - |
|
1584 | - // If not html then we run the standard output. |
|
1585 | - if(empty($html)){ |
|
1586 | - |
|
1587 | - if ($html_var == $post->post_type . 'category' && !empty($post->{$html_var})) { |
|
1588 | - $post_taxonomy = $post->post_type . 'category'; |
|
1589 | - $field_value = $post->{$html_var}; |
|
1590 | - $links = array(); |
|
1591 | - $terms = array(); |
|
1592 | - $termsOrdered = array(); |
|
1593 | - if (!is_array($field_value)) { |
|
1594 | - $field_value = explode(",", trim($field_value, ",")); |
|
1595 | - } |
|
1596 | - |
|
1597 | - $field_value = array_unique($field_value); |
|
1598 | - |
|
1599 | - if (!empty($field_value)) { |
|
1600 | - foreach ($field_value as $term) { |
|
1601 | - $term = trim($term); |
|
1602 | - |
|
1603 | - if ($term != '') { |
|
1604 | - $term = get_term_by('id', $term, $html_var); |
|
1605 | - if (is_object($term)) { |
|
1606 | - $links[] = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>" . $term->name . "</a>"; |
|
1607 | - $terms[] = $term; |
|
1608 | - } |
|
1609 | - } |
|
1610 | - } |
|
1611 | - if (!empty($links)) { |
|
1612 | - // order alphabetically |
|
1613 | - asort($links); |
|
1614 | - foreach (array_keys($links) as $key) { |
|
1615 | - $termsOrdered[$key] = $terms[$key]; |
|
1616 | - } |
|
1617 | - $terms = $termsOrdered; |
|
1618 | - } |
|
1619 | - } |
|
1620 | - $html_value = !empty($links) && !empty($terms) ? wp_sprintf('%l', $links, (object)$terms) : ''; |
|
1621 | - |
|
1622 | - if ($html_value != '') { |
|
1623 | - $field_icon = geodir_field_icon_proccess($cf); |
|
1624 | - if (strpos($field_icon, 'http') !== false) { |
|
1625 | - $field_icon_af = ''; |
|
1626 | - } else if ($field_icon == '') { |
|
1627 | - $field_icon_af = ''; |
|
1628 | - } else { |
|
1629 | - $field_icon_af = $field_icon; |
|
1630 | - $field_icon = ''; |
|
1631 | - } |
|
1632 | - |
|
1633 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $html_var . '" style="clear:both;"><span class="geodir-i-taxonomy geodir-i-category" style="' . $field_icon . '">' . $field_icon_af; |
|
1634 | - $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1635 | - $html .= '</span> ' . $html_value . '</div>'; |
|
1636 | - } |
|
1637 | - } |
|
1638 | - |
|
1639 | - } |
|
1640 | - |
|
1641 | - return $html; |
|
1535 | + // check we have the post value |
|
1536 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1537 | + else{ global $post;} |
|
1538 | + |
|
1539 | + if(!is_array($cf) && $cf!=''){ |
|
1540 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1541 | + if(!$cf){return NULL;} |
|
1542 | + } |
|
1543 | + |
|
1544 | + $html_var = $cf['htmlvar_name']; |
|
1545 | + |
|
1546 | + // Check if there is a location specific filter. |
|
1547 | + if(has_filter("geodir_custom_field_output_taxonomy_loc_{$location}")){ |
|
1548 | + /** |
|
1549 | + * Filter the taxonomy html by location. |
|
1550 | + * |
|
1551 | + * @param string $html The html to filter. |
|
1552 | + * @param array $cf The custom field array. |
|
1553 | + * @since 1.6.6 |
|
1554 | + */ |
|
1555 | + $html = apply_filters("geodir_custom_field_output_taxonomy_loc_{$location}",$html,$cf); |
|
1556 | + } |
|
1557 | + |
|
1558 | + // Check if there is a custom field specific filter. |
|
1559 | + if(has_filter("geodir_custom_field_output_taxonomy_var_{$html_var}")){ |
|
1560 | + /** |
|
1561 | + * Filter the taxonomy html by individual custom field. |
|
1562 | + * |
|
1563 | + * @param string $html The html to filter. |
|
1564 | + * @param string $location The location to output the html. |
|
1565 | + * @param array $cf The custom field array. |
|
1566 | + * @since 1.6.6 |
|
1567 | + */ |
|
1568 | + $html = apply_filters("geodir_custom_field_output_taxonomy_var_{$html_var}",$html,$location,$cf); |
|
1569 | + } |
|
1570 | + |
|
1571 | + // Check if there is a custom field key specific filter. |
|
1572 | + if(has_filter("geodir_custom_field_output_taxonomy_key_{$cf['field_type_key']}")){ |
|
1573 | + /** |
|
1574 | + * Filter the taxonomy html by field type key. |
|
1575 | + * |
|
1576 | + * @param string $html The html to filter. |
|
1577 | + * @param string $location The location to output the html. |
|
1578 | + * @param array $cf The custom field array. |
|
1579 | + * @since 1.6.6 |
|
1580 | + */ |
|
1581 | + $html = apply_filters("geodir_custom_field_output_taxonomy_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1582 | + } |
|
1583 | + |
|
1584 | + // If not html then we run the standard output. |
|
1585 | + if(empty($html)){ |
|
1586 | + |
|
1587 | + if ($html_var == $post->post_type . 'category' && !empty($post->{$html_var})) { |
|
1588 | + $post_taxonomy = $post->post_type . 'category'; |
|
1589 | + $field_value = $post->{$html_var}; |
|
1590 | + $links = array(); |
|
1591 | + $terms = array(); |
|
1592 | + $termsOrdered = array(); |
|
1593 | + if (!is_array($field_value)) { |
|
1594 | + $field_value = explode(",", trim($field_value, ",")); |
|
1595 | + } |
|
1596 | + |
|
1597 | + $field_value = array_unique($field_value); |
|
1598 | + |
|
1599 | + if (!empty($field_value)) { |
|
1600 | + foreach ($field_value as $term) { |
|
1601 | + $term = trim($term); |
|
1602 | + |
|
1603 | + if ($term != '') { |
|
1604 | + $term = get_term_by('id', $term, $html_var); |
|
1605 | + if (is_object($term)) { |
|
1606 | + $links[] = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>" . $term->name . "</a>"; |
|
1607 | + $terms[] = $term; |
|
1608 | + } |
|
1609 | + } |
|
1610 | + } |
|
1611 | + if (!empty($links)) { |
|
1612 | + // order alphabetically |
|
1613 | + asort($links); |
|
1614 | + foreach (array_keys($links) as $key) { |
|
1615 | + $termsOrdered[$key] = $terms[$key]; |
|
1616 | + } |
|
1617 | + $terms = $termsOrdered; |
|
1618 | + } |
|
1619 | + } |
|
1620 | + $html_value = !empty($links) && !empty($terms) ? wp_sprintf('%l', $links, (object)$terms) : ''; |
|
1621 | + |
|
1622 | + if ($html_value != '') { |
|
1623 | + $field_icon = geodir_field_icon_proccess($cf); |
|
1624 | + if (strpos($field_icon, 'http') !== false) { |
|
1625 | + $field_icon_af = ''; |
|
1626 | + } else if ($field_icon == '') { |
|
1627 | + $field_icon_af = ''; |
|
1628 | + } else { |
|
1629 | + $field_icon_af = $field_icon; |
|
1630 | + $field_icon = ''; |
|
1631 | + } |
|
1632 | + |
|
1633 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $html_var . '" style="clear:both;"><span class="geodir-i-taxonomy geodir-i-category" style="' . $field_icon . '">' . $field_icon_af; |
|
1634 | + $html .= (trim($cf['site_title'])) ? __($cf['site_title'], 'geodirectory') . ': ' : ''; |
|
1635 | + $html .= '</span> ' . $html_value . '</div>'; |
|
1636 | + } |
|
1637 | + } |
|
1638 | + |
|
1639 | + } |
|
1640 | + |
|
1641 | + return $html; |
|
1642 | 1642 | } |
1643 | 1643 | add_filter('geodir_custom_field_output_taxonomy','geodir_cf_taxonomy',10,3); |
1644 | 1644 | |
@@ -1655,162 +1655,162 @@ discard block |
||
1655 | 1655 | */ |
1656 | 1656 | function geodir_cf_address($html,$location,$cf,$p=''){ |
1657 | 1657 | |
1658 | - // check we have the post value |
|
1659 | - if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1660 | - else{ global $post;} |
|
1661 | - |
|
1662 | - if(!is_array($cf) && $cf!=''){ |
|
1663 | - $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1664 | - if(!$cf){return NULL;} |
|
1665 | - } |
|
1666 | - |
|
1667 | - $html_var = $cf['htmlvar_name']; |
|
1668 | - |
|
1669 | - // Check if there is a location specific filter. |
|
1670 | - if(has_filter("geodir_custom_field_output_address_loc_{$location}")){ |
|
1671 | - /** |
|
1672 | - * Filter the address html by location. |
|
1673 | - * |
|
1674 | - * @param string $html The html to filter. |
|
1675 | - * @param array $cf The custom field array. |
|
1676 | - * @since 1.6.6 |
|
1677 | - */ |
|
1678 | - $html = apply_filters("geodir_custom_field_output_address_loc_{$location}",$html,$cf); |
|
1679 | - } |
|
1680 | - |
|
1681 | - // Check if there is a custom field specific filter. |
|
1682 | - if(has_filter("geodir_custom_field_output_address_var_{$html_var}")){ |
|
1683 | - /** |
|
1684 | - * Filter the address html by individual custom field. |
|
1685 | - * |
|
1686 | - * @param string $html The html to filter. |
|
1687 | - * @param string $location The location to output the html. |
|
1688 | - * @param array $cf The custom field array. |
|
1689 | - * @since 1.6.6 |
|
1690 | - */ |
|
1691 | - $html = apply_filters("geodir_custom_field_output_address_var_{$html_var}",$html,$location,$cf); |
|
1692 | - } |
|
1693 | - |
|
1694 | - // Check if there is a custom field key specific filter. |
|
1695 | - if(has_filter("geodir_custom_field_output_address_key_{$cf['field_type_key']}")){ |
|
1696 | - /** |
|
1697 | - * Filter the address html by field type key. |
|
1698 | - * |
|
1699 | - * @param string $html The html to filter. |
|
1700 | - * @param string $location The location to output the html. |
|
1701 | - * @param array $cf The custom field array. |
|
1702 | - * @since 1.6.6 |
|
1703 | - */ |
|
1704 | - $html = apply_filters("geodir_custom_field_output_address_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1705 | - } |
|
1706 | - |
|
1707 | - // If not html then we run the standard output. |
|
1708 | - if(empty($html)){ |
|
1709 | - |
|
1710 | - global $preview; |
|
1711 | - $html_var = $cf['htmlvar_name'] . '_address'; |
|
1712 | - |
|
1713 | - if ($cf['extra_fields']) { |
|
1714 | - |
|
1715 | - $extra_fields = unserialize($cf['extra_fields']); |
|
1716 | - |
|
1717 | - $addition_fields = ''; |
|
1718 | - |
|
1719 | - if (!empty($extra_fields)) { |
|
1720 | - |
|
1721 | - $show_city_in_address = false; |
|
1722 | - if (isset($extra_fields['show_city']) && $extra_fields['show_city']) { |
|
1723 | - $show_city_in_address = true; |
|
1724 | - } |
|
1725 | - /** |
|
1726 | - * Filter "show city in address" value. |
|
1727 | - * |
|
1728 | - * @since 1.0.0 |
|
1729 | - */ |
|
1730 | - $show_city_in_address = apply_filters('geodir_show_city_in_address', $show_city_in_address); |
|
1731 | - |
|
1732 | - |
|
1733 | - $show_region_in_address = false; |
|
1734 | - if (isset($extra_fields['show_region']) && $extra_fields['show_region']) { |
|
1735 | - $show_region_in_address = true; |
|
1736 | - } |
|
1737 | - /** |
|
1738 | - * Filter "show region in address" value. |
|
1739 | - * |
|
1740 | - * @since 1.6.6 |
|
1741 | - */ |
|
1742 | - $show_region_in_address = apply_filters('geodir_show_region_in_address', $show_region_in_address); |
|
1743 | - |
|
1744 | - $show_country_in_address = false; |
|
1745 | - if (isset($extra_fields['show_country']) && $extra_fields['show_country']) { |
|
1746 | - $show_country_in_address = true; |
|
1747 | - } |
|
1748 | - /** |
|
1749 | - * Filter "show country in address" value. |
|
1750 | - * |
|
1751 | - * @since 1.6.6 |
|
1752 | - */ |
|
1753 | - $show_country_in_address = apply_filters('geodir_show_country_in_address', $show_country_in_address); |
|
1754 | - |
|
1755 | - $show_zip_in_address = false; |
|
1756 | - if (isset($extra_fields['show_zip']) && $extra_fields['show_zip']) { |
|
1757 | - $show_zip_in_address = true; |
|
1758 | - } |
|
1759 | - /** |
|
1760 | - * Filter "show zip in address" value. |
|
1761 | - * |
|
1762 | - * @since 1.6.6 |
|
1763 | - */ |
|
1764 | - $show_zip_in_address = apply_filters('geodir_show_zip_in_address', $show_zip_in_address); |
|
1765 | - |
|
1766 | - |
|
1767 | - } |
|
1768 | - |
|
1769 | - } |
|
1770 | - |
|
1771 | - |
|
1772 | - if ($post->{$html_var}) { |
|
1773 | - |
|
1774 | - $field_icon = geodir_field_icon_proccess( $cf ); |
|
1775 | - if ( strpos( $field_icon, 'http' ) !== false ) { |
|
1776 | - $field_icon_af = ''; |
|
1777 | - } elseif ( $field_icon == '' ) { |
|
1778 | - $field_icon_af = '<i class="fa fa-home"></i>'; |
|
1779 | - } else { |
|
1780 | - $field_icon_af = $field_icon; |
|
1781 | - $field_icon = ''; |
|
1782 | - } |
|
1658 | + // check we have the post value |
|
1659 | + if(is_int($p)){$post = geodir_get_post_info($p);} |
|
1660 | + else{ global $post;} |
|
1661 | + |
|
1662 | + if(!is_array($cf) && $cf!=''){ |
|
1663 | + $cf = geodir_get_field_infoby('htmlvar_name', $cf, $post->post_type); |
|
1664 | + if(!$cf){return NULL;} |
|
1665 | + } |
|
1666 | + |
|
1667 | + $html_var = $cf['htmlvar_name']; |
|
1668 | + |
|
1669 | + // Check if there is a location specific filter. |
|
1670 | + if(has_filter("geodir_custom_field_output_address_loc_{$location}")){ |
|
1671 | + /** |
|
1672 | + * Filter the address html by location. |
|
1673 | + * |
|
1674 | + * @param string $html The html to filter. |
|
1675 | + * @param array $cf The custom field array. |
|
1676 | + * @since 1.6.6 |
|
1677 | + */ |
|
1678 | + $html = apply_filters("geodir_custom_field_output_address_loc_{$location}",$html,$cf); |
|
1679 | + } |
|
1680 | + |
|
1681 | + // Check if there is a custom field specific filter. |
|
1682 | + if(has_filter("geodir_custom_field_output_address_var_{$html_var}")){ |
|
1683 | + /** |
|
1684 | + * Filter the address html by individual custom field. |
|
1685 | + * |
|
1686 | + * @param string $html The html to filter. |
|
1687 | + * @param string $location The location to output the html. |
|
1688 | + * @param array $cf The custom field array. |
|
1689 | + * @since 1.6.6 |
|
1690 | + */ |
|
1691 | + $html = apply_filters("geodir_custom_field_output_address_var_{$html_var}",$html,$location,$cf); |
|
1692 | + } |
|
1693 | + |
|
1694 | + // Check if there is a custom field key specific filter. |
|
1695 | + if(has_filter("geodir_custom_field_output_address_key_{$cf['field_type_key']}")){ |
|
1696 | + /** |
|
1697 | + * Filter the address html by field type key. |
|
1698 | + * |
|
1699 | + * @param string $html The html to filter. |
|
1700 | + * @param string $location The location to output the html. |
|
1701 | + * @param array $cf The custom field array. |
|
1702 | + * @since 1.6.6 |
|
1703 | + */ |
|
1704 | + $html = apply_filters("geodir_custom_field_output_address_key_{$cf['field_type_key']}",$html,$location,$cf); |
|
1705 | + } |
|
1706 | + |
|
1707 | + // If not html then we run the standard output. |
|
1708 | + if(empty($html)){ |
|
1709 | + |
|
1710 | + global $preview; |
|
1711 | + $html_var = $cf['htmlvar_name'] . '_address'; |
|
1712 | + |
|
1713 | + if ($cf['extra_fields']) { |
|
1714 | + |
|
1715 | + $extra_fields = unserialize($cf['extra_fields']); |
|
1716 | + |
|
1717 | + $addition_fields = ''; |
|
1718 | + |
|
1719 | + if (!empty($extra_fields)) { |
|
1720 | + |
|
1721 | + $show_city_in_address = false; |
|
1722 | + if (isset($extra_fields['show_city']) && $extra_fields['show_city']) { |
|
1723 | + $show_city_in_address = true; |
|
1724 | + } |
|
1725 | + /** |
|
1726 | + * Filter "show city in address" value. |
|
1727 | + * |
|
1728 | + * @since 1.0.0 |
|
1729 | + */ |
|
1730 | + $show_city_in_address = apply_filters('geodir_show_city_in_address', $show_city_in_address); |
|
1731 | + |
|
1732 | + |
|
1733 | + $show_region_in_address = false; |
|
1734 | + if (isset($extra_fields['show_region']) && $extra_fields['show_region']) { |
|
1735 | + $show_region_in_address = true; |
|
1736 | + } |
|
1737 | + /** |
|
1738 | + * Filter "show region in address" value. |
|
1739 | + * |
|
1740 | + * @since 1.6.6 |
|
1741 | + */ |
|
1742 | + $show_region_in_address = apply_filters('geodir_show_region_in_address', $show_region_in_address); |
|
1743 | + |
|
1744 | + $show_country_in_address = false; |
|
1745 | + if (isset($extra_fields['show_country']) && $extra_fields['show_country']) { |
|
1746 | + $show_country_in_address = true; |
|
1747 | + } |
|
1748 | + /** |
|
1749 | + * Filter "show country in address" value. |
|
1750 | + * |
|
1751 | + * @since 1.6.6 |
|
1752 | + */ |
|
1753 | + $show_country_in_address = apply_filters('geodir_show_country_in_address', $show_country_in_address); |
|
1754 | + |
|
1755 | + $show_zip_in_address = false; |
|
1756 | + if (isset($extra_fields['show_zip']) && $extra_fields['show_zip']) { |
|
1757 | + $show_zip_in_address = true; |
|
1758 | + } |
|
1759 | + /** |
|
1760 | + * Filter "show zip in address" value. |
|
1761 | + * |
|
1762 | + * @since 1.6.6 |
|
1763 | + */ |
|
1764 | + $show_zip_in_address = apply_filters('geodir_show_zip_in_address', $show_zip_in_address); |
|
1765 | + |
|
1766 | + |
|
1767 | + } |
|
1768 | + |
|
1769 | + } |
|
1770 | + |
|
1771 | + |
|
1772 | + if ($post->{$html_var}) { |
|
1773 | + |
|
1774 | + $field_icon = geodir_field_icon_proccess( $cf ); |
|
1775 | + if ( strpos( $field_icon, 'http' ) !== false ) { |
|
1776 | + $field_icon_af = ''; |
|
1777 | + } elseif ( $field_icon == '' ) { |
|
1778 | + $field_icon_af = '<i class="fa fa-home"></i>'; |
|
1779 | + } else { |
|
1780 | + $field_icon_af = $field_icon; |
|
1781 | + $field_icon = ''; |
|
1782 | + } |
|
1783 | 1783 | |
1784 | 1784 | |
1785 | 1785 | |
1786 | - $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $html_var . '" style="clear:both;" itemscope itemtype="http://schema.org/PostalAddress">'; |
|
1787 | - $html .= '<span class="geodir-i-location" style="' . $field_icon . '">' . $field_icon_af; |
|
1788 | - $html .= ( trim( $cf['site_title'] ) ) ? __( $cf['site_title'], 'geodirectory' ) . ': ' : ' '; |
|
1789 | - $html .= '</span>'; |
|
1786 | + $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $html_var . '" style="clear:both;" itemscope itemtype="http://schema.org/PostalAddress">'; |
|
1787 | + $html .= '<span class="geodir-i-location" style="' . $field_icon . '">' . $field_icon_af; |
|
1788 | + $html .= ( trim( $cf['site_title'] ) ) ? __( $cf['site_title'], 'geodirectory' ) . ': ' : ' '; |
|
1789 | + $html .= '</span>'; |
|
1790 | 1790 | |
1791 | 1791 | |
1792 | - if ( $post->post_address ) { |
|
1793 | - $html .= '<span itemprop="streetAddress">' . $post->post_address . '</span><br>'; |
|
1794 | - } |
|
1795 | - if ($show_city_in_address && $post->post_city ) { |
|
1796 | - $html .= '<span itemprop="addressLocality">' . $post->post_city . '</span><br>'; |
|
1797 | - } |
|
1798 | - if ($show_region_in_address && $post->post_region ) { |
|
1799 | - $html .= '<span itemprop="addressRegion">' . $post->post_region . '</span><br>'; |
|
1800 | - } |
|
1801 | - if ($show_zip_in_address && $post->post_zip ) { |
|
1802 | - $html .= '<span itemprop="postalCode">' . $post->post_zip . '</span><br>'; |
|
1803 | - } |
|
1804 | - if ($show_country_in_address && $post->post_country ) { |
|
1805 | - $html .= '<span itemprop="addressCountry">' . __( $post->post_country, 'geodirectory' ) . '</span><br>'; |
|
1806 | - } |
|
1807 | - $html .= '</div>'; |
|
1792 | + if ( $post->post_address ) { |
|
1793 | + $html .= '<span itemprop="streetAddress">' . $post->post_address . '</span><br>'; |
|
1794 | + } |
|
1795 | + if ($show_city_in_address && $post->post_city ) { |
|
1796 | + $html .= '<span itemprop="addressLocality">' . $post->post_city . '</span><br>'; |
|
1797 | + } |
|
1798 | + if ($show_region_in_address && $post->post_region ) { |
|
1799 | + $html .= '<span itemprop="addressRegion">' . $post->post_region . '</span><br>'; |
|
1800 | + } |
|
1801 | + if ($show_zip_in_address && $post->post_zip ) { |
|
1802 | + $html .= '<span itemprop="postalCode">' . $post->post_zip . '</span><br>'; |
|
1803 | + } |
|
1804 | + if ($show_country_in_address && $post->post_country ) { |
|
1805 | + $html .= '<span itemprop="addressCountry">' . __( $post->post_country, 'geodirectory' ) . '</span><br>'; |
|
1806 | + } |
|
1807 | + $html .= '</div>'; |
|
1808 | 1808 | |
1809 | - } |
|
1809 | + } |
|
1810 | 1810 | |
1811 | - } |
|
1811 | + } |
|
1812 | 1812 | |
1813 | 1813 | |
1814 | - return $html; |
|
1814 | + return $html; |
|
1815 | 1815 | } |
1816 | 1816 | add_filter('geodir_custom_field_output_address','geodir_cf_address',10,3); |
1817 | 1817 | \ No newline at end of file |