I’ve been able to create classes for building Groups and Fields just fine, but I’m hung up on Group Fields.
Looking at the export code of one, there are a bunch things in the sub_fields like “_prepare,” “_valid,” and “parent,” that I’m not sure what to do with.
I haven’t been able to find any documentation on this, so I don’t even know if it’s possible.
Just wondering.
Update: So, I’ve got it working by just adding the name as the ['_name']
.
I’m still not sure what ['parent']
does or if it’s necessary (doesn’t seem to be).
the documentation can be found here: https://www.advancedcustomfields.com/resources/register-fields-via-php/. it tells you what are the minimal argument you need to pass to register a field group.
Cheers!