mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Bundled Themes: Twenty Twenty customizer retina_logo should be hidden when no logo is set.
Modifies the Customize setting `Site Identity > Retina logo` so that the option is hidden if there is no logo is set in `Site Identity > Logo`. Props truongwp. Fixes #50109. Built from https://develop.svn.wordpress.org/trunk@47776 git-svn-id: http://core.svn.wordpress.org/trunk@47552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1cde7d86f9
commit
928ce10da0
@ -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.
|
// Small hack to save the option.
|
||||||
wp.customize( 'accent_accessible_colors' )._dirty = true;
|
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 ) );
|
}( jQuery ) );
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user