Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add any revisioned meta fields to the revisions screen. #5364

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from

Conversation

adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Oct 2, 2023

Follow up to - follow up https://core.trac.wordpress.org/changeset/56745, this PR now includes the logic for displaying the revisioned meta on the revisions screen.

This core code would replace the filtered in display added by Gutenberg - https://github.com/WordPress/gutenberg/blob/3e260aa41d3c50684efac9728bdbba918658d131/packages/block-library/src/footnotes/index.php#L92-L120. Plugins can still overwrite the default display using the _wp_post_revision_field_{$meta_key} filter.

Trac ticket: https://core.trac.wordpress.org/ticket/59636


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.

@adamsilverstein adamsilverstein changed the title dd any revisioned meta fields to the revisions screen. Add any revisioned meta fields to the revisions screen. Oct 2, 2023
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @adamsilverstein!

This looks like a separate enhancement from the original ticket. While I think it's a nice addition to the post-meta revisions, it might be too late to ship in betas.

Cc. @hellofromtonya, @getsource

src/wp-admin/includes/revision.php Show resolved Hide resolved
src/wp-includes/revision.php Outdated Show resolved Hide resolved
@adamsilverstein
Copy link
Member Author

This looks like a separate enhancement from the original ticket. While I think it's a nice addition to the post-meta revisions, it might be too late to ship in betas.

Yea, I wasn't sure about that since it builds on a new feature we sometimes allow follow up improvements. If not, we can merge in early 6.4. This change is more "compatible" with the existing GB filtering because they overload the same key, there is no harm in running both code paths.

@adamsilverstein
Copy link
Member Author

This looks like a separate enhancement from the original ticket. While I think it's a nice addition to the post-meta revisions, it might be too late to ship in betas.

I'll plan to get this in the next release.

@Mamaduka
Copy link
Member

Mamaduka commented Oct 9, 2023

Thanks, @adamsilverstein!

I don’t want to block the patch. Feel free to check with release leads about this.

@getsource
Copy link
Member

Hi @adamsilverstein -- thank you so much!

My apologies for not seeing the ping initially.
I think your plan to land this in 6.5 at this point makes sense, and that it'd be a great addition to the feature.

If you haven't already created a trac ticket for this improvement/enchancement specifically (I didn't find one on a quick search), I think it might make it easier to follow that way.

What do you think?

@adamsilverstein
Copy link
Member Author

If you haven't already created a trac ticket for this improvement/enchancement specifically (I didn't find one on a quick search), I think it might make it easier to follow that way.

Yes good idea, I will go ahead and open up a follow up ticket to add this in 6.5

@adamsilverstein
Copy link
Member Author

If you haven't already created a trac ticket for this improvement/enchancement specifically (I didn't find one on a quick search), I think it might make it easier to follow that way.

Yes good idea, I will go ahead and open up a follow up ticket to add this in 6.5

Here is the follow up ticket - https://core.trac.wordpress.org/ticket/59636

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adamsilverstein, mamaduka, spacedmonkey, mukesh27, mikeschroder.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@adamsilverstein
Copy link
Member Author

@Mamaduka rethinking if we should add fields automatically, see my comment on the trac ticket. let me know what you think.

Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@Mamaduka
Copy link
Member

Thank you, @adamsilverstein! Your reasoning makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants