Make WordPress Core


Ignore:
Timestamp:
04/07/2017 07:26:31 PM (10 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r40330 r40395  
    423423                        'priority'        => 110,
    424424                        'active_callback' => array( $this, 'is_panel_active' ),
     425                        'auto_expand_sole_section' => true,
    425426                ) );
    426427
Note: See TracChangeset for help on using the changeset viewer.