[wp-hackers] post_status and post_type
Ryan Boren
ryan at boren.nu
Wed Feb 8 06:06:04 GMT 2006
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'. 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.
Ryan
More information about the wp-hackers
mailing list