Support

Account

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.