Frontend Submission + PublishPress Revisions

Support MB Frontend Submission Frontend Submission + PublishPress RevisionsResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45105
    Saul CozensSaul Cozens
    Participant

    Hi,

    I'm trying to create a way for users to submit a frontend form that contains changes to a live (CPT) post. But I want those changes to be able to be reviewed and approved by a site admin/editor before being published.

    My plan was to use MB Frontend Submission to present the CPT (which is already based on MB), but to catch the submit process and generate a PublishPress Revision using the 'API' https://publishpress.com/knowledge-base/revisions-api/.

    The problem I'm struggling with is the best way to remove the original post_id (used to pre-populate the form for the user) so that a new post is created and still have the post_id available to add the necessary comment_count and postmeta entry to it to make it a PublishPress Revision.

    Or is there an entirely different/better way to create a 'future' revision of a CPT from a frontend submission?

    TIA

    #45117
    PeterPeter
    Moderator

    Hello Saul,

    I'm afraid that MB Frontend Submission doesn't support this case. You can set the post status Draft for the submitted post for the first time submitting. But after reviewing and publishing the post the status won't be changed to Draft again.

    #45133
    Saul CozensSaul Cozens
    Participant

    I did manage to get this working using a rwmb_frontend_update_post_data filter that creates the PP Revision and swaps its ID in place of the original.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.