Changeset 47776
- Timestamp:
- 05/08/2020 07:34:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js
r46827 r47776 34 34 twentyTwentySetAccessibleColorsValue( context, to, wp.customize( 'accent_hue' ).get(), to ); 35 35 } ); 36 } ); 37 } ); 38 39 // Show or hide retina_logo setting on the first load. 40 twentyTwentySetRetineLogoVisibility( !! wp.customize( 'custom_logo' )() ); 41 42 // Add a listener for custom_logo changes. 43 wp.customize( 'custom_logo', function( value ) { 44 value.bind( function( to ) { 45 // Show or hide retina_logo setting on changing custom_logo. 46 twentyTwentySetRetineLogoVisibility( !! to ); 36 47 } ); 37 48 } ); … … 88 99 wp.customize( 'accent_accessible_colors' )._dirty = true; 89 100 } 101 102 /** 103 * Shows or hides the "retina_logo" setting based on the given value. 104 * 105 * @since Twenty Twenty 1.3 106 * 107 * @param {boolean} visible The visible value. 108 * 109 * @return {void} 110 */ 111 function twentyTwentySetRetineLogoVisibility( visible ) { 112 wp.customize.control( 'retina_logo' ).container.toggle( visible ); 113 } 90 114 }( jQuery ) );
Note: See TracChangeset
for help on using the changeset viewer.