Make WordPress Core

Changeset 32083


Ignore:
Timestamp:
04/08/2015 05:52:18 PM (10 years ago)
Author:
ocean90
Message:

Customizer Theme Switcher: Don't deactivate section on empty search results.

props westonruter.
fixes #31889.

File:
1 edited

Legend:

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

    r32054 r32083  
    583583                }
    584584            });
     585        },
     586
     587        /**
     588         * Override Section.isContextuallyActive method.
     589         *
     590         * Ignore the active states' of the contained theme controls, and just
     591         * use the section's own active state instead. This ensures empty search
     592         * results for themes to cause the section to become inactive.
     593         *
     594         * @since 4.2.0
     595         *
     596         * @returns {Boolean}
     597         */
     598        isContextuallyActive: function () {
     599            return this.active();
    585600        },
    586601
Note: See TracChangeset for help on using the changeset viewer.