[wp-trac] [WordPress Trac] #29572: Customizer: add a framework for rendering controls from JS templates

WordPress Trac noreply at wordpress.org
Sat Oct 4 12:58:11 UTC 2014


#29572: Customizer: add a framework for rendering controls from JS templates
------------------------------------+-------------------------
 Reporter:  celloexpressions        |       Owner:
     Type:  feature request         |      Status:  new
 Priority:  high                    |   Milestone:  4.1
Component:  Customize               |     Version:  3.4
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  javascript
------------------------------------+-------------------------

Comment (by johnbillion):

 Replying to [comment:6 celloexpressions]:
 > - How do we feel about the concept of "registered control types"?
 I like this, and it makes sense from the point of view of outputting one
 template per control.
 > - Can/should we always export all class variable to json, or should it
 remain a whitelist, with the requirement of adding custom class variables
 in subclasses (that's what [attachment:#29572.diff] does)?
 We should stick to a whitelist. If a particular control needs access to
 other member variables, it can override the `to_json()` method.
 > - Should we check if the string passed is a WP_Customize_Control before
 registering it, or okay to assume that it's fine?
 In PHP 5.2, I don't think it's possible to check that a string is of a
 particular class (using `is_a()` or `instanceof`). You can only check the
 instantiated object. Someone correct me if I'm wrong.

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


More information about the wp-trac mailing list