Version 5 of Gps Tracker out now with support for WordPress!

September 30th, 2015 | Nick Fox

The next version of Gps Tracker comes with a WordPress plugin and also an Android client. The plugin is available on the WordPress plugin website and you can install it directly from your WordPress install. The source code for the plugin is also now available in the Gps Tracker Github repo and Sourceforge download. The software is dual licensed. It uses MIT and GPLv2 licenses. The reason for the two licenses is because WordPress is GPLv2 licensed and recommends that their plugins be licensed that way also. The reason why I use MIT is because Gps Tracker has been licensed that way since the beginning and I wanted to maintain the same licensing for any new software added to Gps Tracker.

You can see the plugin working here on the websmithing website. This plugin took me about a year to write. I first had to learn how to create WordPress plugins and then how to fit Gps Tracker around their API and it was not easy. I’m using WordPress in a non-standard way. I have created a REST API that returns GeoJson. I am not using WP-API, which is WordPress’s up and coming REST API. The reason for this is because I needed a custom type (the GeoJson) and I did not want to litter the WordPress table that stores posts, users, comments etc with a custom location type. Gps Tracker generates and deletes lots of rows in a table. I wanted to have this table separate from the WordPress system tables. It just made more sense this way so I have created custom endpoints within the Gps Tracker plugin.

I searched long and hard on trying to find out how to create a REST API with WordPress. I found a couple of plugins that do that but they were to complicated for me to figure out and certainly seemed to complicated for my needs so I spent quite some time becoming one with WordPress plugin developer documentation… And one year later, voilà. I will post a tutorial on how I created the plugin because I think it will help a lot of people. Give it a test and please feel free to ask any questions about it on this post.