WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 19 months ago

#22118 closed defect (bug)

wp_customize_support_script() concatenates class names, breaking CSS — at Initial Version

Reported by: beaulebens Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

When wp_customize_support_script() runs, it removes 'no-customize-support' from the list of classes applied to the body tag.

The regular expression used to match that class includes whitespace either side of the class name, and then replaces the entire thing with .

This results in concatenation of any previously-adjacent classes, which in turn can leave you with a body class looking something like this:

home blog logged-in admin-barcustom-background default-menu no-customize-support debug-bar-maximized customize-support

Note: admin-barcustom-background, which breaks any CSS applied to either of those classes.

Instead of replacing with , just replace with ' ', which will leave a space and thus leave both classes being valid.

Change History (1)

Note: See TracTickets for help on using tickets.