diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index bada2dc45a..efe4c95827 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -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; diff --git a/wp-includes/functions.php b/wp-includes/functions.php index beca14f664..855f35cf5c 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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 );