Bundled Themes: Update Twenty Twenty.
This brings `trunk`'s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46357], see https://github.com/WordPress/twentytwenty/compare/7157870...7246fd6.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, netweb, joyusly, luminuu, itowhid06, cbravobernal, intimez, glauberglauber, ocean90, amolv, briceduclos, aristath, mukesh27, garrett-eclipse, audrasjb, afercia, dianeco, utsav72640, mahesh901122, tobifjellner.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46445
git-svn-id: http://core.svn.wordpress.org/trunk@46243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-08 15:08:07 -04:00
|
|
|
/* global wp, jQuery */
|
|
|
|
|
|
|
|
( function( $, api ) {
|
External Libraries: Further fix jQuery deprecations in WordPress core.
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].
Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.
Built from https://develop.svn.wordpress.org/trunk@52285
git-svn-id: http://core.svn.wordpress.org/trunk@51877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 12:18:01 -05:00
|
|
|
$( function() {
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`'s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46357], see https://github.com/WordPress/twentytwenty/compare/7157870...7246fd6.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, netweb, joyusly, luminuu, itowhid06, cbravobernal, intimez, glauberglauber, ocean90, amolv, briceduclos, aristath, mukesh27, garrett-eclipse, audrasjb, afercia, dianeco, utsav72640, mahesh901122, tobifjellner.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46445
git-svn-id: http://core.svn.wordpress.org/trunk@46243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-08 15:08:07 -04:00
|
|
|
// Make it possible to reset the color based on a radio input's value.
|
|
|
|
// `active` can be either `custom` or `default`.
|
|
|
|
api.control( 'accent_hue_active' ).setting.bind( function( active ) {
|
|
|
|
var control = api.control( 'accent_hue' ); // Get the accent hue control.
|
|
|
|
|
|
|
|
if ( 'custom' === active ) {
|
|
|
|
// Activate the hue color picker control and focus it.
|
|
|
|
control.activate( {
|
|
|
|
completeCallback: function() {
|
|
|
|
control.focus();
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} else {
|
|
|
|
// If the `custom` option isn't selected, deactivate the hue color picker and set a default.
|
|
|
|
control.deactivate( {
|
|
|
|
completeCallback: function() {
|
|
|
|
control.setting.set( control.params.defaultValue );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
}( jQuery, wp.customize ) );
|