WordPress plugin intelligence profile

Ochre W3C Geolocation Services

Geolocation Services attempts to retrieve a visitor's physical location, allowing for geographically relevant content to be delivered.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.3
Current version0.04
WordPress coverageTested up to WordPress 3.3
Minimum stackWP 3.0.0 · PHP —
Directory statusactive
Last directory update9 Jan 201214y ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Ochre W3C Geolocation Services version 0.04 as active, updated 14y ago and tested up to WordPress 3.3.

Overview

About this plugin

Ochre’s Geolocation Services plugin for

WordPress utilizes the W3C Geolocation API to retrieve a visitor’s physical location, enabling a

WordPress website to present content relevant to a visitors current physical location such as local maps, event listings, branch and franchise locations, social media and other information that is geographically

interesting.

The plugin provides three “back end” action hooks for use by your or third party plugins or theme actions, and AJAX actions for “front end” customization such as executing javascript with the resolved Location information, redirecting to a new page, or refreshing the current page.

Configuration

Global Configuration is available from the WordPress settings->Ochre Geolocation page:

  • Global or per-post/per page geolocation behavour

Per-page and per-post configurations include:

  • Executing custom javascript
  • Redirecting to a URL
  • Performing a page refresh
  • Firing off the ochregeo actions but doing nothing on the front end
  • Disabling completely

Actions

The following actions for do_action() are fired when a Geolocation update is received:

  • ochregeo_received_nosupport: No Geolocation support in the device/browser
  • ochregeo_received_unknownpos: A position could not be retrieved
  • ochregeo_received_location: Position was received. This action is passed the OCHRELABS_WP_Geolocation object as its only argument

AJAX actions

The following AJAX actions are implemented:

  • (nopriv) ochregeo_ochregeos: Transmits location information and executes an action based on a per-post/page or global setting.
  • (nopriv) ochregeo_get_coordinates: Retrieves last received location information. (we haven’t tested this)

Executing custom javascript after a succesful Geolocation update

Javascript executed on a per-page/post or global basis has access to a res object

containing information from the Geolocation Service plugin.

Properties of this object are:

ac // accuracy (not always available - do not rely on)

If reverse geo coding is enabled, the object may also contain:

city // city

El Quickie API Reference

`

// This is the Ochre Geo object instantiated by the plugin.

$ochre_geo = new OCHRELABS_WP_Geolocation();

// Get status of the current geolocation request. $ochre_geo::STATUS_UPDATED means you have “valid” coordinate data.

// Constants are:

$ochre_geo::STATUS_QUERY; // waiting for update from client

$ochre_geo::STATUS_UPDATED; // received coordinate update from client

$ochre_geo::STATUS_NOTSUPPORTED; // client does not support geo location

$ochre_geo::STATUS_ERROR; // an error was returned from the client

$ochre_geo::STATUS_UNKNOWNPOS; // location was unknown

$ochre_geo::STATUS_DISABLED; // module has been told not to present geolocation query

$ochre_geo->get_status();

// Set the location information manually (not normally needed)

$ochre_geo->set_coordinates($latitude,$longitude,$elevation=0,$accuracy=0);

// get the current resolved location information – check get_status() first before relying on this data!

1234″,”elevation”=>0,”accuracy”=>0);

$ochre_geo->get_coordinates();

// geocodes the current resolved location information and returns it as an array like array(“city”=>”Vancouver”,”country”=>”Canada”,”state”=>”British Columbia”,”statec”=>”BC”,”country”=>”Canada”,”countryc”=>”CA”)

$ochre_geo->geocode();

<h3>Reverse Geo Coder</h3>We've thrown in Yahoo! place finder Geocoding support. The geocoder() returns an array consisting of something like:

array(

“city”=>”Vancouver”,”

“country”=>”Canada”,

“state”=>”British Columbia”,

“statec”=>”BC”,

“country”=>”Canada”,

“countryc”=>”CA”

)

`

Geo Coding support is still young and subject to change. It’s not hooked into the Javascript API, and since there are at least a few geo coder javascript api’s already out there we haven’t decided whether to do this or not.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • geo location
  • geolocation
  • ochre
  • w3c
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.3

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.3.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.3
Minimum requirementsWordPress 3.0.0 · PHP not listed
Update activity9 Jan 201214y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.