WP-Geo icon indicating copy to clipboard operation
WP-Geo copied to clipboard

Error in file includes/templates.php

Open seaatif opened this issue 12 years ago • 3 comments

Most of the functions are accepting a parameter named '$options' but that parameter is not actually is being used. For example for the function:

wpgeo_create_input_map

We could not update the default variables even after sending the parameters. another function is get_wpgeo_map

seaatif avatar Sep 25 '13 12:09 seaatif

I think the 2nd $options parameter in get_wpgeo_map() is not used - pass options through in the first $query parameter instead.

I think this should fix your wpgeo_create_input_map() issue? https://github.com/benhuson/WP-Geo/commit/2a3ef10f36800ec825c52c2cabf323e9c10c1e30

benhuson avatar Oct 29 '13 23:10 benhuson

Could you please tell me what is the purpose for this 'wpgeo_create_input_map()' function?

I supposed it would add two hidden fields for lat,lng, and a map where user can click on the map to add a pin on the map and those two fields would be populated with user's selected location.

But by seeing the code, i am not sure, its doing what i expected. Please explain, thank you.

seaatif avatar Oct 30 '13 08:10 seaatif

Actually looking at the code, the wpgeo_create_input_map() function has not been implemented properly yet - hence why it's not been documented or mentioned in the change log.

You are correct in your assumption that it should output 2 hidden fields and a map to populate them but at the moment the function is incomplete so it doesn't do anything as yet - just outputs a map I think.

benhuson avatar Oct 30 '13 09:10 benhuson