From f98b26630338abba1cc3ce88c859edbddffbd326 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 28 Aug 2018 19:54:29 +0000 Subject: [PATCH] Customize: Ensure that only sidebar sections are considered when comparing against sidebars. In the Customizer a notice will show up if there is at least one registered sidebar with its section not being active. In order to achieve that, the count of registered sidebars is compared to the count of active sections in the Widgets panel. Prior to this change, the latter would incorrectly include any sections, even additional sections that do not correspond to a sidebar. Fixes #43556. git-svn-id: https://develop.svn.wordpress.org/trunk@43588 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/customize/widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/wp/customize/widgets.js b/src/js/_enqueues/wp/customize/widgets.js index 9e4b957a25..20659b1cac 100644 --- a/src/js/_enqueues/wp/customize/widgets.js +++ b/src/js/_enqueues/wp/customize/widgets.js @@ -1634,7 +1634,7 @@ */ getActiveSectionCount = function() { return _.filter( panel.sections(), function( section ) { - return section.active(); + return 'sidebar' === section.params.type && section.active(); } ).length; };