do not attach automatic generated thumbnails to item (#115)

This commit is contained in:
Leo Germani 2018-08-27 17:40:34 -03:00
parent 507f33de32
commit ef2673d3cf
1 changed files with 2 additions and 2 deletions

View File

@ -425,7 +425,7 @@ class Items extends Repository {
$TainacanMedia = \Tainacan\Media::get_instance();
$thumb_blob = $TainacanMedia->get_pdf_cover( $filepath );
if ( $thumb_blob ) {
$thumb_id = $TainacanMedia->insert_attachment_from_blob( $thumb_blob, basename( $filepath ) . '-cover.jpg', $item->get_id() );
$thumb_id = $TainacanMedia->insert_attachment_from_blob( $thumb_blob, basename( $filepath ) . '-cover.jpg' );
return $thumb_id;
}
@ -443,7 +443,7 @@ class Items extends Repository {
return $existing_thumb;
} else {
$TainacanMedia = \Tainacan\Media::get_instance();
$thumb_id = $TainacanMedia->insert_attachment_from_url( $thumb_url, $item->get_id() );
$thumb_id = $TainacanMedia->insert_attachment_from_url( $thumb_url );
update_post_meta( $item->get_id(), $meta_key, $thumb_id );
return $thumb_id;