From ecb977b5e22285dcd1880e2ecf0c9aa614548798 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Mon, 3 Jun 2024 22:04:13 +0000 Subject: [PATCH] Editor: Style Engine - continue `get_classnames` loop after adding the default classname. The `WP_Style_Engine` class has a method `get_classnames` that builds classnames. It loops over an array to add each classname. This changeset adds a `continue` in the loop after adding the default classname. Syncs changes from https://github.com/WordPress/gutenberg/pull/60153 Props ramonopoly. Fixes #60847. Built from https://develop.svn.wordpress.org/trunk@58311 git-svn-id: http://core.svn.wordpress.org/trunk@57768 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/style-engine/class-wp-style-engine.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/style-engine/class-wp-style-engine.php b/wp-includes/style-engine/class-wp-style-engine.php index 8b16cdd467..1ba813ed65 100644 --- a/wp-includes/style-engine/class-wp-style-engine.php +++ b/wp-includes/style-engine/class-wp-style-engine.php @@ -470,6 +470,7 @@ final class WP_Style_Engine { foreach ( $style_definition['classnames'] as $classname => $property_key ) { if ( true === $property_key ) { $classnames[] = $classname; + continue; } $slug = static::get_slug_from_preset_value( $style_value, $property_key ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 7bae5d3f0a..a67fbd5f8e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58310'; +$wp_version = '6.6-alpha-58311'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.