Support

Account

Home Forums Feedback Workflow hassle for multiple developers making a theme and plugins Reply To: Workflow hassle for multiple developers making a theme and plugins

  • So, when I’m developing a plugin I generally add my own json save for groups used in that plugin, as you’ve seen elsewhere. I have a single site where I do plugin dev work and this is the only site where the field groups for the plugin are loaded into the DB and where I sync them.

    What I have not done is create a way to alter the private flag setting when loading the field groups from JSON when on my dev site.

    You can’t do this with the acf/load_field_group hook, this hook is not run when a field group is loaded from a json file. What you need to do is use the acf/validate_field_group hook. I don’t know if this will work, but what I’m thinking is that I can add a filter, check to see if it’s my dev site, if it is then set the private flag to false. The only question is, will this allow me to sync the group on my dev site while preventing sync on sites where the plugin is used? Unfortunately, I don’t have time to test this theory