Custom fields are not restored to previous revisions

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 using wp_restore_post_revision.

Leave a Comment