@@ -223,10 +223,11 @@ discard block |
||
223 | 223 | <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/> |
224 | 224 | <?php } |
225 | 225 | |
226 | - if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) |
|
227 | - $show_entire_cat_panel = "none"; |
|
228 | - else |
|
229 | - $show_entire_cat_panel = "''"; |
|
226 | + if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) { |
|
227 | + $show_entire_cat_panel = "none"; |
|
228 | + } else { |
|
229 | + $show_entire_cat_panel = "''"; |
|
230 | + } |
|
230 | 231 | ?> |
231 | 232 | |
232 | 233 | <?php if ($geodir_map_options['enable_map_direction']) { ?> |
@@ -288,8 +289,9 @@ discard block |
||
288 | 289 | } |
289 | 290 | |
290 | 291 | $geodir_default_map_search_pt = get_option('geodir_default_map_search_pt'); |
291 | - if (empty($geodir_default_map_search_pt)) |
|
292 | - $geodir_default_map_search_pt = 'gd_place'; |
|
292 | + if (empty($geodir_default_map_search_pt)) { |
|
293 | + $geodir_default_map_search_pt = 'gd_place'; |
|
294 | + } |
|
293 | 295 | |
294 | 296 | /** |
295 | 297 | * Filter the post type to retrive data for map |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | */ |
167 | 167 | $exclude_post_types = apply_filters("geodir_exclude_post_type_on_map_{$map_canvas_name}", get_option('geodir_exclude_post_type_on_map')); |
168 | 168 | |
169 | - if (count((array)$post_types) != count($exclude_post_types) || ($enable_jason_on_load)): |
|
169 | + if (count((array) $post_types) != count($exclude_post_types) || ($enable_jason_on_load)): |
|
170 | 170 | // Set default map options |
171 | 171 | |
172 | - wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js',array(),false,true); |
|
172 | + wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js', array(), false, true); |
|
173 | 173 | |
174 | 174 | wp_localize_script('geodir-map-widget', $map_canvas_name, $geodir_map_options); |
175 | 175 | |
@@ -188,39 +188,39 @@ discard block |
||
188 | 188 | */ |
189 | 189 | $map_width = apply_filters('geodir_change_map_width', $map_width); |
190 | 190 | ?> |
191 | - <div id="catcher_<?php echo $map_canvas_name;?>"></div> |
|
191 | + <div id="catcher_<?php echo $map_canvas_name; ?>"></div> |
|
192 | 192 | <div class="stick_trigger_container"> |
193 | 193 | <div class="trigger_sticky triggeroff_sticky"></div> |
194 | - <div class="top_banner_section geodir_map_container <?php echo $map_class_name;?>" |
|
195 | - id="sticky_map_<?php echo $map_canvas_name;?>" |
|
196 | - style="min-height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;"> |
|
194 | + <div class="top_banner_section geodir_map_container <?php echo $map_class_name; ?>" |
|
195 | + id="sticky_map_<?php echo $map_canvas_name; ?>" |
|
196 | + style="min-height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;"> |
|
197 | 197 | |
198 | 198 | <div class="map_background"> |
199 | 199 | <div class="top_banner_section_in clearfix"> |
200 | - <div class="<?php echo $map_canvas_name;?>_TopLeft TopLeft"><span class="triggermap" id="<?php echo $map_canvas_name;?>_triggermap" <?php if (!$geodir_map_options['enable_map_resize_button']) { ?> <?php }?>><i class="fa fa-arrows-alt"></i></span></div> |
|
201 | - <div class="<?php echo $map_canvas_name;?>_TopRight TopRight"></div> |
|
202 | - <div id="<?php echo $map_canvas_name;?>_wrapper" class="main_map_wrapper" |
|
203 | - style="height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;"> |
|
200 | + <div class="<?php echo $map_canvas_name; ?>_TopLeft TopLeft"><span class="triggermap" id="<?php echo $map_canvas_name; ?>_triggermap" <?php if (!$geodir_map_options['enable_map_resize_button']) { ?> <?php }?>><i class="fa fa-arrows-alt"></i></span></div> |
|
201 | + <div class="<?php echo $map_canvas_name; ?>_TopRight TopRight"></div> |
|
202 | + <div id="<?php echo $map_canvas_name; ?>_wrapper" class="main_map_wrapper" |
|
203 | + style="height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;"> |
|
204 | 204 | <!-- new map start --> |
205 | 205 | <div class="iprelative"> |
206 | - <div class="geodir_marker_cluster" id="<?php echo $map_canvas_name;?>" |
|
207 | - style="height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;"></div> |
|
208 | - <div id="<?php echo $map_canvas_name;?>_loading_div" class="loading_div" |
|
209 | - style=" height:<?php echo $geodir_map_options['height'];?>;width:<?php echo $map_width;?>;"></div> |
|
206 | + <div class="geodir_marker_cluster" id="<?php echo $map_canvas_name; ?>" |
|
207 | + style="height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;"></div> |
|
208 | + <div id="<?php echo $map_canvas_name; ?>_loading_div" class="loading_div" |
|
209 | + style=" height:<?php echo $geodir_map_options['height']; ?>;width:<?php echo $map_width; ?>;"></div> |
|
210 | 210 | <!--<div id="home_map_counter"></div> --> |
211 | - <div id="<?php echo $map_canvas_name;?>_map_nofound" |
|
211 | + <div id="<?php echo $map_canvas_name; ?>_map_nofound" |
|
212 | 212 | class="advmap_nofound"><?php echo MAP_NO_RESULTS; ?></div> |
213 | 213 | </div> |
214 | 214 | <!-- new map end --> |
215 | 215 | </div> |
216 | - <div class="<?php echo $map_canvas_name;?>_BottomLeft BottomLeft"></div> |
|
216 | + <div class="<?php echo $map_canvas_name; ?>_BottomLeft BottomLeft"></div> |
|
217 | 217 | </div> |
218 | 218 | </div> |
219 | 219 | <?php if ($geodir_map_options['enable_jason_on_load']) { ?> |
220 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="1"/> |
|
220 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_jason_enabled" value="1"/> |
|
221 | 221 | <?php } else { |
222 | 222 | ?> |
223 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/> |
|
223 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_jason_enabled" value="0"/> |
|
224 | 224 | <?php } |
225 | 225 | |
226 | 226 | if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | onclick="calcRoute('<?php echo $map_canvas_name; ?>')"/> |
241 | 241 | |
242 | 242 | <script> |
243 | - <?php if(geodir_is_page('detail')){?> |
|
243 | + <?php if (geodir_is_page('detail')) {?> |
|
244 | 244 | jQuery(function () { |
245 | 245 | gd_initialize_ac(); |
246 | 246 | }); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | // Create the autocomplete object, restricting the search |
251 | 251 | // to geographical location types. |
252 | 252 | autocomplete = new google.maps.places.Autocomplete( |
253 | - /** @type {HTMLInputElement} */(document.getElementById('<?php echo $map_canvas_name;?>_fromAddress')), |
|
253 | + /** @type {HTMLInputElement} */(document.getElementById('<?php echo $map_canvas_name; ?>_fromAddress')), |
|
254 | 254 | {types: ['geocode']}); |
255 | 255 | // When the user selects an address from the dropdown, |
256 | 256 | // populate the address fields in the form. |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | $map_search_pt = apply_filters('geodir_default_map_search_pt', $geodir_default_map_search_pt); |
302 | 302 | ?> |
303 | - <div class="map-category-listing-main" style="display:<?php echo $show_entire_cat_panel;?>"> |
|
303 | + <div class="map-category-listing-main" style="display:<?php echo $show_entire_cat_panel; ?>"> |
|
304 | 304 | <?php |
305 | 305 | $exclude_post_types = get_option('geodir_exclude_post_type_on_map'); |
306 | 306 | $geodir_available_pt_on_map = count(geodir_get_posttypes('array')) - count($exclude_post_types); |
@@ -310,12 +310,12 @@ discard block |
||
310 | 310 | } |
311 | 311 | ?> |
312 | 312 | <div |
313 | - class="map-category-listing<?php echo $map_cat_class;?>"> |
|
313 | + class="map-category-listing<?php echo $map_cat_class; ?>"> |
|
314 | 314 | <div class="trigger triggeroff"><i class="fa fa-compress"></i><i class="fa fa-expand"></i></div> |
315 | - <div id="<?php echo $map_canvas_name;?>_cat" |
|
316 | - class="<?php echo $map_canvas_name;?>_map_category map_category" |
|
317 | - <?php if ($child_collapse){ ?>checked="checked" <?php }?> |
|
318 | - style="max-height:<?php echo $geodir_map_options['height'];?>;"> |
|
315 | + <div id="<?php echo $map_canvas_name; ?>_cat" |
|
316 | + class="<?php echo $map_canvas_name; ?>_map_category map_category" |
|
317 | + <?php if ($child_collapse) { ?>checked="checked" <?php }?> |
|
318 | + style="max-height:<?php echo $geodir_map_options['height']; ?>;"> |
|
319 | 319 | <input |
320 | 320 | onkeydown="if(event.keyCode == 13){build_map_ajax_search_param('<?php echo $map_canvas_name; ?>', false)}" |
321 | 321 | type="text" |
@@ -327,11 +327,11 @@ discard block |
||
327 | 327 | <input type="hidden" id="<?php echo $map_canvas_name; ?>_child_collapse" value="1"/> |
328 | 328 | <?php } else {$child_collapse = "0"; |
329 | 329 | ?> |
330 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_child_collapse" value="0"/> |
|
330 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_child_collapse" value="0"/> |
|
331 | 331 | <?php } ?> |
332 | 332 | <input type="hidden" id="<?php echo $map_canvas_name; ?>_cat_enabled" value="1"/> |
333 | 333 | <div class="toggle"> |
334 | - <?php echo home_map_taxonomy_walker(array($map_search_pt.'category'),0,true,0,$map_canvas_name,$child_collapse,true); ?> |
|
334 | + <?php echo home_map_taxonomy_walker(array($map_search_pt . 'category'), 0, true, 0, $map_canvas_name, $child_collapse, true); ?> |
|
335 | 335 | <script>jQuery( document ).ready(function() { |
336 | 336 | geodir_show_sub_cat_collapse_button(); |
337 | 337 | });</script> |
@@ -360,21 +360,21 @@ discard block |
||
360 | 360 | $city = $country != 'me' ? $city : ''; |
361 | 361 | $gd_neighbourhood = isset($_REQUEST['gd_neighbourhood']) ? sanitize_text_field($_REQUEST['gd_neighbourhood']) : ''; |
362 | 362 | ?> |
363 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="1"/> |
|
364 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_country" name="gd_country" |
|
365 | - value="<?php echo $country;?>"/> |
|
366 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_region" name="gd_region" |
|
367 | - value="<?php echo $region;?>"/> |
|
368 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_city" name="gd_city" |
|
369 | - value="<?php echo $city;?>"/> |
|
370 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_neighbourhood" name="gd_neighbourhood" |
|
371 | - value="<?php echo $gd_neighbourhood;?>"/> |
|
363 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_location_enabled" value="1"/> |
|
364 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_country" name="gd_country" |
|
365 | + value="<?php echo $country; ?>"/> |
|
366 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_region" name="gd_region" |
|
367 | + value="<?php echo $region; ?>"/> |
|
368 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_city" name="gd_city" |
|
369 | + value="<?php echo $city; ?>"/> |
|
370 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_neighbourhood" name="gd_neighbourhood" |
|
371 | + value="<?php echo $gd_neighbourhood; ?>"/> |
|
372 | 372 | <?php } else { //end of location filter |
373 | 373 | ?> |
374 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="0"/> |
|
374 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_location_enabled" value="0"/> |
|
375 | 375 | <?php }?> |
376 | 376 | |
377 | - <input type="hidden" id="<?php echo $map_canvas_name;?>_posttype" name="gd_posttype" value="<?php echo $map_search_pt;?>"/> |
|
377 | + <input type="hidden" id="<?php echo $map_canvas_name; ?>_posttype" name="gd_posttype" value="<?php echo $map_search_pt; ?>"/> |
|
378 | 378 | |
379 | 379 | <input type="hidden" name="limitstart" value=""/> |
380 | 380 | |
@@ -382,10 +382,10 @@ discard block |
||
382 | 382 | |
383 | 383 | <?php if ($geodir_map_options['enable_post_type_filters']) { |
384 | 384 | $post_types = geodir_get_posttypes('object'); |
385 | - if (count((array)($post_types)) > 1) { |
|
385 | + if (count((array) ($post_types)) > 1) { |
|
386 | 386 | ?> |
387 | - <div class="map-places-listing" id="<?php echo $map_canvas_name;?>_posttype_menu" |
|
388 | - style="max-width:<?php echo $map_width;?>!important;"> |
|
387 | + <div class="map-places-listing" id="<?php echo $map_canvas_name; ?>_posttype_menu" |
|
388 | + style="max-width:<?php echo $map_width; ?>!important;"> |
|
389 | 389 | |
390 | 390 | <?php if (isset($geodir_map_options['is_geodir_home_map_widget']) && $map_args['is_geodir_home_map_widget']) { ?> |
391 | 391 | <div class="geodir-map-posttype-list"><?php } ?> |
@@ -421,9 +421,9 @@ discard block |
||
421 | 421 | <script type="text/javascript"> |
422 | 422 | |
423 | 423 | jQuery(document).ready(function () { |
424 | - //initMap('<?php echo $map_canvas_name;?>'); // depreciated, no need to load this twice |
|
425 | - build_map_ajax_search_param('<?php echo $map_canvas_name;?>', false); |
|
426 | - map_sticky('<?php echo $map_canvas_name;?>'); |
|
424 | + //initMap('<?php echo $map_canvas_name; ?>'); // depreciated, no need to load this twice |
|
425 | + build_map_ajax_search_param('<?php echo $map_canvas_name; ?>', false); |
|
426 | + map_sticky('<?php echo $map_canvas_name; ?>'); |
|
427 | 427 | }); |
428 | 428 | |
429 | 429 | </script> |
@@ -434,18 +434,18 @@ discard block |
||
434 | 434 | <script> |
435 | 435 | (function () { |
436 | 436 | var screenH = jQuery(window).height(); |
437 | - var heightVH = "<?php echo str_replace("vh", "", $geodir_map_options['height']);?>"; |
|
437 | + var heightVH = "<?php echo str_replace("vh", "", $geodir_map_options['height']); ?>"; |
|
438 | 438 | |
439 | 439 | var ptypeH = ''; |
440 | - if (jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").length) { |
|
441 | - ptypeH = jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").outerHeight(); |
|
440 | + if (jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").length) { |
|
441 | + ptypeH = jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").outerHeight(); |
|
442 | 442 | } |
443 | 443 | |
444 | - jQuery("#sticky_map_<?php echo $map_canvas_name;?>").css("min-height", screenH * (heightVH / 100) + 'px'); |
|
445 | - jQuery("#<?php echo $map_canvas_name;?>_wrapper").height(screenH * (heightVH / 100) + 'px'); |
|
446 | - jQuery("#<?php echo $map_canvas_name;?>").height(screenH * (heightVH / 100) + 'px'); |
|
447 | - jQuery("#<?php echo $map_canvas_name;?>_loading_div").height(screenH * (heightVH / 100) + 'px'); |
|
448 | - jQuery("#<?php echo $map_canvas_name;?>_cat").css("max-height", (screenH * (heightVH / 100)) - ptypeH + 'px'); |
|
444 | + jQuery("#sticky_map_<?php echo $map_canvas_name; ?>").css("min-height", screenH * (heightVH / 100) + 'px'); |
|
445 | + jQuery("#<?php echo $map_canvas_name; ?>_wrapper").height(screenH * (heightVH / 100) + 'px'); |
|
446 | + jQuery("#<?php echo $map_canvas_name; ?>").height(screenH * (heightVH / 100) + 'px'); |
|
447 | + jQuery("#<?php echo $map_canvas_name; ?>_loading_div").height(screenH * (heightVH / 100) + 'px'); |
|
448 | + jQuery("#<?php echo $map_canvas_name; ?>_cat").css("max-height", (screenH * (heightVH / 100)) - ptypeH + 'px'); |
|
449 | 449 | |
450 | 450 | }()); |
451 | 451 | </script> |
@@ -457,13 +457,13 @@ discard block |
||
457 | 457 | <script> |
458 | 458 | (function () { |
459 | 459 | var screenH = jQuery(window).height(); |
460 | - var heightVH = "<?php echo str_replace("px", "", $geodir_map_options['height']);?>"; |
|
460 | + var heightVH = "<?php echo str_replace("px", "", $geodir_map_options['height']); ?>"; |
|
461 | 461 | var ptypeH = ''; |
462 | - if (jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").length) { |
|
463 | - ptypeH = jQuery("#<?php echo $map_canvas_name;?>_posttype_menu").outerHeight(); |
|
462 | + if (jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").length) { |
|
463 | + ptypeH = jQuery("#<?php echo $map_canvas_name; ?>_posttype_menu").outerHeight(); |
|
464 | 464 | } |
465 | 465 | |
466 | - jQuery("#<?php echo $map_canvas_name;?>_cat").css("max-height", heightVH - ptypeH + 'px'); |
|
466 | + jQuery("#<?php echo $map_canvas_name; ?>_cat").css("max-height", heightVH - ptypeH + 'px'); |
|
467 | 467 | |
468 | 468 | }()); |
469 | 469 | </script> |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | * @param array $geodir_map_options Array of map settings. |
479 | 479 | * @param string $map_canvas_name The canvas name and ID for the map. |
480 | 480 | */ |
481 | - do_action('geodir_map_after_render',$geodir_map_options,$map_canvas_name); |
|
481 | + do_action('geodir_map_after_render', $geodir_map_options, $map_canvas_name); |
|
482 | 482 | |
483 | 483 | |
484 | 484 | endif; // Exclude posttypes if end |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * All map related templates used by the plugin |
|
4 | - * |
|
5 | - * @since 1.0.0 |
|
6 | - * @package GeoDirectory |
|
7 | - */ |
|
3 | + * All map related templates used by the plugin |
|
4 | + * |
|
5 | + * @since 1.0.0 |
|
6 | + * @package GeoDirectory |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Contains all map related functions. |
@@ -67,77 +67,77 @@ discard block |
||
67 | 67 | */ |
68 | 68 | function geodir_draw_map($map_args = array()) |
69 | 69 | { |
70 | - global $map_canvas_arr; |
|
71 | - $map_canvas_name = (!empty($map_args) && $map_args['map_canvas_name'] != '') ? $map_args['map_canvas_name'] : 'home_map_canvas'; |
|
72 | - $map_class_name = (!empty($map_args) && isset($map_args['map_class_name'])) ? $map_args['map_class_name'] : ''; |
|
73 | - |
|
74 | - $default_location = geodir_get_default_location(); |
|
75 | - |
|
76 | - $map_default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : ''; |
|
77 | - $map_default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : ''; |
|
78 | - $map_default_zoom = 12; |
|
79 | - // map options default values |
|
80 | - $width = 950; |
|
81 | - $height = 450; |
|
82 | - $child_collapse = '0'; |
|
83 | - $sticky = ''; |
|
84 | - $enable_cat_filters = false; |
|
85 | - $enable_text_search = false; |
|
86 | - $enable_post_type_filters = false; |
|
87 | - $enable_location_filters = false; |
|
88 | - $enable_jason_on_load = false; |
|
89 | - $enable_map_direction = false; |
|
90 | - $enable_marker_cluster = false; |
|
91 | - $enable_map_resize_button = false; |
|
92 | - $maptype = 'ROADMAP'; |
|
93 | - |
|
94 | - $geodir_map_options = array( |
|
95 | - 'width' => $width, |
|
96 | - 'height' => $height, |
|
97 | - 'child_collapse' => $child_collapse, |
|
98 | - 'sticky' => $sticky, |
|
99 | - 'enable_map_resize_button' => $enable_map_resize_button, |
|
100 | - 'enable_cat_filters' => $enable_cat_filters, |
|
101 | - 'enable_text_search' => $enable_text_search, |
|
102 | - 'enable_post_type_filters' => $enable_post_type_filters, |
|
103 | - 'enable_location_filters' => $enable_location_filters, |
|
104 | - 'enable_jason_on_load' => $enable_jason_on_load, |
|
105 | - 'enable_map_direction' => $enable_map_direction, |
|
106 | - 'enable_marker_cluster' => $enable_marker_cluster, |
|
107 | - 'ajax_url' => geodir_get_ajax_url(), |
|
108 | - 'map_canvas_name' => $map_canvas_name, |
|
109 | - 'inputText' => __('Title or Keyword', 'geodirectory'), |
|
110 | - 'latitude' => $map_default_lat, |
|
111 | - 'longitude' => $map_default_lng, |
|
112 | - 'zoom' => $map_default_zoom, |
|
113 | - 'scrollwheel' => true, |
|
114 | - 'streetViewControl' => true, |
|
115 | - 'maptype' => $maptype, |
|
116 | - 'showPreview' => '0', |
|
117 | - 'maxZoom' => 21, |
|
118 | - 'autozoom' => true, |
|
119 | - 'bubble_size' => 'small', |
|
120 | - 'token' => '68f48005e256696074e1da9bf9f67f06', |
|
121 | - 'navigationControlOptions' => array('position' => 'TOP_LEFT', 'style' => 'ZOOM_PAN') |
|
122 | - ); |
|
123 | - |
|
124 | - if (!empty($map_args)) { |
|
125 | - foreach ($map_args as $map_option_key => $map_option_value) { |
|
126 | - $geodir_map_options[$map_option_key] = $map_option_value; |
|
127 | - } |
|
128 | - } |
|
129 | - |
|
130 | - if (strpos($geodir_map_options['height'], '%') !== false || strpos($geodir_map_options['height'], 'px') !== false || strpos($geodir_map_options['height'], 'vh') !== false) { |
|
131 | - } else { |
|
132 | - $geodir_map_options['height'] = $geodir_map_options['height'] . 'px'; |
|
133 | - } |
|
134 | - |
|
135 | - if (strpos($geodir_map_options['width'], '%') !== false || strpos($geodir_map_options['width'], 'px') !== false) { |
|
136 | - } else { |
|
137 | - $geodir_map_options['width'] = $geodir_map_options['width'] . 'px'; |
|
138 | - } |
|
139 | - |
|
140 | - /** |
|
70 | + global $map_canvas_arr; |
|
71 | + $map_canvas_name = (!empty($map_args) && $map_args['map_canvas_name'] != '') ? $map_args['map_canvas_name'] : 'home_map_canvas'; |
|
72 | + $map_class_name = (!empty($map_args) && isset($map_args['map_class_name'])) ? $map_args['map_class_name'] : ''; |
|
73 | + |
|
74 | + $default_location = geodir_get_default_location(); |
|
75 | + |
|
76 | + $map_default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : ''; |
|
77 | + $map_default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : ''; |
|
78 | + $map_default_zoom = 12; |
|
79 | + // map options default values |
|
80 | + $width = 950; |
|
81 | + $height = 450; |
|
82 | + $child_collapse = '0'; |
|
83 | + $sticky = ''; |
|
84 | + $enable_cat_filters = false; |
|
85 | + $enable_text_search = false; |
|
86 | + $enable_post_type_filters = false; |
|
87 | + $enable_location_filters = false; |
|
88 | + $enable_jason_on_load = false; |
|
89 | + $enable_map_direction = false; |
|
90 | + $enable_marker_cluster = false; |
|
91 | + $enable_map_resize_button = false; |
|
92 | + $maptype = 'ROADMAP'; |
|
93 | + |
|
94 | + $geodir_map_options = array( |
|
95 | + 'width' => $width, |
|
96 | + 'height' => $height, |
|
97 | + 'child_collapse' => $child_collapse, |
|
98 | + 'sticky' => $sticky, |
|
99 | + 'enable_map_resize_button' => $enable_map_resize_button, |
|
100 | + 'enable_cat_filters' => $enable_cat_filters, |
|
101 | + 'enable_text_search' => $enable_text_search, |
|
102 | + 'enable_post_type_filters' => $enable_post_type_filters, |
|
103 | + 'enable_location_filters' => $enable_location_filters, |
|
104 | + 'enable_jason_on_load' => $enable_jason_on_load, |
|
105 | + 'enable_map_direction' => $enable_map_direction, |
|
106 | + 'enable_marker_cluster' => $enable_marker_cluster, |
|
107 | + 'ajax_url' => geodir_get_ajax_url(), |
|
108 | + 'map_canvas_name' => $map_canvas_name, |
|
109 | + 'inputText' => __('Title or Keyword', 'geodirectory'), |
|
110 | + 'latitude' => $map_default_lat, |
|
111 | + 'longitude' => $map_default_lng, |
|
112 | + 'zoom' => $map_default_zoom, |
|
113 | + 'scrollwheel' => true, |
|
114 | + 'streetViewControl' => true, |
|
115 | + 'maptype' => $maptype, |
|
116 | + 'showPreview' => '0', |
|
117 | + 'maxZoom' => 21, |
|
118 | + 'autozoom' => true, |
|
119 | + 'bubble_size' => 'small', |
|
120 | + 'token' => '68f48005e256696074e1da9bf9f67f06', |
|
121 | + 'navigationControlOptions' => array('position' => 'TOP_LEFT', 'style' => 'ZOOM_PAN') |
|
122 | + ); |
|
123 | + |
|
124 | + if (!empty($map_args)) { |
|
125 | + foreach ($map_args as $map_option_key => $map_option_value) { |
|
126 | + $geodir_map_options[$map_option_key] = $map_option_value; |
|
127 | + } |
|
128 | + } |
|
129 | + |
|
130 | + if (strpos($geodir_map_options['height'], '%') !== false || strpos($geodir_map_options['height'], 'px') !== false || strpos($geodir_map_options['height'], 'vh') !== false) { |
|
131 | + } else { |
|
132 | + $geodir_map_options['height'] = $geodir_map_options['height'] . 'px'; |
|
133 | + } |
|
134 | + |
|
135 | + if (strpos($geodir_map_options['width'], '%') !== false || strpos($geodir_map_options['width'], 'px') !== false) { |
|
136 | + } else { |
|
137 | + $geodir_map_options['width'] = $geodir_map_options['width'] . 'px'; |
|
138 | + } |
|
139 | + |
|
140 | + /** |
|
141 | 141 | * Filter the options to use in google map. |
142 | 142 | * |
143 | 143 | * @since 1.0.0 |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | */ |
147 | 147 | $geodir_map_options = apply_filters("geodir_map_options_{$map_canvas_name}", $geodir_map_options); |
148 | 148 | |
149 | - $map_canvas_arr[$map_canvas_name] = array(); |
|
149 | + $map_canvas_arr[$map_canvas_name] = array(); |
|
150 | 150 | |
151 | - /** |
|
151 | + /** |
|
152 | 152 | * Filter the post types to display data on map. |
153 | 153 | * |
154 | 154 | * @since 1.0.0 |
@@ -166,20 +166,20 @@ discard block |
||
166 | 166 | */ |
167 | 167 | $exclude_post_types = apply_filters("geodir_exclude_post_type_on_map_{$map_canvas_name}", get_option('geodir_exclude_post_type_on_map')); |
168 | 168 | |
169 | - if (count((array)$post_types) != count($exclude_post_types) || ($enable_jason_on_load)): |
|
170 | - // Set default map options |
|
169 | + if (count((array)$post_types) != count($exclude_post_types) || ($enable_jason_on_load)): |
|
170 | + // Set default map options |
|
171 | 171 | |
172 | - wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js',array(),false,true); |
|
172 | + wp_enqueue_script('geodir-map-widget', geodir_plugin_url() . '/geodirectory-functions/map-functions/js/map.min.js',array(),false,true); |
|
173 | 173 | |
174 | - wp_localize_script('geodir-map-widget', $map_canvas_name, $geodir_map_options); |
|
174 | + wp_localize_script('geodir-map-widget', $map_canvas_name, $geodir_map_options); |
|
175 | 175 | |
176 | - if ($map_canvas_name == 'detail_page_map_canvas' || $map_canvas_name == 'preview_map_canvas') { |
|
177 | - $map_width = '100%'; |
|
178 | - } else { |
|
179 | - $map_width = $geodir_map_options['width']; |
|
180 | - } |
|
176 | + if ($map_canvas_name == 'detail_page_map_canvas' || $map_canvas_name == 'preview_map_canvas') { |
|
177 | + $map_width = '100%'; |
|
178 | + } else { |
|
179 | + $map_width = $geodir_map_options['width']; |
|
180 | + } |
|
181 | 181 | |
182 | - /** |
|
182 | + /** |
|
183 | 183 | * Filter the width of map. |
184 | 184 | * |
185 | 185 | * @since 1.0.0 |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * @param int $map_width Width of map box, eg: gd_place. |
188 | 188 | */ |
189 | 189 | $map_width = apply_filters('geodir_change_map_width', $map_width); |
190 | - ?> |
|
190 | + ?> |
|
191 | 191 | <div id="catcher_<?php echo $map_canvas_name;?>"></div> |
192 | 192 | <div class="stick_trigger_container"> |
193 | 193 | <div class="trigger_sticky triggeroff_sticky"></div> |
@@ -219,15 +219,15 @@ discard block |
||
219 | 219 | <?php if ($geodir_map_options['enable_jason_on_load']) { ?> |
220 | 220 | <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="1"/> |
221 | 221 | <?php } else { |
222 | - ?> |
|
222 | + ?> |
|
223 | 223 | <input type="hidden" id="<?php echo $map_canvas_name;?>_jason_enabled" value="0"/> |
224 | 224 | <?php } |
225 | 225 | |
226 | - if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) |
|
227 | - $show_entire_cat_panel = "none"; |
|
228 | - else |
|
229 | - $show_entire_cat_panel = "''"; |
|
230 | - ?> |
|
226 | + if (!$geodir_map_options['enable_text_search'] && !$geodir_map_options['enable_cat_filters']) |
|
227 | + $show_entire_cat_panel = "none"; |
|
228 | + else |
|
229 | + $show_entire_cat_panel = "''"; |
|
230 | + ?> |
|
231 | 231 | |
232 | 232 | <?php if ($geodir_map_options['enable_map_direction']) { ?> |
233 | 233 | |
@@ -278,8 +278,8 @@ discard block |
||
278 | 278 | <select id="travel-units" onchange="calcRoute('<?php echo $map_canvas_name; ?>')"> |
279 | 279 | <option value="miles"><?php _e('Miles', 'geodirectory'); ?></option> |
280 | 280 | <option <?php if (get_option('geodir_search_dist_1') == 'km') { |
281 | - echo 'selected="selected"'; |
|
282 | - } ?> value="kilometers"><?php _e('Kilometers', 'geodirectory'); ?></option> |
|
281 | + echo 'selected="selected"'; |
|
282 | + } ?> value="kilometers"><?php _e('Kilometers', 'geodirectory'); ?></option> |
|
283 | 283 | </select> |
284 | 284 | </div> |
285 | 285 | |
@@ -302,13 +302,13 @@ discard block |
||
302 | 302 | ?> |
303 | 303 | <div class="map-category-listing-main" style="display:<?php echo $show_entire_cat_panel;?>"> |
304 | 304 | <?php |
305 | - $exclude_post_types = get_option('geodir_exclude_post_type_on_map'); |
|
306 | - $geodir_available_pt_on_map = count(geodir_get_posttypes('array')) - count($exclude_post_types); |
|
305 | + $exclude_post_types = get_option('geodir_exclude_post_type_on_map'); |
|
306 | + $geodir_available_pt_on_map = count(geodir_get_posttypes('array')) - count($exclude_post_types); |
|
307 | 307 | $map_cat_class = ''; |
308 | 308 | if ($geodir_map_options['enable_post_type_filters']) { |
309 | 309 | $map_cat_class = $geodir_available_pt_on_map > 1 ? ' map-cat-ptypes' : ' map-cat-floor'; |
310 | 310 | } |
311 | - ?> |
|
311 | + ?> |
|
312 | 312 | <div |
313 | 313 | class="map-category-listing<?php echo $map_cat_class;?>"> |
314 | 314 | <div class="trigger triggeroff"><i class="fa fa-compress"></i><i class="fa fa-expand"></i></div> |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | <?php if ($geodir_map_options['child_collapse']) { $child_collapse = "1"; ?> |
327 | 327 | <input type="hidden" id="<?php echo $map_canvas_name; ?>_child_collapse" value="1"/> |
328 | 328 | <?php } else {$child_collapse = "0"; |
329 | - ?> |
|
329 | + ?> |
|
330 | 330 | <input type="hidden" id="<?php echo $map_canvas_name;?>_child_collapse" value="0"/> |
331 | 331 | <?php } ?> |
332 | 332 | <input type="hidden" id="<?php echo $map_canvas_name; ?>_cat_enabled" value="1"/> |
@@ -349,17 +349,17 @@ discard block |
||
349 | 349 | <!-- map-category-listings--> |
350 | 350 | |
351 | 351 | <?php |
352 | - if ($geodir_map_options['enable_location_filters']) { |
|
352 | + if ($geodir_map_options['enable_location_filters']) { |
|
353 | 353 | $country = get_query_var('gd_country'); |
354 | 354 | $region = get_query_var('gd_region'); |
355 | 355 | $city = get_query_var('gd_city'); |
356 | 356 | |
357 | - //fix for location/me page |
|
358 | - $country = $country != 'me' ? $country : ''; |
|
357 | + //fix for location/me page |
|
358 | + $country = $country != 'me' ? $country : ''; |
|
359 | 359 | $region = $region != 'me' ? $region : ''; |
360 | 360 | $city = $country != 'me' ? $city : ''; |
361 | - $gd_neighbourhood = isset($_REQUEST['gd_neighbourhood']) ? sanitize_text_field($_REQUEST['gd_neighbourhood']) : ''; |
|
362 | - ?> |
|
361 | + $gd_neighbourhood = isset($_REQUEST['gd_neighbourhood']) ? sanitize_text_field($_REQUEST['gd_neighbourhood']) : ''; |
|
362 | + ?> |
|
363 | 363 | <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="1"/> |
364 | 364 | <input type="hidden" id="<?php echo $map_canvas_name;?>_country" name="gd_country" |
365 | 365 | value="<?php echo $country;?>"/> |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | <input type="hidden" id="<?php echo $map_canvas_name;?>_neighbourhood" name="gd_neighbourhood" |
371 | 371 | value="<?php echo $gd_neighbourhood;?>"/> |
372 | 372 | <?php } else { //end of location filter |
373 | - ?> |
|
373 | + ?> |
|
374 | 374 | <input type="hidden" id="<?php echo $map_canvas_name;?>_location_enabled" value="0"/> |
375 | 375 | <?php }?> |
376 | 376 | |
@@ -381,9 +381,9 @@ discard block |
||
381 | 381 | |
382 | 382 | |
383 | 383 | <?php if ($geodir_map_options['enable_post_type_filters']) { |
384 | - $post_types = geodir_get_posttypes('object'); |
|
385 | - if (count((array)($post_types)) > 1) { |
|
386 | - ?> |
|
384 | + $post_types = geodir_get_posttypes('object'); |
|
385 | + if (count((array)($post_types)) > 1) { |
|
386 | + ?> |
|
387 | 387 | <div class="map-places-listing" id="<?php echo $map_canvas_name;?>_posttype_menu" |
388 | 388 | style="max-width:<?php echo $map_width;?>!important;"> |
389 | 389 | |
@@ -391,15 +391,15 @@ discard block |
||
391 | 391 | <div class="geodir-map-posttype-list"><?php } ?> |
392 | 392 | <ul class="clearfix place-list"> |
393 | 393 | <?php |
394 | - $exclude_post_types = get_option('geodir_exclude_post_type_on_map'); |
|
394 | + $exclude_post_types = get_option('geodir_exclude_post_type_on_map'); |
|
395 | 395 | |
396 | - foreach ($post_types as $post_type => $args) { |
|
397 | - if (!in_array($post_type, $exclude_post_types)) { |
|
398 | - $class = $map_search_pt == $post_type ? 'class="gd-map-search-pt"' : ''; |
|
396 | + foreach ($post_types as $post_type => $args) { |
|
397 | + if (!in_array($post_type, $exclude_post_types)) { |
|
398 | + $class = $map_search_pt == $post_type ? 'class="gd-map-search-pt"' : ''; |
|
399 | 399 | echo '<li id="' . $post_type . '" ' . $class . '><a href="javascript:void(0);" onclick="jQuery(\'#' . $map_canvas_name . '_posttype\').val(\'' . $post_type . '\');build_map_ajax_search_param(\'' . $map_canvas_name . '\', true)">' . __(ucfirst($args->labels->name), 'geodirectory') . '</a></li>'; |
400 | - } |
|
401 | - } |
|
402 | - ?> |
|
400 | + } |
|
401 | + } |
|
402 | + ?> |
|
403 | 403 | </ul> |
404 | 404 | <?php if (isset($geodir_map_options['is_geodir_home_map_widget']) && $map_args['is_geodir_home_map_widget']) { ?> |
405 | 405 | </div><?php } ?> |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | |
414 | 414 | </div> <!-- map-places-listings--> |
415 | 415 | <?php } |
416 | - } // end of post type filter if |
|
417 | - ?> |
|
416 | + } // end of post type filter if |
|
417 | + ?> |
|
418 | 418 | |
419 | 419 | </div> |
420 | 420 | </div> <!--end of stick trigger container--> |
@@ -429,8 +429,8 @@ discard block |
||
429 | 429 | </script> |
430 | 430 | <?php |
431 | 431 | |
432 | - if (strpos($geodir_map_options['height'], 'vh')) { |
|
433 | - ?> |
|
432 | + if (strpos($geodir_map_options['height'], 'vh')) { |
|
433 | + ?> |
|
434 | 434 | <script> |
435 | 435 | (function () { |
436 | 436 | var screenH = jQuery(window).height(); |
@@ -452,8 +452,8 @@ discard block |
||
452 | 452 | |
453 | 453 | <?php |
454 | 454 | |
455 | - } elseif (strpos($geodir_map_options['height'], 'px')) { |
|
456 | - ?> |
|
455 | + } elseif (strpos($geodir_map_options['height'], 'px')) { |
|
456 | + ?> |
|
457 | 457 | <script> |
458 | 458 | (function () { |
459 | 459 | var screenH = jQuery(window).height(); |
@@ -468,20 +468,20 @@ discard block |
||
468 | 468 | }()); |
469 | 469 | </script> |
470 | 470 | <?php |
471 | - } |
|
471 | + } |
|
472 | 472 | |
473 | - /** |
|
474 | - * Action that runs after all the map code has been output; |
|
475 | - * |
|
476 | - * @since 1.5.3 |
|
477 | - * |
|
478 | - * @param array $geodir_map_options Array of map settings. |
|
479 | - * @param string $map_canvas_name The canvas name and ID for the map. |
|
480 | - */ |
|
481 | - do_action('geodir_map_after_render',$geodir_map_options,$map_canvas_name); |
|
473 | + /** |
|
474 | + * Action that runs after all the map code has been output; |
|
475 | + * |
|
476 | + * @since 1.5.3 |
|
477 | + * |
|
478 | + * @param array $geodir_map_options Array of map settings. |
|
479 | + * @param string $map_canvas_name The canvas name and ID for the map. |
|
480 | + */ |
|
481 | + do_action('geodir_map_after_render',$geodir_map_options,$map_canvas_name); |
|
482 | 482 | |
483 | 483 | |
484 | - endif; // Exclude posttypes if end |
|
484 | + endif; // Exclude posttypes if end |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | ?> |
488 | 488 | \ No newline at end of file |
@@ -16,8 +16,9 @@ |
||
16 | 16 | * the visitor has not yet entered the password we will |
17 | 17 | * return early without loading the comments. |
18 | 18 | */ |
19 | -if (post_password_required()) |
|
20 | - return; |
|
19 | +if (post_password_required()) { |
|
20 | + return; |
|
21 | +} |
|
21 | 22 | ?> |
22 | 23 | |
23 | 24 | <div id="comments" class="comments-area"> |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The template for displaying Comments. |
|
4 | - * |
|
5 | - * The area of the page that contains both current comments |
|
6 | - * and the comment form. |
|
7 | - * |
|
8 | - * @since 1.0.0 |
|
9 | - * @since 1.5.4 Modified to fix review sorting. |
|
10 | - * |
|
11 | - * @package GeoDirectory |
|
12 | - */ |
|
3 | + * The template for displaying Comments. |
|
4 | + * |
|
5 | + * The area of the page that contains both current comments |
|
6 | + * and the comment form. |
|
7 | + * |
|
8 | + * @since 1.0.0 |
|
9 | + * @since 1.5.4 Modified to fix review sorting. |
|
10 | + * |
|
11 | + * @package GeoDirectory |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | /* |
15 | 15 | * If the current post is protected by a password and |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * return early without loading the comments. |
18 | 18 | */ |
19 | 19 | if (post_password_required()) |
20 | - return; |
|
20 | + return; |
|
21 | 21 | ?> |
22 | 22 | |
23 | 23 | <div id="comments" class="comments-area"> |
@@ -25,35 +25,35 @@ discard block |
||
25 | 25 | <?php // You can start editing here -- including this comment! ?> |
26 | 26 | |
27 | 27 | <?php |
28 | - /** |
|
29 | - * Called before displaying reviews. |
|
30 | - * |
|
31 | - * If you would like to wrap reviews inside a div this is the place to print your open div. @see geodir_before_review_form to print your closing div. |
|
32 | - * |
|
33 | - * @since 1.5.7 |
|
34 | - */ |
|
35 | - do_action('geodir_before_review_list'); ?> |
|
28 | + /** |
|
29 | + * Called before displaying reviews. |
|
30 | + * |
|
31 | + * If you would like to wrap reviews inside a div this is the place to print your open div. @see geodir_before_review_form to print your closing div. |
|
32 | + * |
|
33 | + * @since 1.5.7 |
|
34 | + */ |
|
35 | + do_action('geodir_before_review_list'); ?> |
|
36 | 36 | |
37 | 37 | <?php if (have_comments()) : ?> |
38 | 38 | <h2 class="comments-title"> |
39 | 39 | <?php |
40 | - printf(_n('1 Review <span class="r-title-on">on</span> <span class="r-title">“%2$s”</span>', '%1$s Reviews <span>on</span> <span class="r-title"> “%2$s”</span>', get_comments_number(), 'geodirectory'), |
|
41 | - number_format_i18n(get_comments_number()), get_the_title()); |
|
42 | - ?> |
|
40 | + printf(_n('1 Review <span class="r-title-on">on</span> <span class="r-title">“%2$s”</span>', '%1$s Reviews <span>on</span> <span class="r-title"> “%2$s”</span>', get_comments_number(), 'geodirectory'), |
|
41 | + number_format_i18n(get_comments_number()), get_the_title()); |
|
42 | + ?> |
|
43 | 43 | </h2> |
44 | 44 | |
45 | 45 | <?php |
46 | - /** |
|
47 | - * Called after displaying review listing title. |
|
48 | - * |
|
49 | - * @since 1.5.7 |
|
50 | - */ |
|
51 | - do_action('geodir_after_review_list_title'); ?> |
|
46 | + /** |
|
47 | + * Called after displaying review listing title. |
|
48 | + * |
|
49 | + * @since 1.5.7 |
|
50 | + */ |
|
51 | + do_action('geodir_after_review_list_title'); ?> |
|
52 | 52 | |
53 | 53 | <ol class="commentlist"> |
54 | 54 | <?php $reverse_top_level = is_plugin_active('geodir_review_rating_manager/geodir_review_rating_manager.php') ? false : null; ?> |
55 | 55 | <?php wp_list_comments(array('callback' => 'geodir_comment', 'reverse_top_level' => $reverse_top_level, 'style' => 'ol')); |
56 | - ?> |
|
56 | + ?> |
|
57 | 57 | </ol><!-- .commentlist --> |
58 | 58 | |
59 | 59 | <?php if (get_comment_pages_count() > 1 && get_option('page_comments')) : // are there comments to navigate through ?> |
@@ -68,51 +68,51 @@ discard block |
||
68 | 68 | <?php endif; // check for comment navigation ?> |
69 | 69 | |
70 | 70 | <?php |
71 | - /* If there are no comments and comments are closed, let's leave a note. |
|
71 | + /* If there are no comments and comments are closed, let's leave a note. |
|
72 | 72 | * But we only want the note on posts and pages that had comments in the first place. |
73 | 73 | */ |
74 | - if (!comments_open() && get_comments_number()) : ?> |
|
74 | + if (!comments_open() && get_comments_number()) : ?> |
|
75 | 75 | <p class="nocomments"><?php _e('Reviews are closed.', 'geodirectory'); ?></p> |
76 | 76 | <?php endif; ?> |
77 | 77 | |
78 | 78 | <?php endif; // have_comments() ?> |
79 | 79 | |
80 | 80 | <?php |
81 | - /** |
|
82 | - * Called before displaying "Leave a review form". |
|
83 | - * |
|
84 | - * If you would like to wrap "review form" inside a div this is the best place to hook your open div. @see geodir_after_review_form to print your closing div. |
|
85 | - * Also If you would like to wrap "reviews" inside a div this is the best place to print your closing div. @see geodir_before_review_list to print your open div. |
|
86 | - * |
|
87 | - * @since 1.5.7 |
|
88 | - */ |
|
89 | - do_action('geodir_before_review_form'); ?> |
|
81 | + /** |
|
82 | + * Called before displaying "Leave a review form". |
|
83 | + * |
|
84 | + * If you would like to wrap "review form" inside a div this is the best place to hook your open div. @see geodir_after_review_form to print your closing div. |
|
85 | + * Also If you would like to wrap "reviews" inside a div this is the best place to print your closing div. @see geodir_before_review_list to print your open div. |
|
86 | + * |
|
87 | + * @since 1.5.7 |
|
88 | + */ |
|
89 | + do_action('geodir_before_review_form'); ?> |
|
90 | 90 | |
91 | 91 | <?php |
92 | - /** |
|
93 | - * Filters comment form args |
|
94 | - * |
|
95 | - * If you would like to modify your comment form args, use this filter. @see https://codex.wordpress.org/Function_Reference/comment_form for accepted args. |
|
96 | - * |
|
97 | - * @since 1.0.0 |
|
98 | - */ |
|
99 | - $args = apply_filters('geodir_review_form_args', array( |
|
100 | - 'title_reply' => __('Leave a Review', 'geodirectory'), |
|
101 | - 'label_submit' => __('Post Review', 'geodirectory'), |
|
102 | - 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', |
|
103 | - 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>' |
|
104 | - )); |
|
105 | - comment_form($args); |
|
106 | - ?> |
|
92 | + /** |
|
93 | + * Filters comment form args |
|
94 | + * |
|
95 | + * If you would like to modify your comment form args, use this filter. @see https://codex.wordpress.org/Function_Reference/comment_form for accepted args. |
|
96 | + * |
|
97 | + * @since 1.0.0 |
|
98 | + */ |
|
99 | + $args = apply_filters('geodir_review_form_args', array( |
|
100 | + 'title_reply' => __('Leave a Review', 'geodirectory'), |
|
101 | + 'label_submit' => __('Post Review', 'geodirectory'), |
|
102 | + 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', |
|
103 | + 'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>' |
|
104 | + )); |
|
105 | + comment_form($args); |
|
106 | + ?> |
|
107 | 107 | |
108 | 108 | <?php |
109 | - /** |
|
110 | - * Called after displaying "Leave a review form". |
|
111 | - * |
|
112 | - * If you would like to wrap "review form" inside a div this is the best place to print your closing div. @see geodir_before_review_form to print your open div. |
|
113 | - * |
|
114 | - * @since 1.5.7 |
|
115 | - */ |
|
116 | - do_action('geodir_after_review_form'); ?> |
|
109 | + /** |
|
110 | + * Called after displaying "Leave a review form". |
|
111 | + * |
|
112 | + * If you would like to wrap "review form" inside a div this is the best place to print your closing div. @see geodir_before_review_form to print your open div. |
|
113 | + * |
|
114 | + * @since 1.5.7 |
|
115 | + */ |
|
116 | + do_action('geodir_after_review_form'); ?> |
|
117 | 117 | |
118 | 118 | </div><!-- #comments .comments-area --> |
119 | 119 | \ No newline at end of file |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly |
14 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
14 | +if (!defined('ABSPATH')) exit; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Return the current cache expire setting. |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @param string $data |
38 | 38 | */ |
39 | -function wp_session_decode( $data ) { |
|
39 | +function wp_session_decode($data) { |
|
40 | 40 | $wp_session = WP_Session::get_instance(); |
41 | 41 | |
42 | - return $wp_session->json_in( $data ); |
|
42 | + return $wp_session->json_in($data); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @return bool |
62 | 62 | */ |
63 | -function wp_session_regenerate_id( $delete_old_session = false ) { |
|
63 | +function wp_session_regenerate_id($delete_old_session = false) { |
|
64 | 64 | $wp_session = WP_Session::get_instance(); |
65 | 65 | |
66 | - $wp_session->regenerate_id( $delete_old_session ); |
|
66 | + $wp_session->regenerate_id($delete_old_session); |
|
67 | 67 | |
68 | 68 | return true; |
69 | 69 | } |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | */ |
78 | 78 | function wp_session_start() { |
79 | 79 | $wp_session = WP_Session::get_instance(); |
80 | - do_action( 'wp_session_start' ); |
|
80 | + do_action('wp_session_start'); |
|
81 | 81 | |
82 | 82 | return $wp_session->session_started(); |
83 | 83 | } |
84 | -add_action( 'plugins_loaded', 'wp_session_start' ); |
|
84 | +add_action('plugins_loaded', 'wp_session_start'); |
|
85 | 85 | |
86 | 86 | /** |
87 | 87 | * Return the current session status. |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | function wp_session_status() { |
92 | 92 | $wp_session = WP_Session::get_instance(); |
93 | 93 | |
94 | - if ( $wp_session->session_started() ) { |
|
94 | + if ($wp_session->session_started()) { |
|
95 | 95 | return PHP_SESSION_ACTIVE; |
96 | 96 | } |
97 | 97 | |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | $wp_session = WP_Session::get_instance(); |
115 | 115 | |
116 | 116 | $wp_session->write_data(); |
117 | - do_action( 'wp_session_commit' ); |
|
117 | + do_action('wp_session_commit'); |
|
118 | 118 | } |
119 | -add_action( 'shutdown', 'wp_session_write_close' ); |
|
119 | +add_action('shutdown', 'wp_session_write_close'); |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Clean up expired sessions by removing data and their expiration entries from |
@@ -128,51 +128,51 @@ discard block |
||
128 | 128 | function wp_session_cleanup() { |
129 | 129 | global $wpdb; |
130 | 130 | |
131 | - if ( defined( 'WP_SETUP_CONFIG' ) ) { |
|
131 | + if (defined('WP_SETUP_CONFIG')) { |
|
132 | 132 | return; |
133 | 133 | } |
134 | 134 | |
135 | - if ( ! defined( 'WP_INSTALLING' ) ) { |
|
136 | - $expiration_keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'" ); |
|
135 | + if (!defined('WP_INSTALLING')) { |
|
136 | + $expiration_keys = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'"); |
|
137 | 137 | |
138 | - $now = current_time( 'timestamp' ); |
|
138 | + $now = current_time('timestamp'); |
|
139 | 139 | $expired_sessions = array(); |
140 | 140 | |
141 | - foreach( $expiration_keys as $expiration ) { |
|
141 | + foreach ($expiration_keys as $expiration) { |
|
142 | 142 | |
143 | 143 | // If the session has expired |
144 | - if ( $now > intval( $expiration->option_value ) ) { |
|
144 | + if ($now > intval($expiration->option_value)) { |
|
145 | 145 | |
146 | 146 | // Get the session ID by parsing the option_name |
147 | - $session_id = substr( $expiration->option_name, 20 ); |
|
147 | + $session_id = substr($expiration->option_name, 20); |
|
148 | 148 | |
149 | - if( (int) -1 === (int) $session_id || ! preg_match( '/^[a-f0-9]{32}$/', $session_id ) ) { |
|
149 | + if ((int) -1 === (int) $session_id || !preg_match('/^[a-f0-9]{32}$/', $session_id)) { |
|
150 | 150 | continue; |
151 | 151 | } |
152 | 152 | |
153 | 153 | $expired_sessions[] = $expiration->option_name; |
154 | - $expired_sessions[] = esc_sql( "_wp_session_$session_id" ); |
|
154 | + $expired_sessions[] = esc_sql("_wp_session_$session_id"); |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | |
158 | 158 | // Delete all expired sessions in a single query |
159 | - if ( ! empty( $expired_sessions ) ) { |
|
160 | - $option_names = implode( "','", $expired_sessions ); |
|
161 | - $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')" ); |
|
159 | + if (!empty($expired_sessions)) { |
|
160 | + $option_names = implode("','", $expired_sessions); |
|
161 | + $wpdb->query("DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')"); |
|
162 | 162 | } |
163 | 163 | } |
164 | 164 | |
165 | 165 | // Allow other plugins to hook in to the garbage collection process. |
166 | - do_action( 'wp_session_cleanup' ); |
|
166 | + do_action('wp_session_cleanup'); |
|
167 | 167 | } |
168 | -add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' ); |
|
168 | +add_action('wp_session_garbage_collection', 'wp_session_cleanup'); |
|
169 | 169 | |
170 | 170 | /** |
171 | 171 | * Register the garbage collector as a twice daily event. |
172 | 172 | */ |
173 | 173 | function wp_session_register_garbage_collection() { |
174 | - if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) { |
|
175 | - wp_schedule_event( current_time( 'timestamp' ), 'twicedaily', 'wp_session_garbage_collection' ); |
|
174 | + if (!wp_next_scheduled('wp_session_garbage_collection')) { |
|
175 | + wp_schedule_event(current_time('timestamp'), 'twicedaily', 'wp_session_garbage_collection'); |
|
176 | 176 | } |
177 | 177 | } |
178 | -add_action( 'wp', 'wp_session_register_garbage_collection' ); |
|
178 | +add_action('wp', 'wp_session_register_garbage_collection'); |
@@ -11,7 +11,9 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly |
14 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
14 | +if ( ! defined( 'ABSPATH' ) ) { |
|
15 | + exit; |
|
16 | +} |
|
15 | 17 | |
16 | 18 | /** |
17 | 19 | * Return the current cache expire setting. |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $post_types = geodir_get_posttypes('object'); |
65 | 65 | |
66 | - if (!empty($post_types) && count((array)$post_types) > 1): |
|
66 | + if (!empty($post_types) && count((array) $post_types) > 1): |
|
67 | 67 | ?> |
68 | 68 | <select name="stype" class="search_by_post"> |
69 | 69 | <?php foreach ($post_types as $post_type => $info): |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | } |
76 | 76 | ?> |
77 | 77 | |
78 | - <option data-label="<?php echo get_post_type_archive_link($post_type);?>" |
|
79 | - value="<?php echo $post_type;?>" <?php if (isset($_REQUEST['stype'])) { |
|
78 | + <option data-label="<?php echo get_post_type_archive_link($post_type); ?>" |
|
79 | + value="<?php echo $post_type; ?>" <?php if (isset($_REQUEST['stype'])) { |
|
80 | 80 | if ($post_type == $_REQUEST['stype']) { |
81 | 81 | echo 'selected="selected"'; |
82 | 82 | } |
83 | 83 | } elseif ($curr_post_type == $post_type) { |
84 | 84 | echo 'selected="selected"'; |
85 | - }?>><?php _e(ucfirst($info->labels->name), 'geodirectory');?></option> |
|
85 | + }?>><?php _e(ucfirst($info->labels->name), 'geodirectory'); ?></option> |
|
86 | 86 | |
87 | 87 | <?php endforeach; ?> |
88 | 88 | </select> |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @since 1.5.5 |
158 | 158 | * @param string $default_search_button_label The current search button text. |
159 | 159 | */ |
160 | - $default_search_button_label = apply_filters('geodir_search_default_search_button_text', $default_search_button_label);?> |
|
160 | + $default_search_button_label = apply_filters('geodir_search_default_search_button_text', $default_search_button_label); ?> |
|
161 | 161 | <input type="button" value="<?php esc_attr_e($default_search_button_label); ?>" class="geodir_submit_search" /> |
162 | 162 | <?php |
163 | 163 | /** |
@@ -50,16 +50,19 @@ |
||
50 | 50 | <?php |
51 | 51 | |
52 | 52 | $default_search_for_text = SEARCH_FOR_TEXT; |
53 | - if (get_option('geodir_search_field_default_text')) |
|
54 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
53 | + if (get_option('geodir_search_field_default_text')) { |
|
54 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
55 | + } |
|
55 | 56 | |
56 | 57 | $default_near_text = NEAR_TEXT; |
57 | - if (get_option('geodir_near_field_default_text')) |
|
58 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
58 | + if (get_option('geodir_near_field_default_text')) { |
|
59 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
60 | + } |
|
59 | 61 | |
60 | 62 | $default_search_button_label = __('Search', 'geodirectory'); |
61 | - if (get_option('geodir_search_button_label')) |
|
62 | - $default_search_button_label = __(get_option('geodir_search_button_label'), 'geodirectory'); |
|
63 | + if (get_option('geodir_search_button_label')) { |
|
64 | + $default_search_button_label = __(get_option('geodir_search_button_label'), 'geodirectory'); |
|
65 | + } |
|
63 | 66 | |
64 | 67 | $post_types = geodir_get_posttypes('object'); |
65 | 68 |
@@ -14,22 +14,22 @@ discard block |
||
14 | 14 | |
15 | 15 | $curr_post_type = geodir_get_current_posttype(); |
16 | 16 | if (function_exists('geodir_location_geo_home_link')) { |
17 | - remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
17 | + remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
18 | 18 | } |
19 | 19 | $search_url = trailingslashit(get_home_url()); |
20 | 20 | if (function_exists('geodir_location_geo_home_link')) { |
21 | - add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
21 | + add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
22 | 22 | } |
23 | 23 | ?> |
24 | 24 | |
25 | 25 | |
26 | 26 | <form class="<?php |
27 | 27 | /** |
28 | - * Filters the GD search form class. |
|
29 | - * |
|
30 | - * @since 1.0.0 |
|
31 | - * @param string $class The class for the search form, default: 'geodir-listing-search'. |
|
32 | - */ |
|
28 | + * Filters the GD search form class. |
|
29 | + * |
|
30 | + * @since 1.0.0 |
|
31 | + * @param string $class The class for the search form, default: 'geodir-listing-search'. |
|
32 | + */ |
|
33 | 33 | echo apply_filters('geodir_search_form_class', 'geodir-listing-search'); ?>" |
34 | 34 | name="geodir-listing-search" action="<?php echo $search_url ?>" method="get"> |
35 | 35 | <input type="hidden" name="geodir_search" value="1"/> |
@@ -37,104 +37,104 @@ discard block |
||
37 | 37 | <div class="geodir-loc-bar"> |
38 | 38 | |
39 | 39 | <?php |
40 | - /** |
|
41 | - * Called inside the search form but before any of the fields. |
|
42 | - * |
|
43 | - * @since 1.0.0 |
|
44 | - */ |
|
45 | - do_action('geodir_before_search_form') ?> |
|
40 | + /** |
|
41 | + * Called inside the search form but before any of the fields. |
|
42 | + * |
|
43 | + * @since 1.0.0 |
|
44 | + */ |
|
45 | + do_action('geodir_before_search_form') ?> |
|
46 | 46 | |
47 | 47 | <div class="clearfix geodir-loc-bar-in"> |
48 | 48 | <div class="geodir-search"> |
49 | 49 | |
50 | 50 | <?php |
51 | 51 | |
52 | - $default_search_for_text = SEARCH_FOR_TEXT; |
|
53 | - if (get_option('geodir_search_field_default_text')) |
|
54 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
52 | + $default_search_for_text = SEARCH_FOR_TEXT; |
|
53 | + if (get_option('geodir_search_field_default_text')) |
|
54 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
55 | 55 | |
56 | - $default_near_text = NEAR_TEXT; |
|
57 | - if (get_option('geodir_near_field_default_text')) |
|
58 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
56 | + $default_near_text = NEAR_TEXT; |
|
57 | + if (get_option('geodir_near_field_default_text')) |
|
58 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
59 | 59 | |
60 | - $default_search_button_label = __('Search', 'geodirectory'); |
|
61 | - if (get_option('geodir_search_button_label')) |
|
62 | - $default_search_button_label = __(get_option('geodir_search_button_label'), 'geodirectory'); |
|
60 | + $default_search_button_label = __('Search', 'geodirectory'); |
|
61 | + if (get_option('geodir_search_button_label')) |
|
62 | + $default_search_button_label = __(get_option('geodir_search_button_label'), 'geodirectory'); |
|
63 | 63 | |
64 | - $post_types = geodir_get_posttypes('object'); |
|
64 | + $post_types = geodir_get_posttypes('object'); |
|
65 | 65 | |
66 | - if (!empty($post_types) && count((array)$post_types) > 1): |
|
67 | - ?> |
|
66 | + if (!empty($post_types) && count((array)$post_types) > 1): |
|
67 | + ?> |
|
68 | 68 | <select name="stype" class="search_by_post"> |
69 | 69 | <?php foreach ($post_types as $post_type => $info): |
70 | - global $wpdb; |
|
71 | - $has_posts = ''; |
|
72 | - $has_posts = $wpdb->get_row($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type)); |
|
73 | - if (!$has_posts) { |
|
74 | - continue; |
|
75 | - } |
|
76 | - ?> |
|
70 | + global $wpdb; |
|
71 | + $has_posts = ''; |
|
72 | + $has_posts = $wpdb->get_row($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status='publish' LIMIT 1", $post_type)); |
|
73 | + if (!$has_posts) { |
|
74 | + continue; |
|
75 | + } |
|
76 | + ?> |
|
77 | 77 | |
78 | 78 | <option data-label="<?php echo get_post_type_archive_link($post_type);?>" |
79 | 79 | value="<?php echo $post_type;?>" <?php if (isset($_REQUEST['stype'])) { |
80 | - if ($post_type == $_REQUEST['stype']) { |
|
81 | - echo 'selected="selected"'; |
|
82 | - } |
|
83 | - } elseif ($curr_post_type == $post_type) { |
|
84 | - echo 'selected="selected"'; |
|
85 | - }?>><?php _e(ucfirst($info->labels->name), 'geodirectory');?></option> |
|
80 | + if ($post_type == $_REQUEST['stype']) { |
|
81 | + echo 'selected="selected"'; |
|
82 | + } |
|
83 | + } elseif ($curr_post_type == $post_type) { |
|
84 | + echo 'selected="selected"'; |
|
85 | + }?>><?php _e(ucfirst($info->labels->name), 'geodirectory');?></option> |
|
86 | 86 | |
87 | 87 | <?php endforeach; ?> |
88 | 88 | </select> |
89 | 89 | <?php elseif (!empty($post_types)): |
90 | - echo '<input type="hidden" name="stype" value="' . key($post_types) . '" />'; |
|
91 | - endif; ?> |
|
90 | + echo '<input type="hidden" name="stype" value="' . key($post_types) . '" />'; |
|
91 | + endif; ?> |
|
92 | 92 | |
93 | 93 | <input class="search_text" name="s" |
94 | 94 | value="<?php if (isset($_REQUEST['s']) && trim($_REQUEST['s']) != '') { |
95 | - echo esc_attr(stripslashes_deep($_REQUEST['s'])); |
|
96 | - } else { |
|
97 | - echo $default_search_for_text; |
|
98 | - } ?>" type="text" |
|
95 | + echo esc_attr(stripslashes_deep($_REQUEST['s'])); |
|
96 | + } else { |
|
97 | + echo $default_search_for_text; |
|
98 | + } ?>" type="text" |
|
99 | 99 | onblur="if (this.value == '') {this.value = '<?php echo $default_search_for_text; ?>';}" |
100 | 100 | onfocus="if (this.value == '<?php echo $default_search_for_text; ?>') {this.value = '';}" |
101 | 101 | onkeydown="javascript: if(event.keyCode == 13) geodir_click_search(this);"> |
102 | 102 | |
103 | 103 | |
104 | 104 | <?php |
105 | - if (isset($_REQUEST['snear']) && $_REQUEST['snear'] != '') { |
|
106 | - $near = esc_attr(stripslashes_deep($_REQUEST['snear'])); |
|
107 | - } else { |
|
108 | - $near = $default_near_text; |
|
109 | - } |
|
110 | - /** |
|
111 | - * Filter the "Near" text value for the search form. |
|
112 | - * |
|
113 | - * This is the input "value" attribute and can change depending on what the user searches and is not always the default value. |
|
114 | - * |
|
115 | - * @since 1.0.0 |
|
116 | - * @param string $near The current near value. |
|
117 | - * @param string $default_near_text The default near value. |
|
118 | - */ |
|
119 | - $near = apply_filters('geodir_search_near_text', $near, $default_near_text); |
|
120 | - /** |
|
121 | - * Filter the default "Near" text value for the search form. |
|
122 | - * |
|
123 | - * This is the default value if nothing has been searched. |
|
124 | - * |
|
125 | - * @since 1.0.0 |
|
126 | - * @param string $near The current near value. |
|
127 | - * @param string $default_near_text The default near value. |
|
128 | - */ |
|
129 | - $default_near_text = apply_filters('geodir_search_default_near_text', $default_near_text, $near); |
|
130 | - /** |
|
131 | - * Filter the class for the near search input. |
|
132 | - * |
|
133 | - * @since 1.0.0 |
|
134 | - * @param string $class The class for the HTML near input, default is blank. |
|
135 | - */ |
|
136 | - $near_class = apply_filters('geodir_search_near_class', ''); |
|
137 | - ?> |
|
105 | + if (isset($_REQUEST['snear']) && $_REQUEST['snear'] != '') { |
|
106 | + $near = esc_attr(stripslashes_deep($_REQUEST['snear'])); |
|
107 | + } else { |
|
108 | + $near = $default_near_text; |
|
109 | + } |
|
110 | + /** |
|
111 | + * Filter the "Near" text value for the search form. |
|
112 | + * |
|
113 | + * This is the input "value" attribute and can change depending on what the user searches and is not always the default value. |
|
114 | + * |
|
115 | + * @since 1.0.0 |
|
116 | + * @param string $near The current near value. |
|
117 | + * @param string $default_near_text The default near value. |
|
118 | + */ |
|
119 | + $near = apply_filters('geodir_search_near_text', $near, $default_near_text); |
|
120 | + /** |
|
121 | + * Filter the default "Near" text value for the search form. |
|
122 | + * |
|
123 | + * This is the default value if nothing has been searched. |
|
124 | + * |
|
125 | + * @since 1.0.0 |
|
126 | + * @param string $near The current near value. |
|
127 | + * @param string $default_near_text The default near value. |
|
128 | + */ |
|
129 | + $default_near_text = apply_filters('geodir_search_default_near_text', $default_near_text, $near); |
|
130 | + /** |
|
131 | + * Filter the class for the near search input. |
|
132 | + * |
|
133 | + * @since 1.0.0 |
|
134 | + * @param string $class The class for the HTML near input, default is blank. |
|
135 | + */ |
|
136 | + $near_class = apply_filters('geodir_search_near_class', ''); |
|
137 | + ?> |
|
138 | 138 | |
139 | 139 | <input name="snear" class="snear <?php echo $near_class; ?>" type="text" value="<?php echo $near; ?>" |
140 | 140 | onblur="if (this.value == '') {this.value = ('<?php echo $near; ?>' != '' ? '<?php echo $near; ?>' : '<?php echo $default_near_text; ?>');}" |
@@ -142,42 +142,42 @@ discard block |
||
142 | 142 | onkeydown="javascript: if(event.keyCode == 13) geodir_click_search(this);"/> |
143 | 143 | |
144 | 144 | <?php |
145 | - /** |
|
146 | - * Called on the GD search form just before the search button. |
|
147 | - * |
|
148 | - * @since 1.0.0 |
|
149 | - */ |
|
150 | - do_action('geodir_before_search_button'); |
|
151 | - |
|
152 | - /** |
|
153 | - * Filter the default search button text value for the search form. |
|
154 | - * |
|
155 | - * This text can be changed via an option in settings, this is a last resort. |
|
156 | - * |
|
157 | - * @since 1.5.5 |
|
158 | - * @param string $default_search_button_label The current search button text. |
|
159 | - */ |
|
160 | - $default_search_button_label = apply_filters('geodir_search_default_search_button_text', $default_search_button_label);?> |
|
145 | + /** |
|
146 | + * Called on the GD search form just before the search button. |
|
147 | + * |
|
148 | + * @since 1.0.0 |
|
149 | + */ |
|
150 | + do_action('geodir_before_search_button'); |
|
151 | + |
|
152 | + /** |
|
153 | + * Filter the default search button text value for the search form. |
|
154 | + * |
|
155 | + * This text can be changed via an option in settings, this is a last resort. |
|
156 | + * |
|
157 | + * @since 1.5.5 |
|
158 | + * @param string $default_search_button_label The current search button text. |
|
159 | + */ |
|
160 | + $default_search_button_label = apply_filters('geodir_search_default_search_button_text', $default_search_button_label);?> |
|
161 | 161 | <input type="button" value="<?php esc_attr_e($default_search_button_label); ?>" class="geodir_submit_search" /> |
162 | 162 | <?php |
163 | - /** |
|
164 | - * Called on the GD search form just after the search button. |
|
165 | - * |
|
166 | - * @since 1.0.0 |
|
167 | - */ |
|
168 | - do_action('geodir_after_search_button'); ?> |
|
163 | + /** |
|
164 | + * Called on the GD search form just after the search button. |
|
165 | + * |
|
166 | + * @since 1.0.0 |
|
167 | + */ |
|
168 | + do_action('geodir_after_search_button'); ?> |
|
169 | 169 | </div> |
170 | 170 | |
171 | 171 | |
172 | 172 | </div> |
173 | 173 | |
174 | 174 | <?php |
175 | - /** |
|
176 | - * Called inside the search form but after all the input fields. |
|
177 | - * |
|
178 | - * @since 1.0.0 |
|
179 | - */ |
|
180 | - do_action('geodir_after_search_form') ?> |
|
175 | + /** |
|
176 | + * Called inside the search form but after all the input fields. |
|
177 | + * |
|
178 | + * @since 1.0.0 |
|
179 | + */ |
|
180 | + do_action('geodir_after_search_form') ?> |
|
181 | 181 | |
182 | 182 | |
183 | 183 | </div> |
@@ -54,8 +54,9 @@ |
||
54 | 54 | echo "<p class=\"error_msg\"> " . INVALID_USER_PW_MSG . " </p>"; |
55 | 55 | } |
56 | 56 | |
57 | - if (isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm') |
|
58 | - echo '<p class="sucess_msg">' . PW_SEND_CONFIRM_MSG . '</p>'; |
|
57 | + if (isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm') { |
|
58 | + echo '<p class="sucess_msg">' . PW_SEND_CONFIRM_MSG . '</p>'; |
|
59 | + } |
|
59 | 60 | |
60 | 61 | ?> |
61 | 62 | <form name="cus_loginform" id="cus_loginform" action="<?php echo esc_url(geodir_curPageURL()); ?>" |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template for the login for box on the register/signin page |
|
4 | - * |
|
5 | - * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | - * |
|
7 | - * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | - * @since 1.0.0 |
|
9 | - * @package GeoDirectory |
|
10 | - */ |
|
3 | + * Template for the login for box on the register/signin page |
|
4 | + * |
|
5 | + * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | + * |
|
7 | + * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | + * @since 1.0.0 |
|
9 | + * @package GeoDirectory |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | if (isset($_GET['redirect_to']) && $_GET['redirect_to'] != '') { |
13 | - $redirect_to = $_GET['redirect_to']; |
|
13 | + $redirect_to = $_GET['redirect_to']; |
|
14 | 14 | } else { |
15 | - //echo $_SERVER['HTTP_HOST'] ; |
|
16 | - $redirect_to = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; |
|
17 | - if (strpos($redirect_to, $_SERVER['HTTP_HOST']) === false) { |
|
18 | - $redirect_to = home_url(); |
|
19 | - } |
|
15 | + //echo $_SERVER['HTTP_HOST'] ; |
|
16 | + $redirect_to = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; |
|
17 | + if (strpos($redirect_to, $_SERVER['HTTP_HOST']) === false) { |
|
18 | + $redirect_to = home_url(); |
|
19 | + } |
|
20 | 20 | |
21 | 21 | } |
22 | 22 | |
@@ -38,36 +38,36 @@ discard block |
||
38 | 38 | <h4> |
39 | 39 | <?php |
40 | 40 | |
41 | - /** |
|
42 | - * Filter the `SIGN_IN_PAGE_TITLE` title text on login form template. |
|
43 | - * |
|
44 | - * @since 1.0.0 |
|
45 | - */ |
|
46 | - echo apply_filters('geodir_login_page_title', SIGN_IN_PAGE_TITLE); |
|
41 | + /** |
|
42 | + * Filter the `SIGN_IN_PAGE_TITLE` title text on login form template. |
|
43 | + * |
|
44 | + * @since 1.0.0 |
|
45 | + */ |
|
46 | + echo apply_filters('geodir_login_page_title', SIGN_IN_PAGE_TITLE); |
|
47 | 47 | |
48 | - ?> |
|
48 | + ?> |
|
49 | 49 | </h4> |
50 | 50 | <?php |
51 | - if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'fw') { |
|
52 | - echo "<p class=\"error_msg\"> " . INVALID_USER_FPW_MSG . " </p>"; |
|
53 | - } elseif (isset($_REQUEST['logemsg']) && $_REQUEST['logemsg'] == 1) { |
|
54 | - echo "<p class=\"error_msg\"> " . INVALID_USER_PW_MSG . " </p>"; |
|
55 | - } |
|
51 | + if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'fw') { |
|
52 | + echo "<p class=\"error_msg\"> " . INVALID_USER_FPW_MSG . " </p>"; |
|
53 | + } elseif (isset($_REQUEST['logemsg']) && $_REQUEST['logemsg'] == 1) { |
|
54 | + echo "<p class=\"error_msg\"> " . INVALID_USER_PW_MSG . " </p>"; |
|
55 | + } |
|
56 | 56 | |
57 | - if (isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm') |
|
58 | - echo '<p class="sucess_msg">' . PW_SEND_CONFIRM_MSG . '</p>'; |
|
57 | + if (isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm') |
|
58 | + echo '<p class="sucess_msg">' . PW_SEND_CONFIRM_MSG . '</p>'; |
|
59 | 59 | |
60 | - ?> |
|
60 | + ?> |
|
61 | 61 | <form name="cus_loginform" id="cus_loginform" action="<?php echo esc_url(geodir_curPageURL()); ?>" |
62 | 62 | method="post"> |
63 | 63 | |
64 | 64 | <div class="form_row clearfix"> |
65 | 65 | <input placeholder='<?php echo USERNAME_TEXT; ?>' type="text" name="log" id="user_login" |
66 | 66 | value="<?php global $user_login; |
67 | - if (!isset($user_login)) { |
|
68 | - $user_login = ''; |
|
69 | - } |
|
70 | - echo esc_attr($user_login); ?>" size="20" class="textfield"/> |
|
67 | + if (!isset($user_login)) { |
|
68 | + $user_login = ''; |
|
69 | + } |
|
70 | + echo esc_attr($user_login); ?>" size="20" class="textfield"/> |
|
71 | 71 | <span class="user_loginInfo"></span> |
72 | 72 | </div> |
73 | 73 | |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | </div> |
79 | 79 | |
80 | 80 | <?php |
81 | - /** |
|
82 | - * This is a default WordPress action that calls any additional elements needed for any login forms. |
|
83 | - * |
|
84 | - * We use this action before the remember me checkbox on the sigin form. |
|
85 | - * |
|
86 | - * @since 1.0.0 |
|
87 | - */ |
|
88 | - do_action('login_form'); ?> |
|
81 | + /** |
|
82 | + * This is a default WordPress action that calls any additional elements needed for any login forms. |
|
83 | + * |
|
84 | + * We use this action before the remember me checkbox on the sigin form. |
|
85 | + * |
|
86 | + * @since 1.0.0 |
|
87 | + */ |
|
88 | + do_action('login_form'); ?> |
|
89 | 89 | <p class="rember"> |
90 | 90 | <input name="rememberme" type="checkbox" id="rememberme" value="forever" class="fl"/> |
91 | 91 | <?php echo REMEMBER_ON_COMPUTER_TEXT; ?> |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | <input placeholder='<?php echo USERNAME_EMAIL_TEXT; ?>' type="text" name="user_login" |
110 | 110 | value="<?php echo esc_attr($user_login); ?>" size="20" class="user_login1 textfield"/> |
111 | 111 | <?php |
112 | - /** |
|
113 | - * Called before the get new password button in the login box template. |
|
114 | - * |
|
115 | - * @since 1.0.0 |
|
116 | - */ |
|
117 | - do_action('lostpassword_form'); ?> |
|
112 | + /** |
|
113 | + * Called before the get new password button in the login box template. |
|
114 | + * |
|
115 | + * @since 1.0.0 |
|
116 | + */ |
|
117 | + do_action('lostpassword_form'); ?> |
|
118 | 118 | </div> |
119 | 119 | <input type="submit" name="get_new_password" value="<?php echo GET_NEW_PW_TEXT; ?>" class="geodir_button"/> |
120 | 120 | </form> |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | * @param int $post_id The post id requested by the popup. |
20 | 20 | * @param object $post_info The post object requested by the popup. |
21 | 21 | */ |
22 | -do_action('geodir_popup_forms_template_start',$post_id,$post_info); |
|
22 | +do_action('geodir_popup_forms_template_start', $post_id, $post_info); |
|
23 | 23 | |
24 | 24 | if ($_REQUEST['popuptype'] == 'b_sendtofriend') { ?> |
25 | 25 | |
26 | 26 | <div id="basic-modal-content" class="clearfix"> |
27 | 27 | <form name="send_to_frnd" id="send_to_frnd" action="<?php echo get_permalink($post_info->ID); ?>" method="post"> |
28 | 28 | <input type="hidden" name="sendact" value="email_frnd"/> |
29 | - <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID;?>"/> |
|
29 | + <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID; ?>"/> |
|
30 | 30 | |
31 | 31 | <h3><?php |
32 | 32 | /** |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @since 1.0.0 |
36 | 36 | * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text. |
37 | 37 | */ |
38 | - echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3> |
|
38 | + echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND); ?></h3> |
|
39 | 39 | |
40 | 40 | <p id="reply_send_success" class="sucess_msg" style="display:none;"></p> |
41 | 41 | <?php |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | * @since 1.0.0 |
46 | 46 | * @param string $field The field name the actions is called before. |
47 | 47 | */ |
48 | - do_action('geodir_before_stf_form_field', 'to_name');?> |
|
48 | + do_action('geodir_before_stf_form_field', 'to_name'); ?> |
|
49 | 49 | <div class="row clearfix"> |
50 | 50 | <div class="geodir_popup_heading"> |
51 | - <label><?php _e('Friend Name', 'geodirectory');?> : <span>*</span></label></div> |
|
51 | + <label><?php _e('Friend Name', 'geodirectory'); ?> : <span>*</span></label></div> |
|
52 | 52 | <div class="geodir_popup_field"> |
53 | 53 | <input class="is_required" field_type="text" name="to_name" id="to_name" type="text" value=""/> |
54 | 54 | <span class="message_error2" id="to_nameInfo"></span></div> |
@@ -60,75 +60,75 @@ discard block |
||
60 | 60 | * @since 1.0.0 |
61 | 61 | * @param string $field The field name the actions is called after. |
62 | 62 | */ |
63 | - do_action('geodir_after_stf_form_field', 'to_name');?> |
|
63 | + do_action('geodir_after_stf_form_field', 'to_name'); ?> |
|
64 | 64 | <?php |
65 | 65 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
66 | - do_action('geodir_before_stf_form_field', 'to_email');?> |
|
66 | + do_action('geodir_before_stf_form_field', 'to_email'); ?> |
|
67 | 67 | <div class="row clearfix"> |
68 | 68 | <div class="geodir_popup_heading"> |
69 | - <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
|
69 | + <label> <?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div> |
|
70 | 70 | <div class="geodir_popup_field"> |
71 | 71 | <input class="is_required" field_type="email" name="to_email" id="to_email" type="text" value=""/> |
72 | 72 | <span class="message_error2" id="to_emailInfo"></span></div> |
73 | 73 | </div> |
74 | 74 | <?php |
75 | 75 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
76 | - do_action('geodir_after_stf_form_field', 'to_email');?> |
|
76 | + do_action('geodir_after_stf_form_field', 'to_email'); ?> |
|
77 | 77 | <?php |
78 | 78 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
79 | - do_action('geodir_before_stf_form_field', 'yourname');?> |
|
79 | + do_action('geodir_before_stf_form_field', 'yourname'); ?> |
|
80 | 80 | <div class="row clearfix"> |
81 | 81 | <div class="geodir_popup_heading"> |
82 | - <label><?php _e('Your Name', 'geodirectory');?> : <span>*</span></label></div> |
|
82 | + <label><?php _e('Your Name', 'geodirectory'); ?> : <span>*</span></label></div> |
|
83 | 83 | <div class="geodir_popup_field"> |
84 | 84 | <input class="is_required" field_type="text" name="yourname" id="yourname" type="text" value=""/> |
85 | 85 | <span class="message_error2" id="yournameInfo"></span></div> |
86 | 86 | </div> |
87 | 87 | <?php |
88 | 88 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
89 | - do_action('geodir_after_stf_form_field', 'yourname');?> |
|
89 | + do_action('geodir_after_stf_form_field', 'yourname'); ?> |
|
90 | 90 | <?php |
91 | 91 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
92 | - do_action('geodir_before_stf_form_field', 'youremail');?> |
|
92 | + do_action('geodir_before_stf_form_field', 'youremail'); ?> |
|
93 | 93 | <div class="row clearfix"> |
94 | 94 | <div class="geodir_popup_heading"> |
95 | - <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
|
95 | + <label> <?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div> |
|
96 | 96 | <div class="geodir_popup_field"> |
97 | 97 | <input class="is_required" field_type="email" name="youremail" id="youremail" type="text" value=""/> |
98 | 98 | <span class="message_error2" id="youremailInfo"></span></div> |
99 | 99 | </div> |
100 | 100 | <?php |
101 | 101 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
102 | - do_action('geodir_after_stf_form_field', 'youremail');?> |
|
102 | + do_action('geodir_after_stf_form_field', 'youremail'); ?> |
|
103 | 103 | <?php |
104 | 104 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
105 | - do_action('geodir_before_stf_form_field', 'frnd_subject');?> |
|
105 | + do_action('geodir_before_stf_form_field', 'frnd_subject'); ?> |
|
106 | 106 | <div class="row clearfix"> |
107 | 107 | <div class="geodir_popup_heading"> |
108 | - <label><?php _e('Subject', 'geodirectory');?> : <span>*</span></label></div> |
|
108 | + <label><?php _e('Subject', 'geodirectory'); ?> : <span>*</span></label></div> |
|
109 | 109 | <div class="geodir_popup_field"> |
110 | 110 | <input class="is_required" field_type="text" name="frnd_subject" |
111 | - value="<?php echo __('About', 'geodirectory') . ' ' . $post_info->post_title;?>" |
|
111 | + value="<?php echo __('About', 'geodirectory') . ' ' . $post_info->post_title; ?>" |
|
112 | 112 | id="frnd_subject" type="text" value=""/> |
113 | 113 | <span class="message_error2" id="frnd_subjectInfo"></span></div> |
114 | 114 | </div> |
115 | 115 | <?php |
116 | 116 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
117 | - do_action('geodir_after_stf_form_field', 'frnd_subject');?> |
|
117 | + do_action('geodir_after_stf_form_field', 'frnd_subject'); ?> |
|
118 | 118 | <?php |
119 | 119 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
120 | - do_action('geodir_before_stf_form_field', 'frnd_comments');?> |
|
120 | + do_action('geodir_before_stf_form_field', 'frnd_comments'); ?> |
|
121 | 121 | <div class="row clearfix"> |
122 | 122 | <div class="geodir_popup_heading"> |
123 | - <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div> |
|
123 | + <label><?php _e('Comments', 'geodirectory'); ?> : <span>*</span></label></div> |
|
124 | 124 | <div class="geodir_popup_field"> |
125 | 125 | <textarea class="is_required" field_type="textarea" name="frnd_comments" id="frnd_comments" cols="" |
126 | - rows=""><?php echo SEND_TO_FRIEND_SAMPLE_CONTENT;?></textarea> |
|
126 | + rows=""><?php echo SEND_TO_FRIEND_SAMPLE_CONTENT; ?></textarea> |
|
127 | 127 | <span class="message_error2" id="frnd_commentsInfo"></span></div> |
128 | 128 | </div> |
129 | 129 | <?php |
130 | 130 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
131 | - do_action('geodir_after_stf_form_field', 'frnd_comments');?> |
|
131 | + do_action('geodir_after_stf_form_field', 'frnd_comments'); ?> |
|
132 | 132 | <?php if (function_exists('geodir_get_captch')) { |
133 | 133 | geodir_get_captch('-1'); |
134 | 134 | }?> |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | <form method="post" name="agt_mail_agent" id="agt_mail_agent" |
143 | 143 | action="<?php echo get_permalink($post_info->ID); ?>"> |
144 | 144 | <input type="hidden" name="sendact" value="send_inqury"/> |
145 | - <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/> |
|
145 | + <input type="hidden" name="pid" value="<?php echo $post_info->ID; ?>"/> |
|
146 | 146 | |
147 | 147 | <h3><?php |
148 | 148 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @since 1.0.0 |
152 | 152 | * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
153 | 153 | */ |
154 | - echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
154 | + echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY); ?> </h3> |
|
155 | 155 | |
156 | 156 | <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p> |
157 | 157 | <?php |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | * @since 1.0.0 |
162 | 162 | * @param string $field The field name the actions is called before. |
163 | 163 | */ |
164 | - do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
164 | + do_action('geodir_before_inquiry_form_field', 'inq_name'); ?> |
|
165 | 165 | <div class="row clearfix"> |
166 | - <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory');?> : |
|
166 | + <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory'); ?> : |
|
167 | 167 | <span>*</span></label></div> |
168 | 168 | <div class="geodir_popup_field"> |
169 | 169 | <input class="is_required" field_type="text" name="inq_name" type="text" value=""/> |
@@ -176,13 +176,13 @@ discard block |
||
176 | 176 | * @since 1.0.0 |
177 | 177 | * @param string $field The field name the actions is called after. |
178 | 178 | */ |
179 | - do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
179 | + do_action('geodir_after_inquiry_form_field', 'inq_name'); ?> |
|
180 | 180 | <?php |
181 | 181 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
182 | - do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
182 | + do_action('geodir_before_inquiry_form_field', 'inq_email'); ?> |
|
183 | 183 | <div class="row clearfix"> |
184 | 184 | <div class="geodir_popup_heading"> |
185 | - <label><?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
|
185 | + <label><?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div> |
|
186 | 186 | <div class="geodir_popup_field"> |
187 | 187 | <input class="is_required" field_type="email" name="inq_email" type="text" value=""/> |
188 | 188 | <span class="message_error2" id="span_agt_mail_email"></span> |
@@ -190,35 +190,35 @@ discard block |
||
190 | 190 | </div> |
191 | 191 | <?php |
192 | 192 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
193 | - do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
193 | + do_action('geodir_after_inquiry_form_field', 'inq_email'); ?> |
|
194 | 194 | <?php |
195 | 195 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
196 | - do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
196 | + do_action('geodir_before_inquiry_form_field', 'inq_phone'); ?> |
|
197 | 197 | <div class="row clearfix"> |
198 | 198 | <div class="geodir_popup_heading"> |
199 | - <label><?php _e('Contact Info', 'geodirectory');?> :</label></div> |
|
199 | + <label><?php _e('Contact Info', 'geodirectory'); ?> :</label></div> |
|
200 | 200 | <div class="geodir_popup_field"> |
201 | 201 | <input name="inq_phone" id="agt_mail_phone" type="text" value=""/> |
202 | 202 | </div> |
203 | 203 | </div> |
204 | 204 | <?php |
205 | 205 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
206 | - do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
206 | + do_action('geodir_after_inquiry_form_field', 'inq_phone'); ?> |
|
207 | 207 | <?php |
208 | 208 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
209 | - do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
209 | + do_action('geodir_before_inquiry_form_field', 'inq_msg'); ?> |
|
210 | 210 | <div class="row clearfix"> |
211 | 211 | <div class="geodir_popup_heading"> |
212 | - <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div> |
|
212 | + <label><?php _e('Comments', 'geodirectory'); ?> : <span>*</span></label></div> |
|
213 | 213 | <div class="geodir_popup_field"> |
214 | 214 | <textarea class="is_required" field_type="textarea" name="inq_msg" cols="" |
215 | - rows=""><?php echo SEND_INQUIRY_SAMPLE_CONTENT;?></textarea> |
|
215 | + rows=""><?php echo SEND_INQUIRY_SAMPLE_CONTENT; ?></textarea> |
|
216 | 216 | <span class="message_error2" id="span_agt_mail_msg"></span></div> |
217 | 217 | </div> |
218 | 218 | <?php |
219 | 219 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
220 | - do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
221 | - <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>" |
|
220 | + do_action('geodir_after_inquiry_form_field', 'inq_msg'); ?> |
|
221 | + <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory'); ?>" |
|
222 | 222 | class="button clearfix"/> |
223 | 223 | </form> |
224 | 224 | </div> <?php |
@@ -29,23 +29,23 @@ discard block |
||
29 | 29 | <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID;?>"/> |
30 | 30 | |
31 | 31 | <h3><?php |
32 | - /** |
|
33 | - * Filter the title for the send to friend popup form. |
|
34 | - * |
|
35 | - * @since 1.0.0 |
|
36 | - * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text. |
|
37 | - */ |
|
38 | - echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3> |
|
32 | + /** |
|
33 | + * Filter the title for the send to friend popup form. |
|
34 | + * |
|
35 | + * @since 1.0.0 |
|
36 | + * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text. |
|
37 | + */ |
|
38 | + echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3> |
|
39 | 39 | |
40 | 40 | <p id="reply_send_success" class="sucess_msg" style="display:none;"></p> |
41 | 41 | <?php |
42 | - /** |
|
43 | - * Called before each field in the send to friend popup template. |
|
44 | - * |
|
45 | - * @since 1.0.0 |
|
46 | - * @param string $field The field name the actions is called before. |
|
47 | - */ |
|
48 | - do_action('geodir_before_stf_form_field', 'to_name');?> |
|
42 | + /** |
|
43 | + * Called before each field in the send to friend popup template. |
|
44 | + * |
|
45 | + * @since 1.0.0 |
|
46 | + * @param string $field The field name the actions is called before. |
|
47 | + */ |
|
48 | + do_action('geodir_before_stf_form_field', 'to_name');?> |
|
49 | 49 | <div class="row clearfix"> |
50 | 50 | <div class="geodir_popup_heading"> |
51 | 51 | <label><?php _e('Friend Name', 'geodirectory');?> : <span>*</span></label></div> |
@@ -54,16 +54,16 @@ discard block |
||
54 | 54 | <span class="message_error2" id="to_nameInfo"></span></div> |
55 | 55 | </div> |
56 | 56 | <?php |
57 | - /** |
|
58 | - * Called after each field in the send to friend popup template. |
|
59 | - * |
|
60 | - * @since 1.0.0 |
|
61 | - * @param string $field The field name the actions is called after. |
|
62 | - */ |
|
63 | - do_action('geodir_after_stf_form_field', 'to_name');?> |
|
57 | + /** |
|
58 | + * Called after each field in the send to friend popup template. |
|
59 | + * |
|
60 | + * @since 1.0.0 |
|
61 | + * @param string $field The field name the actions is called after. |
|
62 | + */ |
|
63 | + do_action('geodir_after_stf_form_field', 'to_name');?> |
|
64 | 64 | <?php |
65 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
66 | - do_action('geodir_before_stf_form_field', 'to_email');?> |
|
65 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
66 | + do_action('geodir_before_stf_form_field', 'to_email');?> |
|
67 | 67 | <div class="row clearfix"> |
68 | 68 | <div class="geodir_popup_heading"> |
69 | 69 | <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | <span class="message_error2" id="to_emailInfo"></span></div> |
73 | 73 | </div> |
74 | 74 | <?php |
75 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
76 | - do_action('geodir_after_stf_form_field', 'to_email');?> |
|
75 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
76 | + do_action('geodir_after_stf_form_field', 'to_email');?> |
|
77 | 77 | <?php |
78 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
79 | - do_action('geodir_before_stf_form_field', 'yourname');?> |
|
78 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
79 | + do_action('geodir_before_stf_form_field', 'yourname');?> |
|
80 | 80 | <div class="row clearfix"> |
81 | 81 | <div class="geodir_popup_heading"> |
82 | 82 | <label><?php _e('Your Name', 'geodirectory');?> : <span>*</span></label></div> |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | <span class="message_error2" id="yournameInfo"></span></div> |
86 | 86 | </div> |
87 | 87 | <?php |
88 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
89 | - do_action('geodir_after_stf_form_field', 'yourname');?> |
|
88 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
89 | + do_action('geodir_after_stf_form_field', 'yourname');?> |
|
90 | 90 | <?php |
91 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
92 | - do_action('geodir_before_stf_form_field', 'youremail');?> |
|
91 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
92 | + do_action('geodir_before_stf_form_field', 'youremail');?> |
|
93 | 93 | <div class="row clearfix"> |
94 | 94 | <div class="geodir_popup_heading"> |
95 | 95 | <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | <span class="message_error2" id="youremailInfo"></span></div> |
99 | 99 | </div> |
100 | 100 | <?php |
101 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
102 | - do_action('geodir_after_stf_form_field', 'youremail');?> |
|
101 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
102 | + do_action('geodir_after_stf_form_field', 'youremail');?> |
|
103 | 103 | <?php |
104 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
105 | - do_action('geodir_before_stf_form_field', 'frnd_subject');?> |
|
104 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
105 | + do_action('geodir_before_stf_form_field', 'frnd_subject');?> |
|
106 | 106 | <div class="row clearfix"> |
107 | 107 | <div class="geodir_popup_heading"> |
108 | 108 | <label><?php _e('Subject', 'geodirectory');?> : <span>*</span></label></div> |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | <span class="message_error2" id="frnd_subjectInfo"></span></div> |
114 | 114 | </div> |
115 | 115 | <?php |
116 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
117 | - do_action('geodir_after_stf_form_field', 'frnd_subject');?> |
|
116 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
117 | + do_action('geodir_after_stf_form_field', 'frnd_subject');?> |
|
118 | 118 | <?php |
119 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
120 | - do_action('geodir_before_stf_form_field', 'frnd_comments');?> |
|
119 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
120 | + do_action('geodir_before_stf_form_field', 'frnd_comments');?> |
|
121 | 121 | <div class="row clearfix"> |
122 | 122 | <div class="geodir_popup_heading"> |
123 | 123 | <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div> |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | <span class="message_error2" id="frnd_commentsInfo"></span></div> |
128 | 128 | </div> |
129 | 129 | <?php |
130 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
131 | - do_action('geodir_after_stf_form_field', 'frnd_comments');?> |
|
130 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
131 | + do_action('geodir_after_stf_form_field', 'frnd_comments');?> |
|
132 | 132 | <?php if (function_exists('geodir_get_captch')) { |
133 | - geodir_get_captch('-1'); |
|
134 | - }?> |
|
133 | + geodir_get_captch('-1'); |
|
134 | + }?> |
|
135 | 135 | <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory')?> " class="button "/> |
136 | 136 | </form> |
137 | 137 | </div> <?php |
@@ -145,23 +145,23 @@ discard block |
||
145 | 145 | <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/> |
146 | 146 | |
147 | 147 | <h3><?php |
148 | - /** |
|
149 | - * Filter the title for the send inquiry popup form. |
|
150 | - * |
|
151 | - * @since 1.0.0 |
|
152 | - * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
|
153 | - */ |
|
154 | - echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
148 | + /** |
|
149 | + * Filter the title for the send inquiry popup form. |
|
150 | + * |
|
151 | + * @since 1.0.0 |
|
152 | + * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
|
153 | + */ |
|
154 | + echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
155 | 155 | |
156 | 156 | <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p> |
157 | 157 | <?php |
158 | - /** |
|
159 | - * Called before each field in the send to friend inquiry template. |
|
160 | - * |
|
161 | - * @since 1.0.0 |
|
162 | - * @param string $field The field name the actions is called before. |
|
163 | - */ |
|
164 | - do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
158 | + /** |
|
159 | + * Called before each field in the send to friend inquiry template. |
|
160 | + * |
|
161 | + * @since 1.0.0 |
|
162 | + * @param string $field The field name the actions is called before. |
|
163 | + */ |
|
164 | + do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
165 | 165 | <div class="row clearfix"> |
166 | 166 | <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory');?> : |
167 | 167 | <span>*</span></label></div> |
@@ -170,16 +170,16 @@ discard block |
||
170 | 170 | <span class="message_error2" id="span_agt_mail_name"></span></div> |
171 | 171 | </div> |
172 | 172 | <?php |
173 | - /** |
|
174 | - * Called after each field in the send to friend inquiry template. |
|
175 | - * |
|
176 | - * @since 1.0.0 |
|
177 | - * @param string $field The field name the actions is called after. |
|
178 | - */ |
|
179 | - do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
173 | + /** |
|
174 | + * Called after each field in the send to friend inquiry template. |
|
175 | + * |
|
176 | + * @since 1.0.0 |
|
177 | + * @param string $field The field name the actions is called after. |
|
178 | + */ |
|
179 | + do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
180 | 180 | <?php |
181 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
182 | - do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
181 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
182 | + do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
183 | 183 | <div class="row clearfix"> |
184 | 184 | <div class="geodir_popup_heading"> |
185 | 185 | <label><?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
@@ -189,11 +189,11 @@ discard block |
||
189 | 189 | </div> |
190 | 190 | </div> |
191 | 191 | <?php |
192 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
193 | - do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
192 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
193 | + do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
194 | 194 | <?php |
195 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
196 | - do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
195 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
196 | + do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
197 | 197 | <div class="row clearfix"> |
198 | 198 | <div class="geodir_popup_heading"> |
199 | 199 | <label><?php _e('Contact Info', 'geodirectory');?> :</label></div> |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | </div> |
203 | 203 | </div> |
204 | 204 | <?php |
205 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
206 | - do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
205 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
206 | + do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
207 | 207 | <?php |
208 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
209 | - do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
208 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
209 | + do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
210 | 210 | <div class="row clearfix"> |
211 | 211 | <div class="geodir_popup_heading"> |
212 | 212 | <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div> |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | <span class="message_error2" id="span_agt_mail_msg"></span></div> |
217 | 217 | </div> |
218 | 218 | <?php |
219 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
220 | - do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
219 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
220 | + do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
221 | 221 | <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>" |
222 | 222 | class="button clearfix"/> |
223 | 223 | </form> |
@@ -61,10 +61,11 @@ |
||
61 | 61 | ob_start(); |
62 | 62 | echo '<h5 class="geodir_information">'; |
63 | 63 | |
64 | - if (!isset($_REQUEST['pid'])) |
|
65 | - printf(GOING_TO_FREE_MSG, $type_title, $alive_days); |
|
66 | - else |
|
67 | - printf(GOING_TO_UPDATE_MSG, $type_title, $alive_days); |
|
64 | + if (!isset($_REQUEST['pid'])) { |
|
65 | + printf(GOING_TO_FREE_MSG, $type_title, $alive_days); |
|
66 | + } else { |
|
67 | + printf(GOING_TO_UPDATE_MSG, $type_title, $alive_days); |
|
68 | + } |
|
68 | 69 | |
69 | 70 | echo '</h5>'; |
70 | 71 | $publish_listing_form_message = ob_get_clean(); |
@@ -110,7 +110,7 @@ |
||
110 | 110 | if (isset($post->pid)) { |
111 | 111 | $post_id = $post->pid; |
112 | 112 | } else if (isset($_REQUEST['pid'])) { |
113 | - $post_id = (int)$_REQUEST['pid']; |
|
113 | + $post_id = (int) $_REQUEST['pid']; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | $postlink = get_permalink(geodir_add_listing_page_id()); |
@@ -1,23 +1,23 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template for the buttons and messages on the preview page |
|
4 | - * |
|
5 | - * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | - * |
|
7 | - * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | - * @since 1.0.0 |
|
9 | - * @package GeoDirectory |
|
10 | - * @global object $wpdb WordPress Database object. |
|
11 | - * @global object $post The current post object. |
|
12 | - */ |
|
3 | + * Template for the buttons and messages on the preview page |
|
4 | + * |
|
5 | + * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | + * |
|
7 | + * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | + * @since 1.0.0 |
|
9 | + * @package GeoDirectory |
|
10 | + * @global object $wpdb WordPress Database object. |
|
11 | + * @global object $post The current post object. |
|
12 | + */ |
|
13 | 13 | global $wpdb, $post; |
14 | 14 | |
15 | 15 | $post_type = $post->listing_type; |
16 | 16 | |
17 | 17 | if (isset($_REQUEST['preview']) && $_REQUEST['preview'] && isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
18 | - $form_action_url = geodir_get_ajax_url() . '&geodir_ajax=add_listing&ajax_action=update&listing_type=' . $post_type; |
|
18 | + $form_action_url = geodir_get_ajax_url() . '&geodir_ajax=add_listing&ajax_action=update&listing_type=' . $post_type; |
|
19 | 19 | } elseif (isset($_REQUEST['preview']) && $_REQUEST['preview']) { |
20 | - $form_action_url = geodir_get_ajax_url() . '&geodir_ajax=add_listing&ajax_action=publish&listing_type=' . $post_type; |
|
20 | + $form_action_url = geodir_get_ajax_url() . '&geodir_ajax=add_listing&ajax_action=publish&listing_type=' . $post_type; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
@@ -45,48 +45,48 @@ discard block |
||
45 | 45 | <form action="<?php echo $form_action_url; ?>" name="publish_listing" id="publish_listing" method="post"> |
46 | 46 | <div class="clearfix"> |
47 | 47 | <input type="hidden" name="pid" value="<?php if (isset($post->pid)) { |
48 | - echo $post->pid; |
|
49 | - } ?>"> |
|
48 | + echo $post->pid; |
|
49 | + } ?>"> |
|
50 | 50 | <?php |
51 | - /** |
|
52 | - * Called on the add listing preview page inside the publish listings form, before the publish message. |
|
53 | - * |
|
54 | - * @since 1.0.0 |
|
55 | - * @see 'geodir_publish_listing_form_after_msg' |
|
56 | - */ |
|
57 | - do_action('geodir_publish_listing_form_before_msg'); ?> |
|
51 | + /** |
|
52 | + * Called on the add listing preview page inside the publish listings form, before the publish message. |
|
53 | + * |
|
54 | + * @since 1.0.0 |
|
55 | + * @see 'geodir_publish_listing_form_after_msg' |
|
56 | + */ |
|
57 | + do_action('geodir_publish_listing_form_before_msg'); ?> |
|
58 | 58 | <?php |
59 | - $alive_days = UNLIMITED; |
|
60 | - $type_title = ''; |
|
61 | - ob_start(); |
|
62 | - echo '<h5 class="geodir_information">'; |
|
63 | - |
|
64 | - if (!isset($_REQUEST['pid'])) |
|
65 | - printf(GOING_TO_FREE_MSG, $type_title, $alive_days); |
|
66 | - else |
|
67 | - printf(GOING_TO_UPDATE_MSG, $type_title, $alive_days); |
|
68 | - |
|
69 | - echo '</h5>'; |
|
70 | - $publish_listing_form_message = ob_get_clean(); |
|
71 | - /** |
|
72 | - * Filter the publish listing message on the preview page. |
|
73 | - * |
|
74 | - * @since 1.0.0 |
|
75 | - * @param string $publish_listing_form_message The message to be filtered. |
|
76 | - */ |
|
77 | - $publish_listing_form_message = apply_filters('geodir_publish_listing_form_message', $publish_listing_form_message); |
|
78 | - echo $publish_listing_form_message; |
|
79 | - |
|
80 | - /** |
|
81 | - * Called on the add listing preview page inside the publish listings form, after the publish message. |
|
82 | - * |
|
83 | - * @since 1.0.0 |
|
84 | - * @see 'geodir_publish_listing_form_before_msg' |
|
85 | - */ |
|
86 | - do_action('geodir_publish_listing_form_after_msg'); |
|
87 | - |
|
88 | - ob_start(); // start action button buffering |
|
89 | - ?> |
|
59 | + $alive_days = UNLIMITED; |
|
60 | + $type_title = ''; |
|
61 | + ob_start(); |
|
62 | + echo '<h5 class="geodir_information">'; |
|
63 | + |
|
64 | + if (!isset($_REQUEST['pid'])) |
|
65 | + printf(GOING_TO_FREE_MSG, $type_title, $alive_days); |
|
66 | + else |
|
67 | + printf(GOING_TO_UPDATE_MSG, $type_title, $alive_days); |
|
68 | + |
|
69 | + echo '</h5>'; |
|
70 | + $publish_listing_form_message = ob_get_clean(); |
|
71 | + /** |
|
72 | + * Filter the publish listing message on the preview page. |
|
73 | + * |
|
74 | + * @since 1.0.0 |
|
75 | + * @param string $publish_listing_form_message The message to be filtered. |
|
76 | + */ |
|
77 | + $publish_listing_form_message = apply_filters('geodir_publish_listing_form_message', $publish_listing_form_message); |
|
78 | + echo $publish_listing_form_message; |
|
79 | + |
|
80 | + /** |
|
81 | + * Called on the add listing preview page inside the publish listings form, after the publish message. |
|
82 | + * |
|
83 | + * @since 1.0.0 |
|
84 | + * @see 'geodir_publish_listing_form_before_msg' |
|
85 | + */ |
|
86 | + do_action('geodir_publish_listing_form_after_msg'); |
|
87 | + |
|
88 | + ob_start(); // start action button buffering |
|
89 | + ?> |
|
90 | 90 | <?php if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { ?> |
91 | 91 | |
92 | 92 | <input type="submit" name="Submit and Pay" value="<?php echo PRO_UPDATE_BUTTON; ?>" |
@@ -95,57 +95,57 @@ discard block |
||
95 | 95 | <input type="submit" name="Submit and Pay" value="<?php echo PRO_SUBMIT_BUTTON; ?>" |
96 | 96 | class=" geodir_button geodir_publish_button"/> |
97 | 97 | <?php |
98 | - } |
|
99 | - $publish_listing_form_button = ob_get_clean(); |
|
100 | - /** |
|
101 | - * Filter the HTML button for publishing the listing on the preview page. |
|
102 | - * |
|
103 | - * @since 1.0.0 |
|
104 | - * @param string $publish_listing_form_button The HTML for the submit button. |
|
105 | - */ |
|
106 | - $publish_listing_form_button = apply_filters('geodir_publish_listing_form_button', $publish_listing_form_button); |
|
107 | - echo $publish_listing_form_button; |
|
108 | - |
|
109 | - $post_id = ''; |
|
110 | - if (isset($post->pid)) { |
|
111 | - $post_id = $post->pid; |
|
112 | - } else if (isset($_REQUEST['pid'])) { |
|
113 | - $post_id = (int)$_REQUEST['pid']; |
|
114 | - } |
|
115 | - |
|
116 | - $postlink = get_permalink(geodir_add_listing_page_id()); |
|
117 | - $postlink = geodir_getlink($postlink, array('pid' => $post_id, 'backandedit' => '1', 'listing_type' => $post_type), false); |
|
118 | - |
|
119 | - ob_start(); // start go back and edit / cancel buffering |
|
120 | - ?> |
|
98 | + } |
|
99 | + $publish_listing_form_button = ob_get_clean(); |
|
100 | + /** |
|
101 | + * Filter the HTML button for publishing the listing on the preview page. |
|
102 | + * |
|
103 | + * @since 1.0.0 |
|
104 | + * @param string $publish_listing_form_button The HTML for the submit button. |
|
105 | + */ |
|
106 | + $publish_listing_form_button = apply_filters('geodir_publish_listing_form_button', $publish_listing_form_button); |
|
107 | + echo $publish_listing_form_button; |
|
108 | + |
|
109 | + $post_id = ''; |
|
110 | + if (isset($post->pid)) { |
|
111 | + $post_id = $post->pid; |
|
112 | + } else if (isset($_REQUEST['pid'])) { |
|
113 | + $post_id = (int)$_REQUEST['pid']; |
|
114 | + } |
|
115 | + |
|
116 | + $postlink = get_permalink(geodir_add_listing_page_id()); |
|
117 | + $postlink = geodir_getlink($postlink, array('pid' => $post_id, 'backandedit' => '1', 'listing_type' => $post_type), false); |
|
118 | + |
|
119 | + ob_start(); // start go back and edit / cancel buffering |
|
120 | + ?> |
|
121 | 121 | <a href="<?php echo esc_url($postlink); ?>" class="geodir_goback"><?php echo PRO_BACK_AND_EDIT_TEXT; ?></a> |
122 | 122 | <input type="button" name="Cancel" value="<?php echo(PRO_CANCEL_BUTTON); ?>" |
123 | 123 | class="geodir_button geodir_cancle_button" |
124 | 124 | onclick="window.location.href='<?php echo geodir_get_ajax_url() . '&geodir_ajax=add_listing&ajax_action=cancel&pid=' . $post_id . '&listing_type=' . $post_type; ?>'"/> |
125 | 125 | <?php |
126 | 126 | |
127 | - $publish_listing_form_go_back = ob_get_clean(); |
|
128 | - /** |
|
129 | - * Filter the cancel and go back and edit HTML on the preview page. |
|
130 | - * |
|
131 | - * @since 1.0.0 |
|
132 | - * @param string $publish_listing_form_go_back The HTML for the cancel and go back and edit button/link. |
|
133 | - */ |
|
134 | - $publish_listing_form_go_back = apply_filters('geodir_publish_listing_form_go_back', $publish_listing_form_go_back); |
|
135 | - echo $publish_listing_form_go_back; |
|
136 | - |
|
137 | - ?> |
|
127 | + $publish_listing_form_go_back = ob_get_clean(); |
|
128 | + /** |
|
129 | + * Filter the cancel and go back and edit HTML on the preview page. |
|
130 | + * |
|
131 | + * @since 1.0.0 |
|
132 | + * @param string $publish_listing_form_go_back The HTML for the cancel and go back and edit button/link. |
|
133 | + */ |
|
134 | + $publish_listing_form_go_back = apply_filters('geodir_publish_listing_form_go_back', $publish_listing_form_go_back); |
|
135 | + echo $publish_listing_form_go_back; |
|
136 | + |
|
137 | + ?> |
|
138 | 138 | </div> |
139 | 139 | </form> |
140 | 140 | </div> |
141 | 141 | <?php |
142 | 142 | $publish_listing_form = ob_get_clean(); |
143 | 143 | /** |
144 | - * Filter the HTML for the entire publish listing form preview page message and buttons etc. |
|
145 | - * |
|
146 | - * @since 1.0.0 |
|
147 | - * @param string $publish_listing_form The publish listing HTML form. |
|
148 | - */ |
|
144 | + * Filter the HTML for the entire publish listing form preview page message and buttons etc. |
|
145 | + * |
|
146 | + * @since 1.0.0 |
|
147 | + * @param string $publish_listing_form The publish listing HTML form. |
|
148 | + */ |
|
149 | 149 | $publish_listing_form = apply_filters('geodir_publish_listing_form', $publish_listing_form); |
150 | 150 | echo $publish_listing_form; |
151 | 151 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $username = $user_info->user_login; |
36 | 36 | $user_email = $user_info->user_email; |
37 | 37 | |
38 | - $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory')); |
|
38 | + $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')), 'geodirectory')); |
|
39 | 39 | |
40 | 40 | /* |
41 | 41 | * Filter the success page message before variable replacements. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param object $post_info Post object. |
46 | 46 | * @param object $user_info User object. |
47 | 47 | */ |
48 | - $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info); |
|
48 | + $message = apply_filters('geodir_success_page_msg_before_var_replace', $message, $post_info, $user_info); |
|
49 | 49 | |
50 | 50 | $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]'); |
51 | 51 | $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @param object $post_info Post object. |
60 | 60 | * @param object $user_info User object. |
61 | 61 | */ |
62 | - $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info); |
|
62 | + $message = apply_filters('geodir_success_page_msg_after_var_replace', $message, $post_info, $user_info); |
|
63 | 63 | |
64 | 64 | |
65 | 65 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @param object $post_info Post object. |
76 | 76 | * @param object $user_info User object. |
77 | 77 | */ |
78 | - do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
78 | + do_action('geodir_before_success_page_msg_wrapper', $message, $post_info, $user_info); |
|
79 | 79 | echo '<h5 class="geodir_information">'; |
80 | 80 | echo $message; |
81 | 81 | echo '</h5>'; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param object $post_info Post object. |
88 | 88 | * @param object $user_info User object. |
89 | 89 | */ |
90 | - do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
90 | + do_action('geodir_after_success_page_msg_wrapper', $message, $post_info, $user_info); |
|
91 | 91 | |
92 | 92 | ?> |
93 | 93 |
@@ -15,29 +15,29 @@ discard block |
||
15 | 15 | <?php |
16 | 16 | |
17 | 17 | |
18 | - global $wpdb; |
|
18 | + global $wpdb; |
|
19 | 19 | |
20 | - $post_id = $_REQUEST['pid']; |
|
21 | - $post_info = get_post($post_id); |
|
20 | + $post_id = $_REQUEST['pid']; |
|
21 | + $post_info = get_post($post_id); |
|
22 | 22 | |
23 | - $posted_date = $post_info->post_date; |
|
24 | - $productlink = get_permalink($post_id); |
|
25 | - $siteName = get_bloginfo('name'); |
|
26 | - $siteurl = home_url(); |
|
27 | - $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>'; |
|
23 | + $posted_date = $post_info->post_date; |
|
24 | + $productlink = get_permalink($post_id); |
|
25 | + $siteName = get_bloginfo('name'); |
|
26 | + $siteurl = home_url(); |
|
27 | + $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>'; |
|
28 | 28 | |
29 | - $loginurl = geodir_login_url(); |
|
30 | - $loginurl_link = '<a href="' . $loginurl . '">login</a>'; |
|
29 | + $loginurl = geodir_login_url(); |
|
30 | + $loginurl_link = '<a href="' . $loginurl . '">login</a>'; |
|
31 | 31 | |
32 | - $post_author = $post_info->post_author; |
|
32 | + $post_author = $post_info->post_author; |
|
33 | 33 | |
34 | - $user_info = get_userdata($post_author); |
|
35 | - $username = $user_info->user_login; |
|
36 | - $user_email = $user_info->user_email; |
|
34 | + $user_info = get_userdata($post_author); |
|
35 | + $username = $user_info->user_login; |
|
36 | + $user_email = $user_info->user_email; |
|
37 | 37 | |
38 | - $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory')); |
|
38 | + $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory')); |
|
39 | 39 | |
40 | - /* |
|
40 | + /* |
|
41 | 41 | * Filter the success page message before variable replacements. |
42 | 42 | * |
43 | 43 | * @since 1.5.7 |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | * @param object $post_info Post object. |
46 | 46 | * @param object $user_info User object. |
47 | 47 | */ |
48 | - $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info); |
|
48 | + $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info); |
|
49 | 49 | |
50 | - $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]'); |
|
51 | - $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date); |
|
52 | - $message = str_replace($search_array, $replace_array, $message); |
|
50 | + $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]'); |
|
51 | + $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date); |
|
52 | + $message = str_replace($search_array, $replace_array, $message); |
|
53 | 53 | |
54 | - /* |
|
54 | + /* |
|
55 | 55 | * Filter the success page message after variable replacements. |
56 | 56 | * |
57 | 57 | * @since 1.5.7 |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | * @param object $post_info Post object. |
60 | 60 | * @param object $user_info User object. |
61 | 61 | */ |
62 | - $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info); |
|
62 | + $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info); |
|
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | - ?> |
|
66 | + ?> |
|
67 | 67 | |
68 | 68 | <?php |
69 | 69 | |
70 | - /* |
|
70 | + /* |
|
71 | 71 | * Action called before the success page message wrapper. |
72 | 72 | * |
73 | 73 | * @since 1.5.7 |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | * @param object $post_info Post object. |
76 | 76 | * @param object $user_info User object. |
77 | 77 | */ |
78 | - do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
79 | - echo '<h5 class="geodir_information">'; |
|
80 | - echo $message; |
|
81 | - echo '</h5>'; |
|
82 | - /* |
|
78 | + do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
79 | + echo '<h5 class="geodir_information">'; |
|
80 | + echo $message; |
|
81 | + echo '</h5>'; |
|
82 | + /* |
|
83 | 83 | * Action called after the success page message wrapper. |
84 | 84 | * |
85 | 85 | * @since 1.5.7 |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | * @param object $post_info Post object. |
88 | 88 | * @param object $user_info User object. |
89 | 89 | */ |
90 | - do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
90 | + do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
91 | 91 | |
92 | - ?> |
|
92 | + ?> |
|
93 | 93 | |
94 | 94 | </div> |
95 | 95 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
31 | 31 | do_action('geodir_before_listing_post_listview'); |
32 | 32 | $all_postypes = geodir_get_posttypes(); |
33 | - $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
33 | + $geodir_days_new = (int) get_option('geodir_listing_new_days'); |
|
34 | 34 | foreach ($widget_listings as $widget_listing) { |
35 | 35 | global $gd_widget_listing_type; |
36 | 36 | $post = $widget_listing; |
@@ -145,12 +145,12 @@ discard block |
||
145 | 145 | */ |
146 | 146 | $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
147 | 147 | if ($show_listing_excerpt) { |
148 | - if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
149 | - $content_out = geodir_max_excerpt( $character_count ); |
|
148 | + if (isset($character_count) && ($character_count || $character_count == '0')) { |
|
149 | + $content_out = geodir_max_excerpt($character_count); |
|
150 | 150 | } else { |
151 | 151 | $content_out = get_the_excerpt(); |
152 | 152 | } |
153 | - if ( ! empty( $content_out ) ) { |
|
153 | + if (!empty($content_out)) { |
|
154 | 154 | echo "<p>" . $content_out . "</p>"; |
155 | 155 | } |
156 | 156 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * @param object $post The post object. |
171 | 171 | * @param string $view The view type, default 'widget'. |
172 | 172 | */ |
173 | - do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
173 | + do_action('geodir_after_listing_content', $post, 'widget'); ?> |
|
174 | 174 | <footer class="geodir-entry-meta <?php echo apply_filters('geodir_listing_listview_meta_extra_class', '', 'widget'); ?>"> |
175 | 175 | <div class="geodir-addinfo clearfix <?php echo apply_filters('geodir_listing_listview_addinfo_extra_class', '', 'widget'); ?>"> |
176 | 176 | <?php |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * @param object $post The post object. |
182 | 182 | * @param string $view The view type, default 'widget'. |
183 | 183 | */ |
184 | - do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
184 | + do_action('geodir_before_review_html', $post, 'widget'); |
|
185 | 185 | $review_show = geodir_is_reviews_show('listview'); |
186 | 186 | if ($review_show) { |
187 | 187 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * |
207 | 207 | * @since 1.0.0 |
208 | 208 | */ |
209 | - do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
209 | + do_action('geodir_after_favorite_html', $post->ID, 'widget'); |
|
210 | 210 | |
211 | 211 | if ($post->post_author == get_current_user_id()) { |
212 | 212 | $addplacelink = get_permalink(geodir_add_listing_page_id()); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | title="<?php _e('Edit Listing', 'geodirectory'); ?>"> |
228 | 228 | <?php |
229 | 229 | $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
230 | - echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
230 | + echo '<i class="' . $geodir_listing_edit_icon . '"></i>'; |
|
231 | 231 | ?> |
232 | 232 | <?php _e('Edit', 'geodirectory'); ?> |
233 | 233 | </a> |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | title="<?php _e('Delete Listing', 'geodirectory'); ?>"> |
236 | 236 | <?php |
237 | 237 | $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
238 | - echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
238 | + echo '<i class="' . $geodir_listing_delete_icon . '"></i>'; |
|
239 | 239 | ?> |
240 | 240 | <?php _e('Delete', 'geodirectory'); ?> |
241 | 241 | </a> |
@@ -20,72 +20,72 @@ discard block |
||
20 | 20 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
21 | 21 | $grid_view_class = apply_filters('geodir_grid_view_widget_columns', $gridview_columns_widget); |
22 | 22 | if ($gd_session->get('gd_listing_view') && !isset($before_widget)) { |
23 | - $grid_view_class = geodir_convert_listing_view_class($gd_session->get('gd_listing_view')); |
|
23 | + $grid_view_class = geodir_convert_listing_view_class($gd_session->get('gd_listing_view')); |
|
24 | 24 | } |
25 | 25 | ?> |
26 | 26 | <ul class="geodir_category_list_view clearfix <?php echo apply_filters('geodir_listing_listview_ul_extra_class', '', 'widget'); ?>"> |
27 | 27 | <?php |
28 | - if (!empty($widget_listings)) { |
|
29 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
30 | - do_action('geodir_before_listing_post_listview'); |
|
31 | - $all_postypes = geodir_get_posttypes(); |
|
32 | - $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
33 | - foreach ($widget_listings as $widget_listing) { |
|
34 | - global $gd_widget_listing_type; |
|
35 | - $post = $widget_listing; |
|
28 | + if (!empty($widget_listings)) { |
|
29 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
30 | + do_action('geodir_before_listing_post_listview'); |
|
31 | + $all_postypes = geodir_get_posttypes(); |
|
32 | + $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
33 | + foreach ($widget_listings as $widget_listing) { |
|
34 | + global $gd_widget_listing_type; |
|
35 | + $post = $widget_listing; |
|
36 | 36 | |
37 | - $GLOBALS['post'] = $post; |
|
38 | - setup_postdata($post); |
|
37 | + $GLOBALS['post'] = $post; |
|
38 | + setup_postdata($post); |
|
39 | 39 | |
40 | - $gd_widget_listing_type = $post->post_type; |
|
40 | + $gd_widget_listing_type = $post->post_type; |
|
41 | 41 | |
42 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
43 | - $post_view_class = apply_filters('geodir_post_view_extra_class', '', $all_postypes); |
|
42 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
43 | + $post_view_class = apply_filters('geodir_post_view_extra_class', '', $all_postypes); |
|
44 | 44 | |
45 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
46 | - $post_view_article_class = apply_filters('geodir_post_view_article_extra_class', ''); |
|
47 | - ?> |
|
45 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
46 | + $post_view_article_class = apply_filters('geodir_post_view_article_extra_class', ''); |
|
47 | + ?> |
|
48 | 48 | <li class="clearfix <?php if ($grid_view_class) { |
49 | - echo 'geodir-gridview ' . $grid_view_class; |
|
50 | - } else { |
|
51 | - echo ' geodir-listview '; |
|
52 | - } ?> <?php if ($post_view_class) { |
|
53 | - echo $post_view_class; |
|
54 | - } ?>" <?php if (isset($listing_width) && $listing_width) { |
|
55 | - echo "style='width:{$listing_width}%;'"; |
|
56 | - } |
|
49 | + echo 'geodir-gridview ' . $grid_view_class; |
|
50 | + } else { |
|
51 | + echo ' geodir-listview '; |
|
52 | + } ?> <?php if ($post_view_class) { |
|
53 | + echo $post_view_class; |
|
54 | + } ?>" <?php if (isset($listing_width) && $listing_width) { |
|
55 | + echo "style='width:{$listing_width}%;'"; |
|
56 | + } |
|
57 | 57 | |
58 | - echo " data-post-id='$post->ID' "; |
|
59 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
60 | - do_action('geodir_listview_inside_li', $post, 'widget'); |
|
61 | - ?>> |
|
58 | + echo " data-post-id='$post->ID' "; |
|
59 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
60 | + do_action('geodir_listview_inside_li', $post, 'widget'); |
|
61 | + ?>> |
|
62 | 62 | <article class="geodir-category-listing <?php if ($post_view_article_class) { |
63 | - echo $post_view_article_class; |
|
64 | - } ?>"> |
|
63 | + echo $post_view_article_class; |
|
64 | + } ?>"> |
|
65 | 65 | <div class="geodir-post-img <?php echo apply_filters('geodir_listing_listview_thumb_extra_class', '', 'widget'); ?>"> |
66 | 66 | <?php if ($fimage = geodir_show_featured_image($post->ID, 'list-thumb', true, false, $post->featured_image)) { ?> |
67 | 67 | <a href="<?php the_permalink(); ?>"><?php echo $fimage; ?></a> |
68 | 68 | <?php |
69 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
70 | - do_action('geodir_before_badge_on_image', $post); |
|
71 | - if ($post->is_featured) { |
|
72 | - echo geodir_show_badges_on_image('featured', $post, get_permalink()); |
|
73 | - } |
|
69 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
70 | + do_action('geodir_before_badge_on_image', $post); |
|
71 | + if ($post->is_featured) { |
|
72 | + echo geodir_show_badges_on_image('featured', $post, get_permalink()); |
|
73 | + } |
|
74 | 74 | |
75 | 75 | |
76 | - if (round(abs(strtotime($post->post_date) - strtotime(date('Y-m-d'))) / 86400) < $geodir_days_new) { |
|
77 | - echo geodir_show_badges_on_image('new', $post, get_permalink()); |
|
78 | - } |
|
76 | + if (round(abs(strtotime($post->post_date) - strtotime(date('Y-m-d'))) / 86400) < $geodir_days_new) { |
|
77 | + echo geodir_show_badges_on_image('new', $post, get_permalink()); |
|
78 | + } |
|
79 | 79 | |
80 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
81 | - do_action('geodir_after_badge_on_image', $post); |
|
82 | - } |
|
83 | - ?> |
|
80 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
81 | + do_action('geodir_after_badge_on_image', $post); |
|
82 | + } |
|
83 | + ?> |
|
84 | 84 | </div> |
85 | 85 | <div class="geodir-content <?php echo apply_filters('geodir_listing_listview_content_extra_class', '', 'widget'); ?>"> |
86 | 86 | <?php |
87 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
88 | - do_action('geodir_before_listing_post_title', 'listview', $post); ?> |
|
87 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
88 | + do_action('geodir_before_listing_post_title', 'listview', $post); ?> |
|
89 | 89 | <header class="geodir-entry-header"> |
90 | 90 | <h3 class="geodir-entry-title"> |
91 | 91 | <a href="<?php the_permalink(); ?>" |
@@ -94,158 +94,158 @@ discard block |
||
94 | 94 | </header> |
95 | 95 | <!-- .entry-header --> |
96 | 96 | <?php |
97 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
98 | - do_action('geodir_after_listing_post_title', 'listview', $post); ?> |
|
97 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
98 | + do_action('geodir_after_listing_post_title', 'listview', $post); ?> |
|
99 | 99 | <?php /// Print Distance |
100 | - if (isset($_REQUEST['sgeo_lat']) && $_REQUEST['sgeo_lat'] != '') { |
|
101 | - $startPoint = array('latitude' => $_REQUEST['sgeo_lat'], 'longitude' => $_REQUEST['sgeo_lon']); |
|
100 | + if (isset($_REQUEST['sgeo_lat']) && $_REQUEST['sgeo_lat'] != '') { |
|
101 | + $startPoint = array('latitude' => $_REQUEST['sgeo_lat'], 'longitude' => $_REQUEST['sgeo_lon']); |
|
102 | 102 | |
103 | - $endLat = $post->post_latitude; |
|
104 | - $endLon = $post->post_longitude; |
|
105 | - $endPoint = array('latitude' => $endLat, 'longitude' => $endLon); |
|
106 | - $uom = get_option('geodir_search_dist_1'); |
|
107 | - $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
108 | - ?> |
|
103 | + $endLat = $post->post_latitude; |
|
104 | + $endLon = $post->post_longitude; |
|
105 | + $endPoint = array('latitude' => $endLat, 'longitude' => $endLon); |
|
106 | + $uom = get_option('geodir_search_dist_1'); |
|
107 | + $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
108 | + ?> |
|
109 | 109 | <h3> |
110 | 110 | <?php |
111 | - if (round($distance, 2) == 0) { |
|
112 | - $uom = get_option('geodir_search_dist_2'); |
|
113 | - $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
114 | - if ($uom == 'feet') { |
|
115 | - $uom = __('feet', 'geodirectory'); |
|
116 | - } else { |
|
117 | - $uom = __('meters', 'geodirectory'); |
|
118 | - } |
|
119 | - echo round($distance) . ' ' . __($uom, 'geodirectory') . ' |
|
111 | + if (round($distance, 2) == 0) { |
|
112 | + $uom = get_option('geodir_search_dist_2'); |
|
113 | + $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
114 | + if ($uom == 'feet') { |
|
115 | + $uom = __('feet', 'geodirectory'); |
|
116 | + } else { |
|
117 | + $uom = __('meters', 'geodirectory'); |
|
118 | + } |
|
119 | + echo round($distance) . ' ' . __($uom, 'geodirectory') . ' |
|
120 | 120 | <br /> |
121 | 121 | '; |
122 | - } else { |
|
123 | - if ($uom == 'miles') { |
|
124 | - $uom = __('miles', 'geodirectory'); |
|
125 | - } else { |
|
126 | - $uom = __('km', 'geodirectory'); |
|
127 | - } |
|
128 | - echo round($distance, 2) . ' ' . __($uom, 'geodirectory') . ' |
|
122 | + } else { |
|
123 | + if ($uom == 'miles') { |
|
124 | + $uom = __('miles', 'geodirectory'); |
|
125 | + } else { |
|
126 | + $uom = __('km', 'geodirectory'); |
|
127 | + } |
|
128 | + echo round($distance, 2) . ' ' . __($uom, 'geodirectory') . ' |
|
129 | 129 | <br /> |
130 | 130 | '; |
131 | - } |
|
132 | - ?> |
|
131 | + } |
|
132 | + ?> |
|
133 | 133 | </h3> |
134 | 134 | <?php } ?> |
135 | 135 | <?php |
136 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
137 | - do_action('geodir_before_listing_post_excerpt', $post); ?> |
|
136 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
137 | + do_action('geodir_before_listing_post_excerpt', $post); ?> |
|
138 | 138 | <?php echo geodir_show_listing_info('listing'); ?> |
139 | 139 | <?php if (isset($character_count) && $character_count == '0') { |
140 | - } else { ?> |
|
140 | + } else { ?> |
|
141 | 141 | <div class="geodir-entry-content"> |
142 | 142 | <?php |
143 | - /** |
|
144 | - * Filter to hide the listing excerpt |
|
145 | - * |
|
146 | - * @since 1.5.3 |
|
147 | - * @param bool $display Display the excerpt or not. Default true. |
|
148 | - * @param object $post The post object. |
|
149 | - */ |
|
150 | - $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
|
151 | - if ($show_listing_excerpt) { |
|
152 | - if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
153 | - $content_out = geodir_max_excerpt( $character_count ); |
|
154 | - } else { |
|
155 | - $content_out = get_the_excerpt(); |
|
156 | - } |
|
157 | - if ( ! empty( $content_out ) ) { |
|
158 | - echo "<p>" . $content_out . "</p>"; |
|
159 | - } |
|
160 | - } |
|
161 | - ?> |
|
143 | + /** |
|
144 | + * Filter to hide the listing excerpt |
|
145 | + * |
|
146 | + * @since 1.5.3 |
|
147 | + * @param bool $display Display the excerpt or not. Default true. |
|
148 | + * @param object $post The post object. |
|
149 | + */ |
|
150 | + $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
|
151 | + if ($show_listing_excerpt) { |
|
152 | + if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
153 | + $content_out = geodir_max_excerpt( $character_count ); |
|
154 | + } else { |
|
155 | + $content_out = get_the_excerpt(); |
|
156 | + } |
|
157 | + if ( ! empty( $content_out ) ) { |
|
158 | + echo "<p>" . $content_out . "</p>"; |
|
159 | + } |
|
160 | + } |
|
161 | + ?> |
|
162 | 162 | </div> |
163 | 163 | <?php } ?> |
164 | 164 | <?php |
165 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
166 | - do_action('geodir_after_listing_post_excerpt', $post); ?> |
|
165 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
166 | + do_action('geodir_after_listing_post_excerpt', $post); ?> |
|
167 | 167 | </div> |
168 | 168 | <!-- gd-content ends here--> |
169 | 169 | <?php |
170 | - /** |
|
171 | - * Called after printing listing content. |
|
172 | - * |
|
173 | - * @since 1.5.3 |
|
174 | - * @param object $post The post object. |
|
175 | - * @param string $view The view type, default 'widget'. |
|
176 | - */ |
|
177 | - do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
170 | + /** |
|
171 | + * Called after printing listing content. |
|
172 | + * |
|
173 | + * @since 1.5.3 |
|
174 | + * @param object $post The post object. |
|
175 | + * @param string $view The view type, default 'widget'. |
|
176 | + */ |
|
177 | + do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
178 | 178 | <footer class="geodir-entry-meta <?php echo apply_filters('geodir_listing_listview_meta_extra_class', '', 'widget'); ?>"> |
179 | 179 | <div class="geodir-addinfo clearfix <?php echo apply_filters('geodir_listing_listview_addinfo_extra_class', '', 'widget'); ?>"> |
180 | 180 | <?php |
181 | - /** |
|
182 | - * Called before printing review stars html. |
|
183 | - * |
|
184 | - * @since 1.5.3 |
|
185 | - * @param object $post The post object. |
|
186 | - * @param string $view The view type, default 'widget'. |
|
187 | - */ |
|
188 | - do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
189 | - $review_show = geodir_is_reviews_show('listview'); |
|
190 | - if ($review_show) { |
|
181 | + /** |
|
182 | + * Called before printing review stars html. |
|
183 | + * |
|
184 | + * @since 1.5.3 |
|
185 | + * @param object $post The post object. |
|
186 | + * @param string $view The view type, default 'widget'. |
|
187 | + */ |
|
188 | + do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
189 | + $review_show = geodir_is_reviews_show('listview'); |
|
190 | + if ($review_show) { |
|
191 | 191 | |
192 | - $post_avgratings = geodir_get_post_rating($post->ID); |
|
192 | + $post_avgratings = geodir_get_post_rating($post->ID); |
|
193 | 193 | |
194 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
195 | - do_action('geodir_before_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
194 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
195 | + do_action('geodir_before_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
196 | 196 | |
197 | - echo geodir_get_rating_stars($post_avgratings, $post->ID); |
|
197 | + echo geodir_get_rating_stars($post_avgratings, $post->ID); |
|
198 | 198 | |
199 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
200 | - do_action('geodir_after_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
201 | - ?><a href="<?php comments_link(); ?>" class="geodir-pcomments"><i |
|
199 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
200 | + do_action('geodir_after_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
201 | + ?><a href="<?php comments_link(); ?>" class="geodir-pcomments"><i |
|
202 | 202 | class="fa fa-comments"></i> <?php geodir_comments_number($post->rating_count); ?> |
203 | 203 | </a> |
204 | 204 | <?php |
205 | - } |
|
205 | + } |
|
206 | 206 | |
207 | 207 | |
208 | - /** |
|
209 | - * Called after printing favorite html. |
|
210 | - * |
|
211 | - * @since 1.0.0 |
|
212 | - */ |
|
213 | - do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
208 | + /** |
|
209 | + * Called after printing favorite html. |
|
210 | + * |
|
211 | + * @since 1.0.0 |
|
212 | + */ |
|
213 | + do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
214 | 214 | |
215 | - if ($post->post_author == get_current_user_id()) { |
|
216 | - $addplacelink = get_permalink(geodir_add_listing_page_id()); |
|
217 | - $editlink = geodir_getlink($addplacelink, array('pid' => $post->ID), false); |
|
218 | - $upgradelink = geodir_getlink($editlink, array('upgrade' => '1'), false); |
|
215 | + if ($post->post_author == get_current_user_id()) { |
|
216 | + $addplacelink = get_permalink(geodir_add_listing_page_id()); |
|
217 | + $editlink = geodir_getlink($addplacelink, array('pid' => $post->ID), false); |
|
218 | + $upgradelink = geodir_getlink($editlink, array('upgrade' => '1'), false); |
|
219 | 219 | |
220 | - $ajaxlink = geodir_get_ajax_url(); |
|
221 | - $deletelink = geodir_getlink($ajaxlink, array('geodir_ajax' => 'add_listing', 'ajax_action' => 'delete', 'pid' => $post->ID), false); |
|
222 | - ?> |
|
220 | + $ajaxlink = geodir_get_ajax_url(); |
|
221 | + $deletelink = geodir_getlink($ajaxlink, array('geodir_ajax' => 'add_listing', 'ajax_action' => 'delete', 'pid' => $post->ID), false); |
|
222 | + ?> |
|
223 | 223 | <span class="geodir-authorlink clearfix"> |
224 | 224 | <?php |
225 | - if (isset($_REQUEST['geodir_dashbord']) && $_REQUEST['geodir_dashbord']) { |
|
226 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
227 | - do_action('geodir_before_edit_post_link_on_listing'); |
|
228 | - ?> |
|
225 | + if (isset($_REQUEST['geodir_dashbord']) && $_REQUEST['geodir_dashbord']) { |
|
226 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
227 | + do_action('geodir_before_edit_post_link_on_listing'); |
|
228 | + ?> |
|
229 | 229 | <a href="<?php echo esc_url($editlink); ?>" class="geodir-edit" |
230 | 230 | title="<?php _e('Edit Listing', 'geodirectory'); ?>"> |
231 | 231 | <?php |
232 | - $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
|
233 | - echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
234 | - ?> |
|
232 | + $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
|
233 | + echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
234 | + ?> |
|
235 | 235 | <?php _e('Edit', 'geodirectory'); ?> |
236 | 236 | </a> |
237 | 237 | <a href="<?php echo esc_url($deletelink); ?>" class="geodir-delete" |
238 | 238 | title="<?php _e('Delete Listing', 'geodirectory'); ?>"> |
239 | 239 | <?php |
240 | - $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
|
241 | - echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
242 | - ?> |
|
240 | + $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
|
241 | + echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
242 | + ?> |
|
243 | 243 | <?php _e('Delete', 'geodirectory'); ?> |
244 | 244 | </a> |
245 | 245 | <?php |
246 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
247 | - do_action('geodir_after_edit_post_link_on_listing'); |
|
248 | - } ?> |
|
246 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
247 | + do_action('geodir_after_edit_post_link_on_listing'); |
|
248 | + } ?> |
|
249 | 249 | </span> |
250 | 250 | <?php } ?> |
251 | 251 | </div> |
@@ -255,17 +255,17 @@ discard block |
||
255 | 255 | </article> |
256 | 256 | </li> |
257 | 257 | <?php |
258 | - unset($gd_widget_listing_type); |
|
259 | - } |
|
260 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
261 | - do_action('geodir_after_listing_post_listview'); |
|
262 | - } else { |
|
258 | + unset($gd_widget_listing_type); |
|
259 | + } |
|
260 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
261 | + do_action('geodir_after_listing_post_listview'); |
|
262 | + } else { |
|
263 | 263 | $favorite = isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite' ? true : false; |
264 | 264 | |
265 | 265 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
266 | - do_action('geodir_message_not_found_on_listing', 'widget-listing-listview', $favorite); |
|
267 | - } |
|
268 | - ?> |
|
266 | + do_action('geodir_message_not_found_on_listing', 'widget-listing-listview', $favorite); |
|
267 | + } |
|
268 | + ?> |
|
269 | 269 | </ul> <!-- geodir_category_list_view ends here--> |
270 | 270 | <div class="clear"></div> |
271 | 271 | <?php |