Home › Forums › General Issues › Flush Unused Custom Fields › Reply To: Flush Unused Custom Fields
No, there really is no solution and I doubt there ever will be. There really isn’t a safe way to delete all of the data for a field if a field is deleted. The solution that I posted will work if you are extremely careful about never creating 2 fields with the same name.
There isn’t a safe way to generically remove unnecessary field values when a post is updated. This is something that you need to decide to do and create a custom solution that works for your needs and use the acf/save_post hook to create a filter.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.