diff --git a/wp-content/themes/twentytwenty/assets/js/customize-controls.js b/wp-content/themes/twentytwenty/assets/js/customize-controls.js index 26136e21e2..4397cf29c7 100644 --- a/wp-content/themes/twentytwenty/assets/js/customize-controls.js +++ b/wp-content/themes/twentytwenty/assets/js/customize-controls.js @@ -35,6 +35,17 @@ } ); } ); } ); + + // Show or hide retina_logo setting on the first load. + twentyTwentySetRetineLogoVisibility( !! wp.customize( 'custom_logo' )() ); + + // Add a listener for custom_logo changes. + wp.customize( 'custom_logo', function( value ) { + value.bind( function( to ) { + // Show or hide retina_logo setting on changing custom_logo. + twentyTwentySetRetineLogoVisibility( !! to ); + } ); + } ); } ); /** @@ -87,4 +98,17 @@ // Small hack to save the option. wp.customize( 'accent_accessible_colors' )._dirty = true; } + + /** + * Shows or hides the "retina_logo" setting based on the given value. + * + * @since Twenty Twenty 1.3 + * + * @param {boolean} visible The visible value. + * + * @return {void} + */ + function twentyTwentySetRetineLogoVisibility( visible ) { + wp.customize.control( 'retina_logo' ).container.toggle( visible ); + } }( jQuery ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index f11ed8303e..5d78f8183d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47775'; +$wp_version = '5.5-alpha-47776'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.