Home › Forums › Bug Reports › WordPress 3.6 Revisions: custom fields no longer tracked › Reply To: WordPress 3.6 Revisions: custom fields no longer tracked
I recently created a custom field type, which stores the data in an associative array. The revision preview for the field was therefore broken. I solved the problem by adding a filter on line 127 of core/controllers/revisions.php:
$value = apply_filters('acf/input/'.$field['type'].'/revision_format', $value);
And adding the filter in my custom field __contsruct method like so:
add_filter('acf/input/heirachial_relationship/revision_format', array($this, 'format_value_for_revision') );
function format_value_for_revision($value) {
// Do your thing
return $value;
}
Be great to see this added to the core Elliot. Though the filter may not be named in keeping with the rest of the plugin.
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.