WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use an additional, arbitrary post status on one of my custom post types. I'm calling it "limbo", and it's assigned to a post which has been deleted by the user, but one that I still want to keep its data on the database for legacy purposes.

I assign it to a post by hijacking the permanent deletion routine, which is to say I'm not really registering it via the proper WordPress function register_post_status, because a) it's not something I want my users to worry about or deliberately assign to their posts; and b) it's only applicable to a single custom post type, which I cannot specifically target with register_post_status.

I don't feel confident that it's the most reliable solution, though.

Is there a routine check that WordPress would run on the database which would detect this invalid post status and revert it, or am I being overly paranoid?

Either way, is there a better solution which wouldn't rely on full-blown plug-ins like Edit Flow?

share|improve this question
Have you solved this? If not, can you post the code that you have? – brasofilo Jul 5 '12 at 1:13
I've monitored a test post and everything seems fine so far. I think I must have changed the post_status unwillingly at some point, which got me worried excessively. Still, the question stands unanswered. I don't think the code I have is relevant, though. Think of this: if someone was to change it directly in the db, would it be changed back at some point? – Tomas Buteler Jul 5 '12 at 7:57
up vote 1 down vote accepted

I'm pretty sure only attachments have post status "enforcement" ("inherit" or "private"), and that's only inside wp_insert_attachment(). Otherwise there's no cron action or routine I'm aware of that'll change stati.

I still think you should opt for registering it though. Without any arguments, everything will still behave the way it does currently; they won't appear in post results, nor as part of the admin UI.

And since WP_Query whitelists post stati, you can now use it's awesome power to grab limbos with post_status=limbo ;)

share|improve this answer
Thanks @TheDeadMedic! Makes me feel more confident to continue down that path. I took your suggestion and registered it, and everything is fine on the front end too! – Tomas Buteler Jul 7 '12 at 15:02

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.