Submit
Path:
~
/
home
/
getwphos
/
www
/
BenjaminMarc2023
/
wp-content
/
plugins
/
kirki
/
kirki-packages
/
control-multicheck
/
src
/
File Content:
control.js
import "./control.scss"; wp.customize.controlConstructor['kirki-multicheck'] = wp.customize.kirkiDynamicControl.extend( { initKirkiControl: function( control ) { control = control || this; // Save the value control.container.on( 'change', 'input', function() { var value = [], i = 0; // Build the value as an object using the sub-values from individual checkboxes. jQuery.each( control.params.choices, function( key ) { if ( control.container.find( 'input[value="' + key + '"]' ).is( ':checked' ) ) { control.container.find( 'input[value="' + key + '"]' ).parent().addClass( 'checked' ); value[ i ] = key; i++; } else { control.container.find( 'input[value="' + key + '"]' ).parent().removeClass( 'checked' ); } } ); // Update the value in the customizer. control.setting.set( value ); } ); } } );
Submit
FILE
FOLDER
Name
Size
Permission
Action
Control
---
0755
Field
---
0755
control.js
867 bytes
0644
control.scss
0 bytes
0644
N4ST4R_ID | Naxtarrr