[wp-trac] [WordPress Trac] #36559: Using "widget" as part of setting title breaks the customizer since 4.5
WordPress Trac
noreply at wordpress.org
Sun Apr 17 17:53:40 UTC 2016
#36559: Using "widget" as part of setting title breaks the customizer since 4.5
----------------------------+------------------------------
Reporter: steven_gardner | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.5
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by westonruter):
@steven_gardner hi. It's not actually a duplicate, but just that it came
up in conversation recently.
A potential solution to help avoid this problem in the first place is to
change logic in `\WP_Customize_Widgets::get_setting_args()` to check if
the matched `id_base` pattern in the regular expression
`^widget_(?P<id_base>.+?)(?:\[(?P<widget_number>\d+)\])?$` actually
corresponds to the ID base of a registered widget.
The immediate fix is to just not use `widget_` as the prefix in your
Customizer settings/controls, and this is what I'm going to update the
Customizer API documentation to make note of, that the `widget_` prefix is
reserved for actual widgets.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36559#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list