[wp-trac] [WordPress Trac] #60847: Style Engine: continue get_classnames loop after adding the default classname
WordPress Trac
noreply at wordpress.org
Wed Mar 27 00:23:59 UTC 2024
#60847: Style Engine: continue get_classnames loop after adding the default
classname
-------------------------+---------------------------------------
Reporter: ramonopoly | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Keywords: has-patch gutenberg-merge
Focuses: |
-------------------------+---------------------------------------
The `WP_Style_Engine` class has a method get_classnames that builds
classnames.
It loops over an array to add each classname.
There should be a `continue` in the loop after adding the default
classname.
Syncs changes from:
https://github.com/WordPress/gutenberg/pull/60153
**Why?**
Because we've added the first classname by virtue of testing for `true`.
The following tests all expect a string: `get_slug_from_preset_value` only
works on a string, not a boolean.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60847>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list