Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Update: Ok, not sure how much all that makes sense, so will try and write a brief explaining the problem a bit better.

I have my code working so via email using 'post status transitions' the user clicks a link and it changes the status of the given post from 'pending' to 'published'. The problem is with already published posts that are edited. Using 'Revisionary' Plugin I can save a draft page as a revision and keeps the old version live, and it even sends it still. The problem I think comes is the revision ID is different to the published ID and it won't replace the revision with the published version when I click the link in the email.

Problem in Detail:

I have been working on a plugin that allows page approval via email.

An editor can submit a page for review. This triggers an email to be sent to a given email address with the page info (title, content, featured image, author details, etc.). There is then a link that can accept the changes. When the link is clicked it allows the page to go live. It uses post status transactions. I modified the following code to include pending_to_pending, changed who it emails to so it's a option in settings for admins to choose and added in the rest of the page info, and put it in a html template, but the basics of it are as follows:

When a user creates a post (pending), send a confirmation link that allows them to publish

All works exactly as I want. The problem is (which seems to be somewhat a limitation of Wordpress) is once a page is created an editor can just come in and update a page and bypass the approval plugin I have created. The major problem seems to be you can't save a draft and keep the previous version published. Either it is a draft, pending or published.

Now I have come across a plugin called Revisionary which does allow you to submit updates as reviews. It even triggers the plugin I setup and sends an email with the revisied version rather then what is live. The problem comes that when I click the accept in the email it doesn't then push that version live, just keeps what was already live, live. I assume because the plugin creates a revision of it like an older version so Wordpress doesn't see it as pending.

So what I am wondering is, is there a way of marrying the two together. As it sends the version i want to push live in the email I assume there must be a way of telling WordPress to push this live with the post status transactions?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.