Media: Implement fallback to full-size thumbnails for PDFs in Media Library.
When medium-size thumbnails are disabled, PDF previews in the Media Library grid view now fall back to displaying full-size thumbnails instead of a generic document icon. Props daleharrison, kushang78, mukesh27, sudipatel007, mai21, antpb. Fixes #39630. Built from https://develop.svn.wordpress.org/trunk@58947 git-svn-id: http://core.svn.wordpress.org/trunk@58343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e57bee933a
commit
81cfe7488c
|
@ -605,8 +605,12 @@ function wp_print_media_templates() {
|
|||
<div class="centered">
|
||||
<# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
|
||||
<img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
|
||||
<# } else if ( data.sizes && data.sizes.medium ) { #>
|
||||
<img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
|
||||
<# } else if ( data.sizes ) {
|
||||
if ( data.sizes.medium ) { #>
|
||||
<img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
|
||||
<# } else { #>
|
||||
<img src="{{ data.sizes.full.url }}" class="thumbnail" draggable="false" alt="" />
|
||||
<# } #>
|
||||
<# } else { #>
|
||||
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
|
||||
<# } #>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58946';
|
||||
$wp_version = '6.7-alpha-58947';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue