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:
parent
a5e4c0a7d9
commit
181d539681
@ -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;
|
||||
|
@ -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
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user