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

git-svn-id: https://develop.svn.wordpress.org/trunk@7444 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-03-21 08:31:50 +00:00
parent 90571b05c1
commit 0c47f0d9d9
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' ));
}