| Server IP : 51.91.236.255 / Your IP : 216.73.217.120 Web Server : Apache System : Linux webm002.cluster129.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : laureet ( 1012854) PHP Version : 8.0.30 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/laureet/www/wp-content/plugins/kirki/kirki-packages/control-multicheck/src/ |
Upload File : |
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 );
} );
}
} );