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

WordPress Trac noreply at wordpress.org
Tue Jul 8 14:11:39 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):

 I think you can solve your problem using metadata_exists to check to the
 presence of the meta data. I don't think this issue affects the
 revisioning of post meta, deserves some testing!

 Replying to [comment:107 p51labs]:
 > Let me expand a little on my previous example. Let's say I have 3
 checkboxes, all for one meta_key and the values are 1,2,3. Now by default
 in my meta box I set 1,3 as checked. Now a user comes in and creates a
 post and decides none of them should be checked. Now not storing the data
 is accurate however it doesn't tell me that the user unchecked anything so
 when I render the field again do I assume I need to load the default
 values or now leave them all unchecked? I suppose a I could check whether
 or not the post is new or being edited but is that the best approach?
 > This solution requires checking for the meta and if the meta key exists.
 > Just throwing in some thoughts, thanks for taking the time to consider

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

More information about the wp-trac mailing list