diff --git a/src/wp-includes/block-supports/duotone.php b/src/wp-includes/block-supports/duotone.php index 0e04cb1631fb8..d010fb893b235 100644 --- a/src/wp-includes/block-supports/duotone.php +++ b/src/wp-includes/block-supports/duotone.php @@ -130,10 +130,10 @@ function wp_tinycolor_rgb_to_rgb( $rgb_color ) { */ function wp_tinycolor_hue_to_rgb( $p, $q, $t ) { if ( $t < 0 ) { - $t += 1; + ++$t; } if ( $t > 1 ) { - $t -= 1; + --$t; } if ( $t < 1 / 6 ) { return $p + ( $q - $p ) * 6 * $t; @@ -459,7 +459,7 @@ function wp_get_duotone_filter_svg( $preset ) { $svg = ob_get_clean(); - if ( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) { + if ( ! SCRIPT_DEBUG ) { // Clean up the whitespace. $svg = preg_replace( "/[\r\n\t ]+/", ' ', $svg ); $svg = str_replace( '> <', '><', $svg ); @@ -543,7 +543,7 @@ function wp_render_duotone_support( $block_content, $block ) { // !important is needed because these styles render before global styles, // and they should be overriding the duotone filters set by global styles. - $filter_style = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG + $filter_style = SCRIPT_DEBUG ? $selector . " {\n\tfilter: " . $filter_property . " !important;\n}\n" : $selector . '{filter:' . $filter_property . ' !important;}';