Jon
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Maps - Display Google Maps Perfectly with Ease] Dynamically add markersI managed to figure this out after a weekend of digging through the code. Anyone else wants to know how to do it, just contact me and I will happily share the code.
Forum: Plugins
In reply to: [WP Maps - Display Google Maps Perfectly with Ease] Dynamically add markersAll I need is an example of that hook please. I don’t know what your plugin is expecting for $markers. Your documentation doesn’t explain it.
Forum: Plugins
In reply to: [WP Maps - Display Google Maps Perfectly with Ease] Dynamically add markersThanks, sorry, but I don’t understand how this works…
I have a page (created from my custom page template MYTEMPLATE.php) where I display the map. when that page is displayed I identify a location with some co-ordinates which I want to add as a marker.
So, for example, I have latitide and longitude values.
How do I pass these values to the add_markers function?
What is $markers? and $map_id? Is $markers and array? Do I need to set it? Sorry, I don’t understand
Thanks
Forum: Plugins
In reply to: [WP Maps - Display Google Maps Perfectly with Ease] Dynamically add markersHi thanks for that. I have the pro version but can’t figure out how to use the the hooks.
I have added the following to functions.php in my child theme:-
add_filter(“wpgmp_markers”,”add_markers”,1,2);function add_markers($markers,$map_id)
{
return $markers;
}And I have added to my page template:
$poslatlong = array($latitude, $longitude);
apply_filters(“wpgmp_markers”, $poslatlong);But it doesn’t work, so I obviously have something wrong. Can you advise please?
Thanks
Forum: Plugins
In reply to: [JSON API User] Stop spam registrations?Great thanks!
Forum: Plugins
In reply to: [JSON API User] Stop spam registrations?Thanks Ali, maybe I misunderstand, but from what I’ve tested there is a potential security risk.
I am calling the API from a mobile app, but the API doesn’t know or care what called it. The API url is a standard format, so can be guessed, just replacing the website name. The user.register api won’t work without a valid nonce, but the get_nonce api can be called without validation. So, if I give you my website address for example, you will be able to create users and login etc.
I think I may need to modify core.php to add in a key which is specific to my implementation, that the get_nonce checks before issuing the nonce. I can code that into my app to submit it as a parameter on the get_nonce request.
The same is true for create_post process which starts with get_nonce.
Sorry if I misunderstand, but I’m building a service which needs to be secure and I think this might be a problem. I’m using JSON-API because its by far the best plugin available for JSON with wordpress and speeds up development time significantly. So I want to stick with it.
Thanks for your help.