We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c01a203 commit 8f2c964Copy full SHA for 8f2c964
src/assets/js/customizer/widget/section-update.js
@@ -11,7 +11,12 @@ export default function() {
11
sections = _.filter( window._wpCustomizeSettings.sections, ( section, id ) => id.includes( 'sidebar-widgets' ) );
12
13
sections.map( section => api.section( section.id ).active.set( activeSections.includes( section.id ) ) );
14
+
15
+ // Check for primary sidebar activation/deactivation.
16
+ let body = $( wp.customize.previewer.container ).find( 'iframe' ).last().contents().find( 'body' )[0];
17
+ api.section( 'sidebar-widgets-primary-sidebar' ).active.set( body.classList.contains( 'has-sidebar' ) );
18
};
19
20
api.previewer.bind( 'ready', () => update() );
21
api.previewer.bind( 'bgtfw-widget-section-update', () => update() );
22
} );
0 commit comments