wp_mime_type_icon() is faster when given a mime type, rather than a post ID. see #21390.

git-svn-id: http://core.svn.wordpress.org/trunk@22675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-19 08:39:14 +00:00
parent a1dba4a709
commit d9d0f9a714

View File

@ -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 ),
);