Use URL if no sizes exist Closes #7491

This commit is contained in:
Mike Jolley 2015-02-19 14:15:28 +00:00
parent 09676934d6
commit cbfc2717db
2 changed files with 10 additions and 9 deletions

View File

@ -559,15 +559,16 @@ jQuery( function( $ ){
attachment = attachment.toJSON();
if ( attachment.id ) {
attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
attachment_image = attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url;
$product_images.append('\
<li class="image" data-attachment_id="' + attachment.id + '">\
<img src="' + attachment.sizes.thumbnail.url + '" />\
<ul class="actions">\
<li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li>\
</ul>\
</li>');
$product_images.append('\
<li class="image" data-attachment_id="' + attachment.id + '">\
<img src="' + attachment_image + '" />\
<ul class="actions">\
<li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li>\
</ul>\
</li>');
}
});

File diff suppressed because one or more lines are too long