WordPress.org

Make WordPress Core

Changeset 43588


Ignore:
Timestamp:
08/28/2018 07:54:29 PM (12 months ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/widgets.js

    r43347 r43588  
    16351635                getActiveSectionCount = function() {
    16361636                    return _.filter( panel.sections(), function( section ) {
    1637                         return section.active();
     1637                        return 'sidebar' === section.params.type && section.active();
    16381638                    } ).length;
    16391639                };
Note: See TracChangeset for help on using the changeset viewer.