[wp-hackers] post_status and post_type

Choan C. Gálvez choan.galvez at gmail.com
Wed Feb 8 10:04:05 GMT 2006

On 08/02/06, Ryan Boren <ryan at boren.nu> wrote:
> Currently, post_status contains both type and status information.  A
> status of 'publish', 'private', or 'draft' has an assumed type of
> 'post'.  A status of 'static' assumes a type of 'page' and a status of
> 'publish'.  There is currently no way to have a page that has a status
> other than 'publish'.
> No longer.  The attached patch provides for a post_type of 'post',
> 'page', or 'attachment' and a post_status of 'publish', 'private',
> 'draft', or 'inherit'.

That's great! The impossibility of creating unpublished pages has been
(for me) the great stopper to use WP as my clients' CMS.

Could it go into 2.0.2?

> This allows a 'page' to have any status, which
> was previously not possible.  "Write->Page" and "Manage->Pages"  now
> have a "Page Status" radio box.  The page queries need to be looked over
> to make sure they are showing only published pages where appropriate.
> wp_list_pages() already excludes non-published pages.
> This will surely break some plugins.  We can write some compatibility
> code that plugins can include to help them deal with the change.  While
> doing that, I'd like to audit queries done by plugins and see which ones
> would make good candidates for inclusion in WP core abstracted behind a
> function call.

Yep, that'll be good.

By the way, no attachment.


More information about the wp-hackers mailing list