@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | </script> |
256 | 256 | |
257 | 257 | <?php |
258 | - }elseif(get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
258 | + } elseif(get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
259 | 259 | echo stripslashes(get_option('geodir_ga_tracking_code')); |
260 | 260 | } |
261 | 261 | |
@@ -282,13 +282,14 @@ discard block |
||
282 | 282 | */ |
283 | 283 | function geodir_add_async_forscript($url) |
284 | 284 | { |
285 | - if (strpos($url, '#asyncload')===false) |
|
286 | - return $url; |
|
287 | - else if (is_admin()) |
|
288 | - return str_replace('#asyncload', '', $url); |
|
289 | - else |
|
290 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
291 | -} |
|
285 | + if (strpos($url, '#asyncload')===false) { |
|
286 | + return $url; |
|
287 | + } else if (is_admin()) { |
|
288 | + return str_replace('#asyncload', '', $url); |
|
289 | + } else { |
|
290 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
291 | + } |
|
292 | + } |
|
292 | 293 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
293 | 294 | |
294 | 295 | /** |
@@ -355,8 +356,10 @@ discard block |
||
355 | 356 | |
356 | 357 | $half_pages_to_show = round($pages_to_show / 2); |
357 | 358 | |
358 | - if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
359 | - return; |
|
359 | + if (geodir_is_page('home')) { |
|
360 | + // dont apply default pagination for geodirectory home page. |
|
361 | + return; |
|
362 | + } |
|
360 | 363 | |
361 | 364 | if (!is_single()) { |
362 | 365 | if (function_exists('geodir_location_geo_home_link')) { |
@@ -476,11 +479,21 @@ discard block |
||
476 | 479 | } |
477 | 480 | $dist_dif = 1000; |
478 | 481 | |
479 | - if ($dist <= 5000) $dist_dif = 500; |
|
480 | - if ($dist <= 1000) $dist_dif = 100; |
|
481 | - if ($dist <= 500) $dist_dif = 50; |
|
482 | - if ($dist <= 100) $dist_dif = 10; |
|
483 | - if ($dist <= 50) $dist_dif = 5; |
|
482 | + if ($dist <= 5000) { |
|
483 | + $dist_dif = 500; |
|
484 | + } |
|
485 | + if ($dist <= 1000) { |
|
486 | + $dist_dif = 100; |
|
487 | + } |
|
488 | + if ($dist <= 500) { |
|
489 | + $dist_dif = 50; |
|
490 | + } |
|
491 | + if ($dist <= 100) { |
|
492 | + $dist_dif = 10; |
|
493 | + } |
|
494 | + if ($dist <= 50) { |
|
495 | + $dist_dif = 5; |
|
496 | + } |
|
484 | 497 | |
485 | 498 | ?> |
486 | 499 | <script type="text/javascript"> |
@@ -541,12 +554,14 @@ discard block |
||
541 | 554 | */ |
542 | 555 | function geodir_add_sharelocation_scripts() { |
543 | 556 | $default_search_for_text = SEARCH_FOR_TEXT; |
544 | - if (get_option('geodir_search_field_default_text')) |
|
545 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
557 | + if (get_option('geodir_search_field_default_text')) { |
|
558 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
559 | + } |
|
546 | 560 | |
547 | 561 | $default_near_text = NEAR_TEXT; |
548 | - if (get_option('geodir_near_field_default_text')) |
|
549 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
562 | + if (get_option('geodir_near_field_default_text')) { |
|
563 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
564 | + } |
|
550 | 565 | |
551 | 566 | $search_location = geodir_get_default_location(); |
552 | 567 |