From 68a3e80d4d41811cd2ac89c0b469eba097c7abbf Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 19 Nov 2012 08:39:14 +0000 Subject: [PATCH] wp_mime_type_icon() is faster when given a mime type, rather than a post ID. see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22675 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 bafb0a4aa6..49c156825f 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->ID ), + 'icon' => wp_mime_type_icon( $attachment->post_mime_type ), 'dateFormatted' => mysql2date( get_option('date_format'), $attachment->post_date ), );