Media: Correct the image thumbnail logic in media templates.
This ensures the correct data properties are checked before displaying image thumbnails. Props chetan200891 Fixes #49655 Built from https://develop.svn.wordpress.org/trunk@49012 git-svn-id: http://core.svn.wordpress.org/trunk@48774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
123806ff28
commit
ecfff6fe80
|
@ -536,7 +536,7 @@ function wp_print_media_templates() {
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<# if ( data.uploading ) { #>
|
<# if ( data.uploading ) { #>
|
||||||
<div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div>
|
<div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div>
|
||||||
<# } else if ( 'image' === data.type && data.sizes ) { #>
|
<# } else if ( 'image' === data.type && data.size && data.size.url ) { #>
|
||||||
<div class="centered">
|
<div class="centered">
|
||||||
<img src="{{ data.size.url }}" draggable="false" alt="" />
|
<img src="{{ data.size.url }}" draggable="false" alt="" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -598,7 +598,7 @@ function wp_print_media_templates() {
|
||||||
<div class="thumbnail thumbnail-{{ data.type }}">
|
<div class="thumbnail thumbnail-{{ data.type }}">
|
||||||
<# if ( data.uploading ) { #>
|
<# if ( data.uploading ) { #>
|
||||||
<div class="media-progress-bar"><div></div></div>
|
<div class="media-progress-bar"><div></div></div>
|
||||||
<# } else if ( 'image' === data.type && data.sizes ) { #>
|
<# } else if ( 'image' === data.type && data.size && data.size.url ) { #>
|
||||||
<img src="{{ data.size.url }}" draggable="false" alt="" />
|
<img src="{{ data.size.url }}" draggable="false" alt="" />
|
||||||
<# } else { #>
|
<# } else { #>
|
||||||
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
|
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
|
||||||
|
|
|
@ -2406,8 +2406,8 @@ function gallery_shortcode( $attr ) {
|
||||||
function wp_underscore_playlist_templates() {
|
function wp_underscore_playlist_templates() {
|
||||||
?>
|
?>
|
||||||
<script type="text/html" id="tmpl-wp-playlist-current-item">
|
<script type="text/html" id="tmpl-wp-playlist-current-item">
|
||||||
<# if ( data.image ) { #>
|
<# if ( data.thumb && data.thumb.src ) { #>
|
||||||
<img src="{{ data.thumb.src }}" alt="" />
|
<img src="{{ data.thumb.src }}" alt="" />
|
||||||
<# } #>
|
<# } #>
|
||||||
<div class="wp-playlist-caption">
|
<div class="wp-playlist-caption">
|
||||||
<span class="wp-playlist-item-meta wp-playlist-item-title">
|
<span class="wp-playlist-item-meta wp-playlist-item-title">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-alpha-49011';
|
$wp_version = '5.6-alpha-49012';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue