Show post meta fields in revisions panel #6735
Open
+40
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trac ticket:
I can see that there was a similar closed ticket for this and a related pull request.
I just left a comment in the trac ticket to discuss how to proceed here.
@adamsilverstein @Mamaduka As you discussed this in the past, it would be great to hear your opinion on the best path forward.
What?
Basically, this pull request shows the changes made to the post meta fields that have revisions enabled in the revisions UI.
Why?
For 6.6, it is planned to allow the editing of custom fields when a block is connected to them. With that, I believe it is important to show the relevant changes in the revisions.
How?
It iterates through the
wp_post_revision_meta_keys
, and it creates a new row in the diff for each of the meta fields that have changed.I excluded the
footnotes
because it has its own section right now, but I am not sure if it should be unified in the proposed "Post Meta".Demo
This is a quick demo of how it works after the changes in this pull request:
Post.meta.revisions.with.key.demo.mp4
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.