diff --git a/wp-includes/style-engine/class-wp-style-engine.php b/wp-includes/style-engine/class-wp-style-engine.php index 5582aacbb1..1234efdc64 100644 --- a/wp-includes/style-engine/class-wp-style-engine.php +++ b/wp-includes/style-engine/class-wp-style-engine.php @@ -454,8 +454,15 @@ final class WP_Style_Engine { continue; } - $parsed_styles['classnames'] = array_merge( $parsed_styles['classnames'], static::get_classnames( $style_value, $style_definition ) ); - $parsed_styles['declarations'] = array_merge( $parsed_styles['declarations'], static::get_css_declarations( $style_value, $style_definition, $options ) ); + $classnames = static::get_classnames( $style_value, $style_definition ); + if ( ! empty( $classnames ) ) { + $parsed_styles['classnames'] = array_merge( $parsed_styles['classnames'], $classnames ); + } + + $css_declarations = static::get_css_declarations( $style_value, $style_definition, $options ); + if ( ! empty( $css_declarations ) ) { + $parsed_styles['declarations'] = array_merge( $parsed_styles['declarations'], $css_declarations ); + } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index ab7c1bc1e3..f2c8eb091d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59441'; +$wp_version = '6.8-alpha-59442'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.