wp.customize.controlConstructor['kirki-radio-image'] = wp.customize.Control.extend({ // When we're finished loading continue processing ready: function() { 'use strict'; var control = this; // Init the control. if ( ! _.isUndefined( window.kirkiControlLoader ) && _.isFunction( kirkiControlLoader ) ) { kirkiControlLoader( control ); } else { control.initKirkiControl(); } }, initKirkiControl: function() { 'use strict'; var control = this; control.container.find( '.kirki-controls-loading-spinner' ).hide(); // Change the value this.container.on( 'click', 'input', function() { control.setting.set( jQuery( this ).val() ); }); } });