diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 4f04de4c0f..f8a64dc2dd 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -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 */