CoreFiles by mySites.guru
customize-controls.js30 lines, 713 bytes, from wordpress-5.0-beta4.zip
Raw History Compare with 5.0-beta3
md5
c54de21578b83a674c42bc71d8451920
sha1
f78d3786d71d7cc5359060220b8cc40f3ac9ade4
sha256
890bf51aef313fc89d7a194d6883ad4d3c7d9a8bea36f0d052e2b7fc359869f5
/**
 * 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 color scheme.
		wp.customize( 'colorscheme', function( setting ) {
			wp.customize.control( 'colorscheme_primary_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 3 releases, WordPress 5.0-beta3 to 5.0-beta5. See them all, or every version of this file.