Add tests which ensure the wp_editor_set_quality and jpeg_quality filters only apply if they are added before the corresponding WP_Image_Editor is instantiated.

Props DH-Shredder
See #29856


git-svn-id: https://develop.svn.wordpress.org/trunk@30873 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2014-12-15 21:24:21 +00:00
parent 663d12c8f8
commit 4f35288dd1
2 changed files with 32 additions and 7 deletions
@@ -8,6 +8,11 @@ if (class_exists( 'WP_Image_Editor' ) ) :
public static $test_return = true;
public static $save_return = array();
// Allow testing of jpeg_quality filter.
public function set_mime_type( $mime_type = null ) {
$this->mime_type = $mime_type;
}
public function load() {
return self::$load_return;
}