[wp-trac] [WordPress Trac] #30738: JS content templates for base WP_Customize_Control
WordPress Trac
noreply at wordpress.org
Thu Aug 18 23:20:12 UTC 2016
#30738: JS content templates for base WP_Customize_Control
------------------------------------------+-----------------------------
Reporter: celloexpressions | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Customize | Version: 4.1
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch | Focuses: javascript
------------------------------------------+-----------------------------
Comment (by westonruter):
There is a partial implementation of this in the [https://github.com/xwp
/wp-customize-posts Customize Posts] plugin (see also #37275):
https://github.com/xwp/wp-customize-posts/blob/develop/php/class-wp-
customize-dynamic-control.php
https://github.com/xwp/wp-customize-posts/blob/develop/js/customize-
dynamic-control.js
Something implemented here, which I think has been discussed previously,
is that the `label` element doesn't wrap the title and description anymore
(for non-checkboxes at least), by introducing a random `id` for the input
to be used with the `label[for]` attribute. This is turning out to be
important now with the introduction of the new notifications in 4.6 which
have a container that gets injected right after the site title. This means
that if there is a button inside of a notification, it won't work as
expected because it is wrapped in a `label`. Also related here is that
notifications should support a template allowing them to allow arbitrary
markup as opposed to an escaped message. This was noted by
@celloexpressions in https://wordpress.slack.com/archives/core-
customize/p1469851496000101
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30738#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list