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
This commit is contained in:
parent
e3dc0220ff
commit
45c255a6a9
|
@ -1320,7 +1320,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||||
'mime' => $attachment->post_mime_type,
|
'mime' => $attachment->post_mime_type,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'subtype' => $subtype,
|
'subtype' => $subtype,
|
||||||
'icon' => wp_mime_type_icon( $attachment->post_mime_type ),
|
'icon' => wp_mime_type_icon( $attachment->ID ),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $meta && 'image' === $type ) {
|
if ( $meta && 'image' === $type ) {
|
||||||
|
|
Loading…
Reference in New Issue