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

props westonruter.
fixes #31889.

git-svn-id: https://develop.svn.wordpress.org/trunk@32083 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-04-08 17:52:18 +00:00
parent 583a13344c
commit b74982a479
1 changed files with 15 additions and 0 deletions

View File

@ -584,6 +584,21 @@
});
},
/**
* Override Section.isContextuallyActive method.
*
* Ignore the active states' of the contained theme controls, and just
* use the section's own active state instead. This ensures empty search
* results for themes to cause the section to become inactive.
*
* @since 4.2.0
*
* @returns {Boolean}
*/
isContextuallyActive: function () {
return this.active();
},
/**
* @since 4.2.0
*/