Support » Plugin: Revisionize » Programmatically create a revision

  • Resolved Antonio Gallo

    (@antoniogallo)


    I wish to get people contribution to a post using an external form.
    Is there a way to programmatically create a new revision?
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author jamiechong

    (@jamiechong)

    @antoniogallo

    I haven’t done any testing with this, but you can try something like:

    
    Revisionize\create_revision($post, true);
    

    I suspect there will likely be problems however.

    Thread Starter Antonio Gallo

    (@antoniogallo)

    Yes! I already did this! šŸ™‚ It works great!

    Only side note: i noticed that when the post is cloned the author is changed;
    so after i programmatically create a new post then i fix the author using update_post() using the new “id”.

    Thanks for your answer anyway and for this great plugin.

    deanna477

    (@deanna477)

    Antonio, I believe I’m trying to accomplish the same thing. Can you please provide the steps that you took? Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Programmatically create a revision’ is closed to new replies.