Allow draft pages. Use post_type for object types. Reserve post_status strictly for status. fixes #1820

git-svn-id: https://develop.svn.wordpress.org/trunk@3510 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-02-09 10:03:48 +00:00
parent db5355013c
commit f961003343
21 changed files with 143 additions and 95 deletions

View File

@@ -314,7 +314,7 @@ function &get_pages($args = '') {
$pages = $wpdb->get_results("SELECT * " .
"FROM $wpdb->posts " .
"WHERE post_status = 'static' " .
"WHERE post_type = 'page' AND post_status = 'publish' " .
"$exclusions " .
"ORDER BY " . $r['sort_column'] . " " . $r['sort_order']);
@@ -450,7 +450,7 @@ function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false)
$id = (int) $id;
$_post = & get_post($id);
if ( ('attachment' != $_post->post_status) || ('' == $_post->guid) )
if ( ('attachment' != $_post->post_type) || ('' == $_post->guid) )
return __('Missing Attachment');
if (! empty($_post->guid) ) {