[wp-trac] [WordPress Trac] #46377: Can't remove Customizer sections whose ID contains a hyphen.
WordPress Trac
noreply at wordpress.org
Thu Feb 28 18:04:19 UTC 2019
#46377: Can't remove Customizer sections whose ID contains a hyphen.
----------------------------+-----------------------------
Reporter: jeremybubbleup | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 5.1
Severity: major | Keywords:
Focuses: |
----------------------------+-----------------------------
On the $wp_customize object, passed via the 'customize_register' action,
the get_section, get_panel, add_section, and add_panel functions allow
strings that contain either hyphens, "-", or underscores, "_". However,
when using the remove_section function, sections whose ID contains hyphens
are not properly removed, and instead the entire Customizer is empty (no
sections) and thus broken. No PHP errors or warnings are thrown in my
case, and I can reliably reproduce the error and contrast it with sections
added and removed in the exact same way but with IDs containing
underscores instead of hyphens. Calling remove_section on a non-existent
section, even one that contains hyphens, like 'bogus-fogus', does not
reproduce the break; It only seems to happen when trying to remove
sections which actually exist.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46377>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list