| Total Complexity | 3 |
| Complexity/F | 1.5 |
| Lines of Code | 14 |
| Function Count | 2 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | wp.customize.controlConstructor['kirki-toggle'] = wp.customize.kirkiDynamicControl.extend({ |
||
| 2 | |||
| 3 | initKirkiControl: function() { |
||
| 4 | |||
| 5 | var control = this, |
||
| 6 | checkboxValue = control.setting._value; |
||
| 7 | |||
| 8 | // Save the value |
||
| 9 | this.container.on( 'change', 'input', function() { |
||
| 10 | checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false; |
||
| 11 | control.setting.set( checkboxValue ); |
||
| 12 | }); |
||
| 13 | } |
||
| 14 | }); |
||
| 15 |