I am trying add post revisions when I edit a post with the post edit form generated from Toolset.
I already enabled post revisions by adding `define( 'WP_POST_REVISIONS', TRUE );` in `wp-config.php`.
I created a function that uses `wp_save_post_revision` a core from WP and hooked into `cred_submit_complete` and `cred_save_data` but the form still doesn't record the post revisions.
Can you help me adding post revision data when the post edit form submitted?
Hi,
Thank you for contacting us and I'd be happy to assist.
I've performed some tests on my website with different hooks from Toolset Forms API, but couldn't make the 'wp_save_post_revision' function work with them, either.
A feature like this will require some structural changes to how the edit forms handle post data.
Can you please share some background details, on how you're planning to use these post revisions? I'll be in a better position to suggest some alternatives, accordingly.
regards,
Waqar
Waqar,
Some background: We are using the post revision for history / versioning control of the content. We want to generally avoid going to the admin area to add / edit posts. Only admins should be able to do that. We noticed that submitting the front end form doesn't generate revisions.
I already found a solution by installing a plugin that handles revisions. I hope that toolset post modification forms should be able to do this even if not by default and be turned on/off with an API hook.