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.
Fantastic, I can confirm this is working for me. Hats off to you Elliot.
Having the same issue as @hereswhatidid and @eablokker. Revisions are only created when the title or content are changed. After a bit of digging, looks like will be needing a hook on to wp_save_post_revision_check_for_changes.
PS. Thank you Elliot. Your plugin is godly and what I’ve needed for years.