Custom fields and group parameters
Hi !
Sometimes ACF plugins add their own configuration keys in fields or field groups. is there a way to extend the Field or Group class to add additional properties?
thank you and congratulations for your great class 🙂
The classes are not defined as final, so you can add any properties you want to them just by assigning them:
$field->my_custom_property = 'value';
All properties in field and group objects are passed on to the ACF when the fields are registered, so any custom properties will be present there as well.
I wanted to attach a new method to extend the field (set field as bidirectional for example) to make that reusable.