From d2b6d050f4b6e943b8976864712715acaeb2e977 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Thu, 27 Sep 2012 06:07:56 +0000 Subject: [PATCH] Use the attachment id to look up the mime type icon instead of the raw mime type string, as wp_mime_type_icon() runs a broader search when using an id. see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22043 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 662678aae1..ee9d10de70 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1320,7 +1320,7 @@ function wp_prepare_attachment_for_js( $attachment ) { 'mime' => $attachment->post_mime_type, 'type' => $type, 'subtype' => $subtype, - 'icon' => wp_mime_type_icon( $attachment->post_mime_type ), + 'icon' => wp_mime_type_icon( $attachment->ID ), ); if ( $meta && 'image' === $type ) {