Skip to content

Commit

Permalink
2.0.0.16-rc
Browse files Browse the repository at this point in the history
  • Loading branch information
stiofan committed Jun 27, 2018
1 parent 0a5cd8b commit a897fa4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v2.0.0.15-rc
v2.0.0.16-rc
Updated from font-awesome v4 to v5 - CHANGED
Rest api route & endpoints for fields - ADDED
priceRange custom field added and schema output added - ADDED
Expand Down
4 changes: 2 additions & 2 deletions geodirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: GeoDirectory
* Plugin URI: https://wpgeodirectory.com/
* Description: GeoDirectory plugin for WordPress.
* Version: 2.0.0.15-rc
* Version: 2.0.0.16-rc
* Author: AyeCode Ltd
* Author URI: https://wpgeodirectory.com
* Text Domain: geodirectory
Expand Down Expand Up @@ -60,7 +60,7 @@ final class GeoDirectory {
*
* @var string
*/
public $version = '2.0.0.15-rc';
public $version = '2.0.0.16-rc';

/**
* GeoDirectory instance.
Expand Down
6 changes: 5 additions & 1 deletion includes/class-geodir-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ public function posts_fields($fields, $query = array()){
if ( $snear != '' || ( ( $user_lat = get_query_var( 'user_lat' ) ) && ( $user_lon = get_query_var( 'user_lon' ) ) ) ) {
$DistanceRadius = geodir_getDistanceRadius(geodir_get_option('search_distance_long'));

$fields .= " , (" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($user_lat) - ABS(" . $table . ".latitude)) * pi()/180 / 2), 2) +COS(ABS($user_lat) * pi()/180) * COS( ABS(" . $table . ".latitude) * pi()/180) *POWER(SIN(($user_lon - " . $table . ".longitude) * pi()/180 / 2), 2) )))as distance ";
if(!empty($user_lat)){
$fields .= " , (" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($user_lat) - ABS(" . $table . ".latitude)) * pi()/180 / 2), 2) +COS(ABS($user_lat) * pi()/180) * COS( ABS(" . $table . ".latitude) * pi()/180) *POWER(SIN(($user_lon - " . $table . ".longitude) * pi()/180 / 2), 2) )))as distance ";
}else{
$fields .= " , (" . $DistanceRadius . " * 2 * ASIN(SQRT( POWER(SIN((ABS($mylat) - ABS(" . $table . ".latitude)) * pi()/180 / 2), 2) +COS(ABS($mylat) * pi()/180) * COS( ABS(" . $table . ".latitude) * pi()/180) *POWER(SIN(($mylon - " . $table . ".longitude) * pi()/180 / 2), 2) )))as distance ";
}
}


Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tags: directory plugin, business directory, listings, classifieds, real estate
Requires at least: 3.5
Requires PHP: 5.3
Tested up to: 4.9.6
Stable tag: 2.0.0.15-rc
Stable tag: 2.0.0.16-rc


Create huge location-based business directories with this fully-featured directory plugin. In a few clicks you could be the next Yelp or Tripadvisor.
Expand Down

0 comments on commit a897fa4

Please sign in to comment.