[wp-trac] [WordPress Trac] #37471: Customizer: Widgets: If your theme only has one widget area, we should open it automatically

WordPress Trac noreply at wordpress.org
Mon Mar 13 00:42:16 UTC 2017


#37471: Customizer: Widgets: If your theme only has one widget area, we should open
it automatically
-----------------------------------------+---------------------------------
 Reporter:  melchoyce                    |       Owner:
     Type:  enhancement                  |      Status:  assigned
 Priority:  normal                       |   Milestone:  4.7.4
Component:  Customize                    |     Version:  4.0
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:  ui, administration
-----------------------------------------+---------------------------------

Comment (by celloexpressions):

 Replying to [comment:12 westonruter]:
 > One more thing: I think the behavior of auto-expanding a panel's only
 section should probably be opt-in. We know that we want it for widgets,
 but for themes and plugins that have their own custom panels, they may
 very well want to be able to show a panel with just one section as the
 custom panel UI may have additional controls at the panel level.
 >
 > So there could be a new `WP_Customize_Panel::$auto_expand_sole_section =
 false` param added, which for widgets we'd set it to be `true`.

 Given the purpose of panels beyond the way the UI currently works, single-
 section panels should probably always expand the section by default.
 Custom panel types can alter that behavior, but in cases where they're
 using core UI and adding things to a panel "level"'s view, that should be
 done via the API, with additional custom sections and controls. Menus are
 a good custom panel example here, and the additional panel-level UI is to
 add new menus. This is actually done with a custom section, so there's no
 need to prevent that from opening a single default-like section because
 there's another section in the panel used to add the additional UI.
 Another good example is #37661, where it actually auto-expands the first
 section by default because both the panel-level and section-level UI are
 displayed at the same time.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37471#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list