[wp-trac] [WordPress Trac] #28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels
WordPress Trac
noreply at wordpress.org
Sat Oct 4 12:44:18 UTC 2014
#28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels
-------------------------+-------------------------
Reporter: westonruter | Owner:
Type: enhancement | Status: new
Priority: high | Milestone: 4.1
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
-------------------------+-------------------------
Comment (by westonruter):
There's some good synergy between this ticket and #29572. Ideally the DOM
elements for the panels, sections, and controls would be created via JS
when the page loads instead of having them rendered via PHP, since this
would eliminate there from being two ways to add such structures to the
page. In other words, a control shouldn't be constructing a `selector` and
then using it to find its `container` DOM element. Instead, the control
should be supplied the HTML (template) to be used for the container and
then insert this control into the associated section.
In terms of the API, I suggest that we have`wp.customize.panel` and
`wp.customize.section` to go along with the existing
`wp.customize.control`, all of which would be `Values` instances. There
would then be a `wp.customize.Panel` and `wp.customize.Section` to also
accompany the `wp.customize.Control`, although there wouldn't need to be a
panel/section construct to be analogous to `controlConstructor`, since
there aren't explicit `type`s of panels and sections, although they can be
subclassed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28709#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list