MichDe / wordpress-geo-mashup

Automatically exported from code.google.com/p/wordpress-geo-mashup
1 stars 0 forks source link

Make "Geocode Custom Fields" work for users #679

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Geo Mashup 1.7.2

It seems like it might be pretty easy to make this functionality work for user 
meta as well, like geo_latitude and geo_longitude do. 

Original issue reported on code.google.com by dylankk...@gmail.com on 8 Nov 2013 at 1:06

GoogleCodeExporter commented 9 years ago
I started working on a workaround for this, and have put together a function 
that takes the data from from the user_meta and adds it to the post_meta of the 
page displaying the map:

<?php 

$blogusers = get_users( $args ); // for args see codex

if ($blogusers) {
  foreach ( $blogusers as $bloguser ) {
    $user_location = get_the_author_meta('geo_address', $bloguser->ID );
    $has_meta = get_post_meta(463, 'geo_mover', true);
    if ($user_location && ! $has_meta) add_post_meta( 22, 'geo_mover', $user_location);
  }
}
?>

It works pretty well (although there is a duplicate issue), but as I'm testing 
it, with geo_mover in the custom field box, the displayed map only shows one 
marker

Original comment by paul.as...@gmail.com on 8 Nov 2013 at 8:54

GoogleCodeExporter commented 9 years ago
This issue was updated by revision e45192b5f640.

Original comment by dylankk...@gmail.com on 31 Dec 2013 at 1:48

GoogleCodeExporter commented 9 years ago
Issue 603 has been merged into this issue.

Original comment by dylankk...@gmail.com on 13 Oct 2014 at 7:29