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

WordPress Trac noreply at wordpress.org
Sun Jun 29 20:42:22 UTC 2014


#20564: Framework for storing revisions of Post Meta
-------------------------------------------------+-------------------------
 Reporter:  alexkingorg                          |       Owner:
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
Component:  Revisions                            |  Release
 Severity:  normal                               |     Version:  3.4
 Keywords:  needs-testing needs-codex dev-       |  Resolution:
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 [attachment:20564.14.diff]
  * Only save metas that have changed
  * Keep a serialized array of the 'whitelisted' (revisioned) meta keys
  * When restoring a revision, traverse back thru past revisions to find
 the last time the meta was revisioned

 While this patch works and the unit tests pass, it seems a little too
 complicated. I'm going to work on this a bit more - keeping the serialized
 array of the 'whitelisted' (revisioned) meta keys, but switching to only
 saving non-blank meta values. This will eliminate the complicated
 traversal back to find the previously stored meta. We will still be
 creating rows for each (non-blank) meta which I think is ok as long as we
 make that fact clear to developers.

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


More information about the wp-trac mailing list