@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | </script> |
| 261 | 261 | |
| 262 | 262 | <?php |
| 263 | - }elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){
|
|
| 263 | + } elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){
|
|
| 264 | 264 | echo stripslashes(get_option('geodir_ga_tracking_code'));
|
| 265 | 265 | } |
| 266 | 266 | } |
@@ -299,13 +299,14 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | function geodir_add_async_forscript($url) |
| 301 | 301 | {
|
| 302 | - if (strpos($url, '#asyncload')===false) |
|
| 303 | - return $url; |
|
| 304 | - else if (is_admin()) |
|
| 305 | - return str_replace('#asyncload', '', $url);
|
|
| 306 | - else |
|
| 307 | - return str_replace('#asyncload', '', $url)."' async='async";
|
|
| 308 | -} |
|
| 302 | + if (strpos($url, '#asyncload')===false) { |
|
| 303 | + return $url; |
|
| 304 | + } else if (is_admin()) { |
|
| 305 | + return str_replace('#asyncload', '', $url); |
|
| 306 | + } else { |
|
| 307 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
| 308 | + } |
|
| 309 | + } |
|
| 309 | 310 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1);
|
| 310 | 311 | |
| 311 | 312 | /** |
@@ -372,8 +373,10 @@ discard block |
||
| 372 | 373 | |
| 373 | 374 | $half_pages_to_show = round($pages_to_show / 2); |
| 374 | 375 | |
| 375 | - if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page.
|
|
| 376 | - return; |
|
| 376 | + if (geodir_is_page('home')) { |
|
| 377 | + // dont apply default pagination for geodirectory home page. |
|
| 378 | + return; |
|
| 379 | + } |
|
| 377 | 380 | |
| 378 | 381 | if (!is_single()) {
|
| 379 | 382 | if (function_exists('geodir_location_geo_home_link')) {
|
@@ -493,11 +496,21 @@ discard block |
||
| 493 | 496 | } |
| 494 | 497 | $dist_dif = 1000; |
| 495 | 498 | |
| 496 | - if ($dist <= 5000) $dist_dif = 500; |
|
| 497 | - if ($dist <= 1000) $dist_dif = 100; |
|
| 498 | - if ($dist <= 500) $dist_dif = 50; |
|
| 499 | - if ($dist <= 100) $dist_dif = 10; |
|
| 500 | - if ($dist <= 50) $dist_dif = 5; |
|
| 499 | + if ($dist <= 5000) { |
|
| 500 | + $dist_dif = 500; |
|
| 501 | + } |
|
| 502 | + if ($dist <= 1000) { |
|
| 503 | + $dist_dif = 100; |
|
| 504 | + } |
|
| 505 | + if ($dist <= 500) { |
|
| 506 | + $dist_dif = 50; |
|
| 507 | + } |
|
| 508 | + if ($dist <= 100) { |
|
| 509 | + $dist_dif = 10; |
|
| 510 | + } |
|
| 511 | + if ($dist <= 50) { |
|
| 512 | + $dist_dif = 5; |
|
| 513 | + } |
|
| 501 | 514 | |
| 502 | 515 | ?> |
| 503 | 516 | <script type="text/javascript"> |
@@ -558,12 +571,14 @@ discard block |
||
| 558 | 571 | */ |
| 559 | 572 | function geodir_add_sharelocation_scripts() {
|
| 560 | 573 | $default_search_for_text = SEARCH_FOR_TEXT; |
| 561 | - if (get_option('geodir_search_field_default_text'))
|
|
| 562 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory');
|
|
| 574 | + if (get_option('geodir_search_field_default_text')) { |
|
| 575 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
| 576 | + } |
|
| 563 | 577 | |
| 564 | 578 | $default_near_text = NEAR_TEXT; |
| 565 | - if (get_option('geodir_near_field_default_text'))
|
|
| 566 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory');
|
|
| 579 | + if (get_option('geodir_near_field_default_text')) { |
|
| 580 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
| 581 | + } |
|
| 567 | 582 | |
| 568 | 583 | $search_location = geodir_get_default_location(); |
| 569 | 584 | |