Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/twentytw.../assets/js
File: customize.js
/* global wp, jQuery */
[0] Fix | Delete
[1] Fix | Delete
( function( $, api ) {
[2] Fix | Delete
$( document ).ready( function() {
[3] Fix | Delete
// Make it possible to reset the color based on a radio input's value.
[4] Fix | Delete
// `active` can be either `custom` or `default`.
[5] Fix | Delete
api.control( 'accent_hue_active' ).setting.bind( function( active ) {
[6] Fix | Delete
var control = api.control( 'accent_hue' ); // Get the accent hue control.
[7] Fix | Delete
[8] Fix | Delete
if ( 'custom' === active ) {
[9] Fix | Delete
// Activate the hue color picker control and focus it.
[10] Fix | Delete
control.activate( {
[11] Fix | Delete
completeCallback: function() {
[12] Fix | Delete
control.focus();
[13] Fix | Delete
}
[14] Fix | Delete
} );
[15] Fix | Delete
} else {
[16] Fix | Delete
// If the `custom` option isn't selected, deactivate the hue color picker and set a default.
[17] Fix | Delete
control.deactivate( {
[18] Fix | Delete
completeCallback: function() {
[19] Fix | Delete
control.setting.set( control.params.defaultValue );
[20] Fix | Delete
}
[21] Fix | Delete
} );
[22] Fix | Delete
}
[23] Fix | Delete
} );
[24] Fix | Delete
} );
[25] Fix | Delete
}( jQuery, wp.customize ) );
[26] Fix | Delete
[27] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function