Add ->get_quality() method to WP_Image_Editor class.

Adds unit tests.

Props markoheijnen.
Fixes #28154.


git-svn-id: https://develop.svn.wordpress.org/trunk@28879 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-06-28 03:49:55 +00:00
parent 34ed4c44f5
commit c2b7f8022c
4 changed files with 56 additions and 45 deletions
@@ -143,7 +143,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
if ( is_wp_error( $updated_size ) )
return $updated_size;
return $this->set_quality( $this->quality );
return true;
}
/**
@@ -160,7 +160,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
if ( is_wp_error( $quality_result ) ) {
return $quality_result;
} else {
$quality = $this->quality;
$quality = $this->get_quality();
}
try {