Domanda

As per the documentation, Draft and Private are two mutually exclusive post statuses. Therefore, when you mark a draft post as Private, it is no longer a draft.

We are a big team making extensive use of private posts. Therefore, we would like to mark a draft as private (an unfinished post that will be internal). Ideally, the "publish" button would un-draft the post, not make it public.

To put it differently, we need both a (draft / finished post) distinction, and a (public / private post) distinction.

Is that possible? Do we need a custom post status?

È stato utile?

Soluzione

I would probably create a custom field / check box for this for a draft stage. Then hook into post status transition (or around) and when post is published force it to only private, even if normal publish was pressed.

From personal experience custom post statuses are a wreck. They seem like a good idea, but they just introduce mountain more of access and visibility problems since core code never cared much for any non–default status.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a wordpress.stackexchange
scroll top