wpsc_scale_image_cropped

Located in: ajax.functions.php

Functions that call this hook: wpsc_scale_image()

Arguments Accepted: true

Version Introduced: 3.8.9

Description: Determine whether to crop when scaling images.

Code in context:

[php firstline=”1021″ highlight=”1023″]

if ( $generate_thumbnail == true ) {

//JS – 7.1.2010 – Added true parameter to function to not crop – causing issues on WPShop

$crop = apply_filters( ‘wpsc_scale_image_cropped’, true );

$intermediate_size_data = image_make_intermediate_size( $file_path, $width, $height, $crop );

$attachment_metadata[‘sizes’][$intermediate_size] = $intermediate_size_data;

wp_update_attachment_metadata( $attachment_id, $attachment_metadata );

$intermediate_image_data = image_get_intermediate_size( $attachment_id, $intermediate_size );

}

[/php]