From f7aa3ab0672c0be86304b0d112a1a15df359f329 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 19 Nov 2012 08:44:37 +0000 Subject: [PATCH] Revert [22675]. wp_mime_type_icon() is more accurate when given a post ID, rather than a mime type. The "speed" mostly comes down to the ordering of cache hits, rather than any performance issues like #22503. see #21390. git-svn-id: http://core.svn.wordpress.org/trunk@22677 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 49c156825f..bafb0a4aa6 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1261,7 +1261,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 ), 'dateFormatted' => mysql2date( get_option('date_format'), $attachment->post_date ), );