I found this page:
https://johnblackbourn.com/post-meta-revisions-wordpress
which shows this:
Displaying the meta field on the revisions screen
For this we need to hook into the _wp_post_revision_fields action to tell WordPress which fields to show on the revisions screen, and hook into the _wp_post_revision_field_my_meta filter to display the meta field. Note that the filter name is specific for each field, so you’ll need to add a hook for each of your meta fields in the format _wp_post_revision_field_{field_name}.
function my_plugin_revision_fields( $fields ) {
$fields['my_meta'] = 'My Meta';
return $fields;
}
add_filter( '_wp_post_revision_fields', 'my_plugin_revision_fields' );
function my_plugin_revision_field( $value, $field ) {
global $revision;
return get_metadata( 'post', $revision->ID, $field, true );
}
add_filter( '_wp_post_revision_field_my_meta', 'my_plugin_revision_field', 10, 2 );
However, I simply cannot get it to work. For example with meta field “competence” it should be :
function my_plugin_revision_fields( $fields ) {
$fields['competence'] = 'Competence';
return $fields;
}
add_filter( '_wp_post_revision_fields', 'my_plugin_revision_fields' );
function my_plugin_revision_field( $value, $field ) {
global $revision;
return get_metadata( 'post', $revision->ID, $field, true );
}
add_filter( '_wp_post_revision_field_competence', 'my_plugin_revision_field', 10, 2 );
if I’m reading it right, but nothing changes on the revisions.php screen. Let me know if you have any luck….
Alex