Use post_type not post_status.

git-svn-id: https://develop.svn.wordpress.org/trunk@3535 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-02-15 07:16:58 +00:00
parent a5e4c0a7d9
commit 181d539681
2 changed files with 2 additions and 1 deletions

View File

@ -767,7 +767,7 @@ function is_local_attachment($url) {
return true;
if ( $id = url_to_postid($url) ) {
$post = & get_post($id);
if ( 'attachment' == $post->post_status )
if ( 'attachment' == $post->post_type )
return true;
}
return false;

View File

@ -555,6 +555,7 @@ function get_postdata($postid) {
'post_password' => $post->post_password,
'to_ping' => $post->to_ping,
'pinged' => $post->pinged,
'post_type' => $post->post_type,
'post_name' => $post->post_name
);