Hello everyone!
As you can see, I created a plugin. It's my first plugin, I love core changes and functions more, but I thought I could create one plugin and see what will people say about the plugin and the code itself.
This plugin calculates and displays the distance between a user (geolocation) and item (d_coord_lat/long). It also displays required time to travel to the item.
Data is calculated using Google Maps Distance Matrix API - thanks to
https://goo.gl/532xZg.
On configuration page (conf.php) you can change distance unit - kilometres (default) and miles.
Data is shown using
<?php osc_run_hook('location')?>
hook, which is under the description in most themes, but you can also use
<?php echo zop_showDistanceTime(); ?>
, just comment osc_add_hook in index.php.
I hope you will like it. Post your reviews, if the plugin will be good, I will put it to market.
Thank you. Regards.
EDIT: Lol, forgot to upload plugin.
EDIT 2: It won't work for ads without coordinates, which could be a problem. If there will be more users without Google Maps plugin, I may include a geocoding function that will add coordinates to ads without them.