Skip to content

Commit 6c648a6

Browse files
Editor: Remove WP_DEBUG defined check in wp_tinycolor_hue_to_rgb().
The constant `WP_DEBUG` is a default constant that is set within `wp_initial_constants()` when not defined. This means the constant will always be defined, thus making the `defined( 'WP_DEBUG' )` unnecessary. Removing the `defined()` provides these benefits: * Makes the code more readable. * Tiny performance optimization. References: * WordPress/gutenberg#45979 Follow-up to [52049]. Props ocean90, spacedmonkey, mamaduka. See #57527. Built from https://develop.svn.wordpress.org/trunk@55141 git-svn-id: https://core.svn.wordpress.org/trunk@54674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent c5b1447 commit 6c648a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

wp-includes/block-supports/duotone.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ function wp_get_duotone_filter_svg( $preset ) {
459459

460460
$svg = ob_get_clean();
461461

462-
if ( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) {
462+
if ( ! SCRIPT_DEBUG ) {
463463
// Clean up the whitespace.
464464
$svg = preg_replace( "/[\r\n\t ]+/", ' ', $svg );
465465
$svg = str_replace( '> <', '><', $svg );
@@ -543,7 +543,7 @@ function wp_render_duotone_support( $block_content, $block ) {
543543

544544
// !important is needed because these styles render before global styles,
545545
// and they should be overriding the duotone filters set by global styles.
546-
$filter_style = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG
546+
$filter_style = SCRIPT_DEBUG
547547
? $selector . " {\n\tfilter: " . $filter_property . " !important;\n}\n"
548548
: $selector . '{filter:' . $filter_property . ' !important;}';
549549

wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.2-alpha-55140';
19+
$wp_version = '6.2-alpha-55141';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)