Any idea when that might be happening?
We have multiple developers working on our sites, and it’ll be a massive improvement for us when it does.
Trying to get a sense of whether we should invest time in a temporary technical solution or just deal with the hassle of manually importing all the field groups when changes need to be made until the core fix is available to use.
Thanks!
The wp-admin field group edit screen will not load data from local json files. This functionality will hopefully soon make it’s way into the plugin.
Manually editing field settings within a local json file will not be visible when editing the field group within the wp-admin edit screen, but will be visible when entering or loading data.
http://www.advancedcustomfields.com/resources/local-json/
Hi @mattbeck
I don’t have a time frame for adding this feature. Although it seems quite simple, the solution is quite complex and will take a lot of time.
For now, I would consider building some kind of ‘sync’ button which would read all the json files and import any new fields / field groups.
You can find most of the code needed in the core/json.php file
Cheers
E
That functionality would be great if it would be possible to sync without losing data associated with fields that get updated.
Hi,
i set up a little tool so sync up fields from JSON for developers, while it will keep reading it from JSON in production environment.
You basically just need to update the field version constant whenever you update a field group, and next time someone pull code from your repo, fields from JSON are imported back in DB for further editing.
check it here : https://gist.github.com/FreshFlesh/54fc4296fda3de4f4f52
any improvement to this workflow would be appreciated 🙂
Nice. I did something similar, but baked it into a WP Admin page. User hits the page in the tools menu, pushes a button and the sync runs.
That’s cool ! I was too lazy to write a UI for this..
Do you have this code available somewhere ? Or as a plugin ? That would be great to see !
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.