[wp-trac] [WordPress Trac] #28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels

WordPress Trac noreply at wordpress.org
Wed Oct 22 05:56:13 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:  has-patch dev-feedback  |     Focuses:  javascript
------------------------------------+-------------------------

Comment (by ryankienstra):

 Weston's {{{onToggleActive()}}} and {{{onToggleExpanded()}}} function
 names are more accurate than only {{{toggleActive()}}} and
 {{{toggleExpanded()}}}, in my opinion. The "on" is appropriate because he
 binds it to the wp.customize.Control (self) object in line 69 of
 customize-control.js:

 {{{
 self.active.bind( function ( active ) {
   self.toggleActive( active && self.isContextuallyActive() );
 }}}


 Also, the code looks cleaner with the same method names used for sections,
 panels, and controls.

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


More information about the wp-trac mailing list