CoreFiles by mySites.guru
customize.js22 lines, 787 bytes, from wordpress-5.6-beta4.zip
Raw History Compare with 5.6-beta3
md5
d90edf47770e2e190c01813d646ce745
sha1
9a261f62d17297be3c75f06858937c2fc9047c2e
sha256
867ffd72f74f576cc5ed2fba2a8d4cd84e15489aa40a453c7bfbf18f0e3118f2
/* global twentytwentyoneGetHexLum */

( function() {
	// Wait until the customizer has finished loading.
	wp.customize.bind( 'ready', function() {
		// Hide the "respect_user_color_preference" setting if the background-color is dark.
		if ( 127 > twentytwentyoneGetHexLum( wp.customize( 'background_color' ).get() ) ) {
			wp.customize.control( 'respect_user_color_preference' ).deactivate();
		}

		// Handle changes to the background-color.
		wp.customize( 'background_color', function( setting ) {
			setting.bind( function( value ) {
				if ( 127 > twentytwentyoneGetHexLum( value ) ) {
					wp.customize.control( 'respect_user_color_preference' ).deactivate();
				} else {
					wp.customize.control( 'respect_user_color_preference' ).activate();
				}
			} );
		} );
	} );
}() );

No other release has this exact content. See every version of this file.