From 5918c5d365497c51ac83140d552bb2469e180919 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 15 Dec 2014 21:42:32 +0000 Subject: [PATCH] Clarify the behaviour of the `wp_editor_set_quality` and `jpeg_quality` filters. Props DH-Shredder See #29856 git-svn-id: https://develop.svn.wordpress.org/trunk@30874 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-image-editor.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wp-includes/class-wp-image-editor.php b/src/wp-includes/class-wp-image-editor.php index 2db73f0e0f..fcca5574b8 100644 --- a/src/wp-includes/class-wp-image-editor.php +++ b/src/wp-includes/class-wp-image-editor.php @@ -233,6 +233,11 @@ abstract class WP_Image_Editor { /** * Filter the default image compression quality setting. * + * Applies only during initial editor instantiation, or when set_quality() is run + * manually without the `$quality` argument. + * + * set_quality() has priority over the filter. + * * @since 3.5.0 * * @param int $quality Quality level between 1 (low) and 100 (high). @@ -244,6 +249,11 @@ abstract class WP_Image_Editor { /** * Filter the JPEG compression quality for backward-compatibility. * + * Applies only during initial editor instantiation, or when set_quality() is run + * manually without the `$quality` argument. + * + * set_quality() has priority over the filter. + * * The filter is evaluated under two contexts: 'image_resize', and 'edit_image', * (when a JPEG image is saved to file). *