CoreFiles by mySites.guru
customize-controls.js30 lines, 710 bytes, from wordpress-5.3.21.zip
Raw History Compare with 5.3.20
md5
b0325ad61950b4733e050ff6c449f472
sha1
0cbbb77b20260723004ebd74df1029aedcab3eef
sha256
80b070bc1b8893a84bc87d6dc3629c57c33a97b15d9a5e16599c933e2e919417
/**
 * File customize-controls.js.
 *
 * Theme Customizer enhancements for a better user experience.
 *
 * Contains handlers to make Theme Customizer preview reload changes asynchronously.
 */

(function() {

	wp.customize.bind( 'ready', function() {

		// Only show the color hue control when there's a custom primary color.
		wp.customize( 'primary_color', function( setting ) {
			wp.customize.control( 'primary_color_hue', function( control ) {
				var visibility = function() {
					if ( 'custom' === setting.get() ) {
						control.container.slideDown( 180 );
					} else {
						control.container.slideUp( 180 );
					}
				};

				visibility();
				setting.bind( visibility );
			});
		});
	});

})();

The same content is in 217 releases, WordPress 5.3-beta1 to 5.9-RC3. See them all, or every version of this file.