mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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:
@@ -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' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user