Fix coding standards

This commit is contained in:
IanDelMar 2022-08-12 02:27:33 +02:00
parent 249e0e4b19
commit e873b4159f
1 changed files with 20 additions and 17 deletions

View File

@ -5,22 +5,25 @@
* when users open or close the front page sections section.
*/
(function() {
wp.customize.bind( 'ready', function() {
( function () {
wp.customize.bind( 'ready', function () {
// Only show the navbar type setting when running Bootstrap 5.
wp.customize( 'understrap_bootstrap_version', function( setting ) {
wp.customize.control( 'understrap_navbar_type', function( control ) {
var visibility = function() {
if ( 'bootstrap5' === setting.get() ) {
control.container.slideDown( 180 );
} else {
control.container.slideUp( 180 );
}
};
wp.customize( 'understrap_bootstrap_version', function ( setting ) {
wp.customize.control(
'understrap_navbar_type',
function ( control ) {
const visibility = function () {
if ( 'bootstrap5' === setting.get() ) {
control.container.slideDown( 180 );
} else {
control.container.slideUp( 180 );
}
};
visibility();
setting.bind( visibility );
});
});
});
})();
visibility();
setting.bind( visibility );
}
);
} );
} );
} )();