Home › Forums › General Issues › Extending acf_field_image › Reply To: Extending acf_field_image
Hi @hube2,
Yeah, I didn’t include all the functions I’ve written as I didn’t want to swamp the thread but I’ve already overridden functions like format_value()
and update_value()
to treat the data as an array and not just an ID. Everything is working in theory, it’s just the interaction with the media library.
Once I’ve got the script working, I might publish it here somewhere as an example of extending a field… interestingly, all fields extend the base acf_field
class and acf_field_image
actually seems to inherit (or more accurately reuse) methods from acf_field_file
. I like the idea of extending classes as it means I can generally ignore a lot of validation/output/save steps.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.