CoreFiles by mySites.guru
customize-controls.js30 lines, 710 bytes, from wordpress-5.2.21.zip
Raw History Compare with 5.2.20
md5
db81460d2cfaa295442bca7a7b9ad9b0
sha1
3c5f39b7906983793c7a87d843fdab956b3c4916
sha256
0d584719f7de5bc1913cb899decce74aec2f4371f4d52709152c4a783fdbd6e4
/**
 * File customizer.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 );
			});
		});
	});

})( jQuery );

The same content is in 116 releases, WordPress 5.0-RC1 to 5.2.31. See them all, or every version of this file.