Return the default mime icon for playlist items that don't have a featured image in `wp_prepare_attachment_for_js()`.

See [27640].


Built from https://develop.svn.wordpress.org/trunk@27813


git-svn-id: http://core.svn.wordpress.org/trunk@27647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-03-28 12:50:14 +00:00
parent eec578abcd
commit c3a2635dc8
1 changed files with 6 additions and 0 deletions

View File

@ -2325,6 +2325,12 @@ function wp_prepare_attachment_for_js( $attachment ) {
$response['image'] = compact( 'src', 'width', 'height' );
list( $src, $width, $height ) = wp_get_attachment_image_src( $id, 'thumbnail' );
$response['thumb'] = compact( 'src', 'width', 'height' );
} else {
$src = wp_mime_type_icon( $attachment->ID );
$width = 48;
$height = 64;
$response['image'] = compact( 'src', 'width', 'height' );
$response['thumb'] = compact( 'src', 'width', 'height' );
}
}