WordPress Post Revisions
题
Ok relatively simple question here. I just want to display the autosaves/revisions on my Edit Post page so my client can alternate between old autosaves etc.
Any ideas how i turn this on ?
Thanks!!!
**** EDIT: ANSWERED
On Edit Post page i simply clicked at the top "Screen Options" to show the Post Revisions Module. I didn't realise how simple it was!
解决方案
After a short while i was able to fix the issue. Simply see the Edit i made to the question itself. thanks!
其他提示
I just want to add here my solution. I had relatively same problem (cpt posts don't show revisions meta-box or checkbox in screen options DESPITE multiple edits).
For my problem I had to dig deep into living project, touched by many devs before me.
The answer was found by me in databse - 'revisions' are stored as childres posts to the cpt posts they belong to. That means they are themselves a post_type. That also means, that they identify their parent by value in column 'post_parent' - where the ID of a post sits.
There was a custom function in my project for overwriting post_parent for custom posts (mainly for the purpose of custom breadcrumbs). It was also overwriting revisions post_parent values for some reason.
I've simply added $post->post_type != 'revision'
to parameters of function and then
if($post->post_type != 'revision') {
$data['post_parent'] = $post->ID;
}
just to be sure.
I hope it'll help at least one person, desperately looking for answer like I did today.