[wp-trac] [WordPress Trac] #29988: Twenty Fifteen: Use JS/postMessage to update the color scheme instead of triggering a page refresh

WordPress Trac noreply at wordpress.org
Thu Nov 6 08:16:45 UTC 2014


#29988: Twenty Fifteen: Use JS/postMessage to update the color scheme instead of
triggering a page refresh
------------------------------------+-----------------------------
 Reporter:  avryl                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Bundled Theme           |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  javascript
------------------------------------+-----------------------------

Comment (by westonruter):

 The difference in the new templates for Customizer controls is that it is
 building Underscore.js templates to be evaluated by JS dynamically. What
 we need for Twenty Fifteen is to evaluate the Underscore(ish) templates in
 both PHP (server-side) for normal site visitors, and then in JS (client-
 side) when previewing changes in the Customizer.

 Has Mustache.php ever been considered for inclusion in Core? I don't see
 hardly any reference to it in Trac. See also [22415]. There could be a
 common subset of Mustache/Underscore templates where only interpolation is
 used, and execution blocks are not allowed. Or the logic-less Mustache
 syntax for control structures (conditionals and loops) could be translated
 into the syntax used by `wp.template` (Underscore.js). If we're already
 using Underscore.js for templating, it seems like a bad idea to include
 Mustache.js in Core as well. But on the PHP side, there is no templating
 language other than PHP itself, if it can be called that. And it is
 definitely not logic-less or in any way can it be a common subset with JS
 templates.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29988#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list