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

See [27640].



git-svn-id: https://develop.svn.wordpress.org/trunk@27813 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-03-28 12:49:48 +00:00
parent 0e188eba96
commit e94f08380e

View File

@ -2325,6 +2325,12 @@ function wp_prepare_attachment_for_js( $attachment ) {
$response['image'] = compact( 'src', 'width', 'height' ); $response['image'] = compact( 'src', 'width', 'height' );
list( $src, $width, $height ) = wp_get_attachment_image_src( $id, 'thumbnail' ); list( $src, $width, $height ) = wp_get_attachment_image_src( $id, 'thumbnail' );
$response['thumb'] = compact( 'src', 'width', 'height' ); $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' );
} }
} }