Make WordPress Core


Ignore:
Timestamp:
03/28/2014 12:49:48 PM (10 years ago)
Author:
wonderboymusic
Message:

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

See [27640].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r27800 r27813  
    23262326            list( $src, $width, $height ) = wp_get_attachment_image_src( $id, 'thumbnail' );
    23272327            $response['thumb'] = compact( 'src', 'width', 'height' );
     2328        } else {
     2329            $src = wp_mime_type_icon( $attachment->ID );
     2330            $width = 48;
     2331            $height = 64;
     2332            $response['image'] = compact( 'src', 'width', 'height' );
     2333            $response['thumb'] = compact( 'src', 'width', 'height' );
    23282334        }
    23292335    }
Note: See TracChangeset for help on using the changeset viewer.