#60847 closed enhancement (fixed)
Style Engine: continue get_classnames loop after adding the default classname
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.6 | Priority: | normal |
| Severity: | normal | Version: | 6.6 |
| Component: | Editor | Keywords: | has-patch gutenberg-merge commit |
| Focuses: | Cc: |
Description
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.
Change History (9)
This ticket was mentioned in PR #6323 on WordPress/wordpress-develop by @ramonopoly.
20 months ago
#1
This ticket was mentioned in Slack in #core by oglekler. View the logs.
18 months ago
#4
@
18 months ago
Hi @ramonopoly, we have just a few days before Beta 1, but the patch is very small, so, it still can go into 6.6. Do we even need testing? Thank you!
#5
@
18 months ago
Hi @ramonopoly, we have just a few days before Beta 1, but the patch is very small, so, it still can go into 6.6. Do we even need testing? Thank you!
Thanks for the ping @oglekler
I think this patch is safe - it's been in Gutenberg for a number of versions (probably at least 4-6 months), and tested pretty thoroughly.
It's a small optimization so it would be good, however it if it doesn't make it into 6.6 it's not a huge deal.
Would be nice though :)
Cheers!
#6
@
18 months ago
- Keywords commit added
- Owner set to audrasjb
- Status changed from new to accepted
Self assigning for review and commit consideration.
@audrasjb commented on PR #6323:
18 months ago
#8
committed in https://core.trac.wordpress.org/changeset/58311
Quick janitorial PR that continues the
get_classnamesloop after adding the default classname.Syncs changes from:
## Why?
Because we've added the classname by virtue of testing for
true, and besides the subsequentget_slug_from_preset_valueonly works on a string, not a boolean.