From e0d6d1120dc9e28ec20634f4973b9c9cedd8f407 Mon Sep 17 00:00:00 2001 From: Dovid Levine Date: Mon, 30 Dec 2024 14:57:20 +0200 Subject: [PATCH] fix: incorrect conditional check in WP_Theme_JSON_Gutenberg::convert_variables_to_values() --- lib/class-wp-theme-json-gutenberg.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 3af123d96bcc5a..0d1fc1d50bc531 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -4483,7 +4483,7 @@ private static function convert_variables_to_value( $styles, $values ) { continue; } - if ( 0 <= strpos( $style, 'var(' ) ) { + if ( false !== strpos( $style, 'var(' ) ) { // find all the variables in the string in the form of var(--variable-name, fallback), with fallback in the second capture group. $has_matches = preg_match_all( '/var\(([^),]+)?,?\s?(\S+)?\)/', $style, $var_parts );