[wp-trac] [WordPress Trac] #58183: PHP notice when accessing Customizer with a classic theme without widgets
WordPress Trac
noreply at wordpress.org
Tue Apr 25 12:44:11 UTC 2023
#58183: PHP notice when accessing Customizer with a classic theme without widgets
--------------------------+------------------------------
Reporter: kraftner | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by kraftner):
I think the initial plan in #54888 was to ''remove'' the Widget and Menu
panels when the theme doesn't support them.
Due to #54905 this was then changed in [54419] to not remove it, but only
hide it.
The approach for the Widget panel in [52622] also was removing, not
hiding. Ironically this changeset mentions consistency with the menu
panel, which after [54419] actually isn't true any more. So for the
widgets panel it was still removed instead of just hidden like the menu
panel.
This then results in a similar issue as #54905, namely this ticket.
So, since just like with the menu panel removing instead of just
deactivating has proven problematic, the same applies to the widget panel.
So I think what actually needs to be done here, also in the name of
consistency with the menu panel is to revert [52622].
As I understand it, the widget panel still wouldn't be shown for a theme
without widgets areas since the [https://github.com/WordPress/wordpress-
develop/blob/26e3948fca904db17a588d3736b3db59f8007daa/src/wp-includes
/class-wp-customize-widgets.php#L422 active_callback] still
[https://github.com/WordPress/wordpress-
develop/blob/26e3948fca904db17a588d3736b3db59f8007daa/src/wp-includes
/class-wp-customize-widgets.php#L549-L562 deactivates the panel without
registered widget areas].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58183#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list