I want to edit the “acf-gallery-side-info” <div> content of the Gallery Field in order to add a “download” link to the “actions” <p>.
To explain my wish : We are an association and we use some parts of the backend as working space and some Gallery Fields in Custom Post Type are used to store files. If someone put a file in a Gallery Field I want to be able to download it with no needs to open the WordPress Media Manager.
I first try to add the link with some Jquery but the “acf-gallery-side-info” <div> is populated on click so my code doesnt works :
I found the “acf-gallery-side-info” <div> content is populated in the plugin by the function render_attachment but it’s “Bad” to edit directly the plugin =D.
Do you know how I can do it ?
Thanks all !
Unfortunately, that’s as much as I can give you. I don’t know all the details on exactly what would need to be done to accomplish this, only the place to start looking.
I needed a looooong time to solve the entire issue but the JS API append action is exactly what I was looking for.
If someone want the complete solution I use in a PHP function file :
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
So excited to see how well ACF @wp_acf and WP Gutenberg blocks work together! Coded my own custom Gutenberg block for a book list page with book image, author and description fields! SO easy to add on and update with new books now! #wordpress #momswhocode #blacktechtwitter— Maeling Murphy, Ph.D. (@maelingmurphy) December 27, 2019
© 2020 Advanced Custom Fields. Subscribe