[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 /* global wp, jQuery */ 2 3 ( function( $, api ) { 4 $( function() { 5 // Make it possible to reset the color based on a radio input's value. 6 // `active` can be either `custom` or `default`. 7 api.control( 'accent_hue_active' ).setting.bind( function( active ) { 8 var control = api.control( 'accent_hue' ); // Get the accent hue control. 9 10 if ( 'custom' === active ) { 11 // Activate the hue color picker control and focus it. 12 control.activate( { 13 completeCallback: function() { 14 control.focus(); 15 } 16 } ); 17 } else { 18 // If the `custom` option isn't selected, deactivate the hue color picker and set a default. 19 control.deactivate( { 20 completeCallback: function() { 21 control.setting.set( control.params.defaultValue ); 22 } 23 } ); 24 } 25 } ); 26 } ); 27 }( jQuery, wp.customize ) );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |