#22118 closed defect (bug) (duplicate)
wp_customize_support_script() concatenates class names, breaking CSS
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
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)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Duplicate of #22103.