Home Forums ACF PRO Best Approach to Premium Theme Use? Reply To: Best Approach to Premium Theme Use?

  • Have to looked at this feature of ACF Pro

    ACF can save the field groups as JSON files that can be automatically loaded. JSON files can be loaded from multiple places, for example if you don’t want the person that purchases the them to have the ability to alter them in the ACF interface. They can also be loaded manually, as an example you can look at this I have this set up so that I can work on the field groups on my dev site in the ACF admin. I then copy the JSON files into my plugin. The loader will load the field groups only if they are not already defined, which means on my dev site the JSON files are ignored and on sites where I have the plugin install the JSON files are loaded.

    Changing settings is a little more difficult, if the field is not backwards compatible. Some examples: If you change the default value this could alter the way that it work. Altering the field type would be a problem. Or changing the values so that something that could be selected in the paste is no longer possible. There is nothing in ACF that will automatically update old values to new values. If this is something that needs to be done then you’d need to build an update function that takes care of the details.

    Creating default pages that can be modified is something else that you need to do on your own. You’ll need to create a theme activation action that checks for and/or inserts the posts into WP and adds all the necessary values to the ACF fields.