[wp-trac] [WordPress Trac] #27355: Customizer: Add framework for partial preview refreshes
WordPress Trac
noreply at wordpress.org
Tue Nov 4 01:02:02 UTC 2014
#27355: Customizer: Add framework for partial preview refreshes
-------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.1
Component: Customize | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
-------------------------+--------------------------
Changes (by celloexpressions):
* focuses: ui, javascript => javascript
Comment:
A thought:
- If a setting has a `selector` and `transport: postMessage`, do `$(
selector ).html( to );` for the setting in core, eliminating the need to
implement it in JS. If no selector is specified, require implementing it
manually as you must currently do. In other words, by specifying a
selector you say that the value of that setting is the content of that
selector, so no other handling is needed.
- That wouldn't let you specify a selector for ones that you have to
actually use it yourself in JS, but on the other hand such JS is typically
very dom-oriented and front-end, so specifying a selector in PHP then
getting it from the API in JS would be fairly roundabout anyway.
- That's not directly related to partial refreshes, but makes it even
easier to implement partial refreshes where the entire contents of the
selector is the value of the setting.
Also,
- Unfortunately, we're not going to be able to make any changes to Twenty
Fourteen here, since it needs to be 100% back-compat to 3.8. But we can do
whatever we'd like for Twenty Fifteen.
- `WP_Customize_Manager::update_settings()` could be really useful. It
should probably wrap a singular version, which would be a bit nicer than
modifying properties directly, as the current `get_` methods require. Of
course, we would need to introduce this for all of the Customizer objects
- panels, sections, settings, and controls. Probably needs a new ticket,
maybe not 4.1 material.
- Other than that, the current patch looks like a good start.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27355#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list