Add a filter to the jpeg_quality to allow for it to be modified. Fixes #6289.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-03-21 08:31:50 +00:00
parent c69821c5e0
commit 0c733599d4
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ function image_resize( $file, $max_w, $max_h, $crop=false, $suffix=null, $dest_p
else {
// all other formats are converted to jpg
$destfilename = "{$dir}/{$name}-{$suffix}.jpg";
if (!imagejpeg( $newimage, $destfilename, $jpeg_quality ) )
if (!imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality ) ) )
return new WP_Error('resize_path_invalid', __( 'Resize path invalid' ));
}