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.




git-svn-id: https://develop.svn.wordpress.org/trunk@58311 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2024-06-03 22:02:33 +00:00
parent 77f38c5926
commit 87ca676a13

View File

@ -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 );