I am including a field group within a plugin, and was curious as to the best way to add it. Do you have any insight into the performance differences between loading a field group via PHP using acf_add_local_field_group() vs creating a custom load point and saving the configuration in a JSON file? Its seems like the PHP method would create the fields on every request (because it is created as part of the constructor) but could be relatively lightweight, vs the JSON lazy loading which has to read from a file, but presumably only does this as needed.
@jonathan That sounds reasonable. Unless it was seriously faster to use JSON, just having a PHP array makes things much easier, plus I can use the same config for ACF4 (with register_field_group()) as well as ACf 5, since ACF4 wouldn’t support the json config. To your last point, it also lets me filter them so I can configure the form on the fly.
Thanks for confirming I don’t need to refactor anything 🙂