Attachment data abstraction from mdawaffe. fixes #3440

git-svn-id: https://develop.svn.wordpress.org/trunk@4612 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-12-05 22:37:19 +00:00
parent c99f10fdae
commit 32c1d247ac
8 changed files with 61 additions and 28 deletions
+2 -3
View File
@@ -353,12 +353,11 @@ function get_attachment_icon($id = 0, $fullsize = false, $max_dims = false) {
$mime = $post->post_mime_type;
$imagedata = get_post_meta($post->ID, '_wp_attachment_metadata', true);
$imagedata = wp_get_attachment_metadata( $post->ID );
$file = get_post_meta($post->ID, '_wp_attached_file', true);
$file = get_attached_file( $post->ID );
$exts = array('jpg', 'gif', 'png');
if ( !$fullsize && !empty($imagedata['thumb'])
&& ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file))
&& file_exists($thumbfile) ) {