Make WordPress Core

Opened 2 months ago

Last modified 2 days ago

#60847 new enhancement

Style Engine: continue get_classnames loop after adding the default classname

Reported by: ramonopoly's profile ramonopoly Owned by:
Milestone: 6.6 Priority: normal
Severity: normal Version: trunk
Component: Editor Keywords: has-patch gutenberg-merge
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 (2)

This ticket was mentioned in PR #6323 on WordPress/wordpress-develop by @ramonopoly.


2 months ago
#1

Quick janitorial PR that continues the get_classnames loop after adding the default classname.

Syncs changes from:

## Why?

Because we've added the classname by virtue of testing for true, and besides the subsequent get_slug_from_preset_value only works on a string, not a boolean.

#2 @ramonopoly
2 days ago

  • Milestone changed from Awaiting Review to 6.6
  • Version changed from 6.5 to trunk
Note: See TracTickets for help on using tickets.