Use post_type not post_status.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e9442d2d08
commit
60d01b1f96
|
@ -767,7 +767,7 @@ function is_local_attachment($url) {
|
||||||
return true;
|
return true;
|
||||||
if ( $id = url_to_postid($url) ) {
|
if ( $id = url_to_postid($url) ) {
|
||||||
$post = & get_post($id);
|
$post = & get_post($id);
|
||||||
if ( 'attachment' == $post->post_status )
|
if ( 'attachment' == $post->post_type )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -555,6 +555,7 @@ function get_postdata($postid) {
|
||||||
'post_password' => $post->post_password,
|
'post_password' => $post->post_password,
|
||||||
'to_ping' => $post->to_ping,
|
'to_ping' => $post->to_ping,
|
||||||
'pinged' => $post->pinged,
|
'pinged' => $post->pinged,
|
||||||
|
'post_type' => $post->post_type,
|
||||||
'post_name' => $post->post_name
|
'post_name' => $post->post_name
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue