jQuery( document ).ready( function() { 'use strict'; wp.customize.section.each( function( section ) { var link = '' + hooResetButtonLabel['reset-with-icon'] + ''; jQuery( link ).appendTo( '#sub-accordion-section-' + section.id + ' .customize-section-title > h3' ); }); jQuery( 'a.hoo-reset-section' ).on( 'click', function() { var id = jQuery( this ).data( 'reset-section-id' ), controls = wp.customize.section( id ).controls(); // Loop controls _.each( controls, function( control, i ) { // Set value to default hooSetSettingValue.set( controls[ i ].id, control.params['default'] ); }); }); });