mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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) ) {
|
||||
|
||||
Reference in New Issue
Block a user