I am creating custom frontend post submission form. I am using wp_insert_post
for creating new post. The function is working fine but it is not creating the revision record in database.
Following is my code. I want record of every revision made in the post. Plz Help… Thanks…
<?php
if (isset($_POST['submit_post']) ) {
$my_post = array(
'post_title' => wp_strip_all_tags( $_POST['post_title'] )
);
wp_insert_post( $my_post );
}
?>
<form method="POST">
<div class="form-group">
<label for="post_title">Post Title</label>
<input type="text" class="form-control" name="post_title" placeholder="">
</div>
<button type="submit" name="submit_post" class="btn btn-default">Submit Post</button>
</form>