mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Customize: Auto-expand a widget area section when expanding the Widgets panel if there is only one registered sidebar and it is active.
Introduces `WP_Customize_Panel::$auto_expand_sole_section` property which allows panels to opt-in to the behavior, which the Widgets panel is made to do by default. Props delawski, westonruter, melchoyce. Fixes #37471. git-svn-id: https://develop.svn.wordpress.org/trunk@40395 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -422,6 +422,7 @@ final class WP_Customize_Widgets {
|
||||
'description' => __( 'Widgets are independent sections of content that can be placed into widgetized areas provided by your theme (commonly called sidebars).' ),
|
||||
'priority' => 110,
|
||||
'active_callback' => array( $this, 'is_panel_active' ),
|
||||
'auto_expand_sole_section' => true,
|
||||
) );
|
||||
|
||||
foreach ( $sidebars_widgets as $sidebar_id => $sidebar_widget_ids ) {
|
||||
|
||||
Reference in New Issue
Block a user