[wp-trac] [WordPress Trac] #20564: Framework for storing revisions of Post Meta

WordPress Trac noreply at wordpress.org
Mon Oct 2 14:19:22 UTC 2023


#20564: Framework for storing revisions of Post Meta
-------------------------------------------------+-------------------------
 Reporter:  alexkingorg                          |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Revisions                            |     Version:  3.4
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch commit needs-dev-note      |     Focuses:
  has-unit-tests                                 |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 @spacedmonkey or @Mamaduka - I have one more follow up PR @
 https://github.com/WordPress/wordpress-develop/pull/5364 - this one adds
 the display of meta fields to the revisions screen, letting us remove some
 custom code from the GB plugin.

 My thinking on this PR that could use review/feedback:

 * All revisioned meta fields should show on the revisions screen.
 * Use a new filter (`wp_revision_ui_fields`) instead of the existing
 `_wp_post_revision_fields` filter which is meant more for post fields than
 meta and is called in many places.
 * The new filter allows the field display to be easily unhooked
 * Developers can replace the default display by adding their own callback
 for the `_wp_post_revision_field_{$meta_key}` filter.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/20564#comment:207>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list