fix: restore widgets theme support for WP Customizer#92
Open
WybeBosch wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Restores WordPress Customizer functionality in the Sage theme (Brave stack) by explicitly enabling widget theme support, preventing PHP warnings (and Acorn warning-to-exception crashes) when the Customizer Widgets panel renders.
Changes:
- Explicitly adds
add_theme_support('widgets')duringafter_setup_theme. - Documents why widget support is required and why it previously disappeared (sidebar removal stopped implicitly enabling it).
e3b797b to
ef6086b
Compare
ef6086b to
a656505
Compare
rivanuff
approved these changes
Apr 9, 2026
YvetteNikolov
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Probleem : Wp Customizer werkte niet meer
voor.
warning. Daarom kon je tijdelijk het fixen door je WP_ENV te veranderen. (Al gingen dan wel opeens al
je assets fout.)
Waarom werkte het vroeger wel?
Vroeger toen we nog footer deden via het "widgets menu" (
038ec906 refactor: setup hooks) stond er eenregisterThemeSidebars()methode dieregister_sidebar()aanriep voor de footer:register_sidebar()roept intern automatischadd_theme_support('widgets')aan.Toen we dit weghaalde omdat we nu de footer doen vannuit de patronen (
cfaa852b "remove sidebar widget")verdween dus ook impliciet de widgets support die gebruikt werd door de customizer.
De fix
In
Setup.phpexplicietadd_theme_support('widgets')toevoegen. Dit zorgt ervoor dat de Customizer weer werkt zonder warnings, errors ofWP_ENVshenanigans.Het Widgets menu item onder Appearance is opnieuw verborgen via
remove_submenu_page()inremoveWidgetsMenuItem()