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

WordPress Trac noreply at wordpress.org
Tue Aug 1 19:07:27 UTC 2023


#20564: Framework for storing revisions of Post Meta
------------------------------------+------------------------------
 Reporter:  alexkingorg             |       Owner:  adamsilverstein
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  6.4
Component:  Revisions               |     Version:  3.4
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:
------------------------------------+------------------------------

Comment (by adamsilverstein):

 [attachment:"20564.24.diff"] includes the latest changes from the PR:
 * Revisoining can be enabled in `register_post_meta` or using a filter
 * Revisioned meta are handled in autosaves (needs more tests)
 * Revisioned meta are restored properly
 * The footnote revisions are shown clearly in the revisions screen (code
 belongs in Gutenberg and is included here for testing only)
 * Other revisioned meta is also shown on the revisions screen (could use
 additional testing)
 * REST API posts endpoint unhooks meta save until meta has been set
 * REST API revisions endpoint includes (read only) meta data
 * Extensive tests

 This could use testing for:
 * Custom post type meta revisioning, setting and retrieving in the REST
 API
 * Storing and restoring multiple meta values on a single key
 * Autosaves and previews work correctly for meta data, including updated
 footnotes showing properly in previews

 * Also: now that this is in place, we could consider revisioning the
 post_thumbnail id so we could stop using the current fragile query
 parameter approach currently used in previews.

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


More information about the wp-trac mailing list