Try to add easypin to ACF's image fields
I've managed to add easypin to ACF's image fields, with a checkbox to enable or disable this functionality when adding a field to a field group; however once trying to edit these items on a post we lose the ability to save the image when the post is saved, and cannot update/ remove the image (via the pencil/x icons).
This is attempting to append the map coordinates to the value saved by ACF, I cannot figure out how to pass the json object of coordinates generated by easypin (front-end javascript) to ACF (back-end php) to store with the value, and editing the value in this way might be making it fail ACF's validation anyhow.
resources:
- http://atayahmet.github.io/jquery.easypin/
- https://www.advancedcustomfields.com/resources/acf-load_value/
- https://www.advancedcustomfields.com/resources/adding-custom-settings-fields/
- https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/
- https://www.advancedcustomfields.com/resources/query-posts-custom-fields/
note: within the sage theme directory, the filenames in this gist are mapped to these locations: lib-image_pins.php maps to lib/image_pins.php assets-scripts-place_image_pins.js maps to assets/scripts/place_image_pins.js