I have built several WordPress websites and noticed that custom fields are not restored to previous revisions. This might cause a problem when using custom fields to store content. Anybody knows how to add the custom fields to the revision history?
Leave a Reply
You must be logged in to post a comment.
Post revisions are for the fields in the posts database table and not the postmeta database table.
So if you want to create your own postmeta revision you could save the meta when the revision is made using
_wp_put_post_revision
and you can restore the meta usingwp_restore_post_revision
.