From 45c255a6a994309265700e5c07f9898748958f2a 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: http://core.svn.wordpress.org/trunk@22043 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 ) {