[wp-testers] Post status filters?

Dougal Campbell dougal at gunters.org
Fri May 14 15:42:34 UTC 2010


On May 13 2010 11:17 AM, Dougal Campbell wrote:
> I was just noticing that some functions like get_post_status(), 
> get_posts_statuses(), and get_page_statuses() don't do any filtering. 
> They just return static data, with no way to intercept and modify.
>
> Shouldn't those be filterable? I mean, you know, because that would be 
> awesome.

Nobody has a comment on this? Maybe I was too vague...

First of all, I think that it's natural that we should have an easy way 
to deal with custom post_status, just as with post_type and taxonomies. 
I thought that improvements for custom post_status support had even been 
mentioned in the feature list at some point.

Killer Feature Use-Case: Workflows

One of the more common things I hear people mention when they say that 
WordPress isn't a "real" CMS versus Drupal is the ability to define a 
workflow for publishing. For those of you who might not know what I mean 
(it took me a little while to figure it out), this basically has to do 
with how a post goes from "draft" to "published".

Currently, WordPress supports a simple workflow through a small set of 
post statuses and our roles and capabilities. Discounting the "future" 
status as essentially the same as "published", our workflow can 
basically be:

   Draft -> Pending -> Published

It's possible for one role to be able to create drafts (and nothing 
more). Another role can transition the post to "pending" status. Then 
another role can have permission to publish.

A more complex workflow might involve multiple levels of copy or style 
editors, fact-checkers, and such. A magazine or news organization might 
need to have something more like:

   Draft -> Fact Checking -> Editing -> Pending -> Published

Where there is a team of users responsible for fact-checking who make 
corrections. Then they pass the article up to editors who check grammar 
and edit for in-house style conformity. Then the article might be 
flagged for final review by a senior editor, before finally being published.

I think a lot of the plumbing to support this is already in place. I 
just don't know why the aforementioned functions give no way for plugins 
to fiddle about with the hardcoded status information. I see that 3.0 
has some new functions related to status, but these older functions are 
still stuck.

Or am I missing something? (a possibility I don't discount)

-- 
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/
http://twitter.com/dougal
http://twitual.com/


More information about the wp-testers mailing list