Changeset 28008
- Timestamp:
- 04/07/2014 09:24:02 PM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r27987 r28008 290 290 291 291 _.each( attachments, function( attachment ) { 292 if ( attachment.sizes.thumbnail ) { 293 attachment.thumbnail = attachment.sizes.thumbnail; 294 } else { 295 attachment.thumbnail = attachment.sizes.full; 292 if ( attachment.sizes ) { 293 if ( attachment.sizes.thumbnail ) { 294 attachment.thumbnail = attachment.sizes.thumbnail; 295 } else if ( attachment.sizes.full ) { 296 attachment.thumbnail = attachment.sizes.full; 297 } 296 298 } 297 299 } ); -
trunk/src/wp-includes/media-template.php
r28003 r28008 976 976 <dl class="gallery-item"> 977 977 <dt class="gallery-icon"> 978 <img src="{{{ attachment.thumbnail.url }}}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" /> 978 <# if ( attachment.thumbnail ) { #> 979 <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" /> 980 <# } else { #> 981 <img src="{{ attachment.url }}" /> 982 <# } #> 979 983 </dt> 980 984 <dd class="wp-caption-text gallery-caption">
Note: See TracChangeset
for help on using the changeset viewer.