Make WordPress Core


Ignore:
Timestamp:
09/20/2020 01:13:46 PM (4 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

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

    r48905 r49012  
    24072407    ?>
    24082408<script type="text/html" id="tmpl-wp-playlist-current-item">
    2409     <# if ( data.image ) { #>
    2410     <img src="{{ data.thumb.src }}" alt="" />
     2409    <# if ( data.thumb && data.thumb.src ) { #>
     2410        <img src="{{ data.thumb.src }}" alt="" />
    24112411    <# } #>
    24122412    <div class="wp-playlist-caption">
Note: See TracChangeset for help on using the changeset viewer.