I like to keep my ACF fields under version control using the code exports so I’d like a feature where if you have:
in wp-config.php, ACF will only read fields generated through the PHP code export from your functions.php or only read fields from the WP database.
This would help in the case where I am creating fields locally (using the DB on localhost) and exporting them to PHP code for my production servers.
I’d like to second this request. It would allow me to continue working on the auto-export plugin I mentioned here:
I’d say that rather than use a global override that it would work better as a checkbox inside of an ACF field group which would allow that one field group to choose to either use the database or the php version.
Regardless, this would be an excellent feature for large-scale sites with multiple environments.
Yeah, this is a bit of a pain point for us as well.
We have local / test / production environments, version control with multiple developers, and managing ACF custom fields is a bit of a pain.
– Using the PHP export is ok, but means that other developers can’t easily add fields without changing the export file directly. We can get round this by using the XML export, but then we have to take steps to not include the PHP field definition file.
– If the local development instance where we used the UI to create the custom fields is lost, then we lose the ability to change the fields in the UI without working through the PHP export file and recreating the fields in the UI.
– We get weird issues when we have UI defined fields and the same PHP defined fields: sometimes fields get doubled up, sometimes they don’t.
It would be fantastic to fix some of these issues, we’d certainly pay for an add-on that sorted out these issues and made ACF even more developer friendly.
Any way to move the functionality for this in the to-do list from “Future” and into the next iteration?
The threads in the “Future” list:
Add constant for auto export – …http://support.advancedcustomfields.com/discussion/5453/add-support-for-auto-exporting-fields
Load and save to PHP – …http://support.advancedcustomfields.com/discussion/5495/exported-php-settings-override-database-based-settings
(and of course this thread)
I would personally prefer it to be a per-fields-set option rather than a global option. But will take what I can get!
If it helps – you could even make this another paid-for add-on as it’s certainly often going to be corporate/large-scale level users who need a feature like this. What’s another $25 to the cost of doing business?
Love your work. I’ve been using your plugin since v1 and in the meanwhile I’ve been refreshing your Todo list for several months now to see this request go up and down on the priority list :). As like the people here I would burst if you sorted this out. Are you still planning to incorporate this feature in your plugin? I’d also love to pay some money for it in the form of a premium add-on for example.
Let us know.
The topic ‘Flag for skip reading database’ is closed to new replies.
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 ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.