Merge pull request #6417 from corvannoorloos/attachment-thumbnail-url

category and product (-column) image(s) should be inserted as a thumbnail
This commit is contained in:
Mike Jolley 2014-10-02 13:52:12 +01:00
commit 3964d3fc3c
3 changed files with 4 additions and 4 deletions

View File

@ -588,7 +588,7 @@ jQuery( function( $ ){
$product_images.append('\
<li class="image" data-attachment_id="' + attachment.id + '">\
<img src="' + attachment.url + '" />\
<img src="' + attachment.sizes.thumbnail.url + '" />\
<ul class="actions">\
<li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li>\
</ul>\

View File

@ -181,7 +181,7 @@ class WC_Admin_Post_Types {
switch ( $column ) {
case 'thumb' :
echo '<a href="' . get_edit_post_link( $post->ID ) . '">' . $the_product->get_image() . '</a>';
echo '<a href="' . get_edit_post_link( $post->ID ) . '">' . $the_product->get_image( 'thumbnail' ) . '</a>';
break;
case 'name' :
$edit_link = get_edit_post_link( $post->ID );

View File

@ -139,7 +139,7 @@ class WC_Admin_Taxonomies {
attachment = file_frame.state().get('selection').first().toJSON();
jQuery('#product_cat_thumbnail_id').val( attachment.id );
jQuery('#product_cat_thumbnail img').attr('src', attachment.url );
jQuery('#product_cat_thumbnail img').attr('src', attachment.sizes.thumbnail.url );
jQuery('.remove_image_button').show();
});
@ -226,7 +226,7 @@ class WC_Admin_Taxonomies {
attachment = file_frame.state().get('selection').first().toJSON();
jQuery('#product_cat_thumbnail_id').val( attachment.id );
jQuery('#product_cat_thumbnail img').attr('src', attachment.url );
jQuery('#product_cat_thumbnail img').attr('src', attachment.sizes.thumbnail.url );
jQuery('.remove_image_button').show();
});