Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#22118 closed defect (bug) (duplicate)

wp_customize_support_script() concatenates class names, breaking CSS

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

Description (last modified by SergeyBiryukov)

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.

Attachments (1)

wp_customize_support_script-body-css.patch (404 bytes) - added by beaulebens 12 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #22103.

#2 @SergeyBiryukov
12 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.