Index: post.php
===================================================================
--- post.php	(revision 13254)
+++ post.php	(working copy)
@@ -3405,8 +3405,10 @@
 
 	if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recomended to rely upon this.
 		$url = get_the_guid( $post->ID );
+		
+	$attachment_types = apply_filters('attachment_types', array('attachment'));
 
-	if ( 'attachment' != $post->post_type || empty($url) )
+	if ( in_array($post->post_type, $attachment_types) || empty($url) )
 		return false;
 
 	return apply_filters( 'wp_get_attachment_url', $url, $post->ID );
