MB Revision extension for Meta Box allows you to track changes of the custom fields for post revisions: saving, comparing and restoring data from revision. It supports all field types, including groups and provide an easy way to see the changes in each revision.
What is a revision?
The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision – what was added, what remained unchanged, and what was removed. Lines added or removed are highlighted, and individual character changes get additional highlighting. Click the ‘Restore This Revision’ button to restore a revision.
By default, WordPress tracks the changes only for post title and post content. The MB Revision enables the tracking for custom fields as well. If you store a lot of data in the custom fields, and want to see the changes that your users made, this is the extension for you.
Why tracking revisions for custom fields is important?
Because your data is not only post title and post content! For a large websites, creating pages such as landing pages, project pages requires custom data, which are stored in the custom fields. They’re very important that modifying them carelessly might cause a big decrements of leads or sales. So you need to make sure every time you edit, you do it right.
Another situation is when you website has many users that can edit the content. What if someone changes a field while he’s sleepy or distracted? How do you know who did that when it happens?
For those reasons, to prevent unexpected changes in the website content, you need to track revisions for all kind of content you might have.
How does the extension work?
The plugin does 3 things:
- Automatically copies the values of the custom fields from the parent post to the new revision when the parent post is updated.
- Shows the changes on the revision comparison screen. You will see the changes of custom fields below the post title and post content. If the value is an array (cloneable, group field), you will see JSON-encoded of the array. We think JSON is quite good for human reading. Because we can see not only the structure, but also the real data.
- Restores the values of the custom fields from a revision to the parent post when users restore from a revision.
To enable revision support, all you need to do is adding
'revision' => true to meta box configuration. The extension will handle the rest.