WordPress.org

Make WordPress Core

Changeset 30552


Ignore:
Timestamp:
11/24/2014 10:25:30 PM (5 years ago)
Author:
ocean90
Message:

Customizer: Don't override Section.isContextuallyActive() in SidebarSection.

This fixes a bug where empty widget areas get deactivated in the Customizer.

fixes #30378.
see #30235.
props westonruter.

File:
1 edited

Legend:

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

    r30329 r30552  
    13881388            });
    13891389            registeredSidebar.set( 'is_rendered', section.active() );
    1390         },
    1391 
    1392         /**
    1393          * Override Section.isContextuallyActive() to skip considering
    1394          * SidebarControl  as opposed to a WidgetControl.
    1395          *
    1396          * @returns {boolean}
    1397          */
    1398         isContextuallyActive: function () {
    1399             var section, activeCount;
    1400             section = this;
    1401             activeCount = 0;
    1402             _( section.controls() ).each( function ( control ) {
    1403                 if ( control.active() && ! control.extended( api.Widgets.SidebarControl ) ) {
    1404                     activeCount += 1;
    1405                 }
    1406             });
    1407             return ( activeCount !== 0 );
    14081390        }
    14091391    });
Note: See TracChangeset for help on using the changeset viewer.