[wp-hackers] EXIF geo data

Otto otto at ottodestruct.com
Tue Mar 3 16:19:54 GMT 2009

On Tue, Mar 3, 2009 at 3:14 AM, Mike Little <mike at zed1.com> wrote:
> I agree a standard meta data name makes sense, as does one which has
> been around for a while. My only minor reservation about a combined
> field, is that it is a little harder to parse than separate long and
> lat.

The reason to have them together is so you can pull them both out
together. There's never an occasion where you need one and not the

And splitting them isn't that hard. If you've got "123.567,-12.345"
then all you have to do is:

$meta = trim(get_post_meta($post->ID, '_geo_location', true));
list($lat, $long) = split(',', $meta);

And voila.

Sent from: Memphis Tennessee United States.

More information about the wp-hackers mailing list