Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#35540 closed defect (bug) (fixed)

Remove help button if there is no description content in panel

Reported by: rabmalin's profile rabmalin Owned by: westonruter's profile westonruter
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.4
Component: Customize Keywords: good-first-bug has-patch
Focuses: ui, javascript Cc:

Description

If there is no description parameter in add_panel call, in Customizer there is help button. Clicking on that does nothing. May be that button should be hidden if there is nothing to show about the panel.

Steps to reproduce:

  • Add panel like
    $wp_customize->add_panel( 'sample_panel',
            array(
            'title'      => __( 'Sample Panel', 'text-domain' ),
            'priority'   => 100,
        )
    );
    
  • Add section and settings under the panel.
  • Go to Customize.
  • When we are under the Sample Panel, help button is displayed it does not show anything.

Attachments (1)

35540.diff (987 bytes) - added by drebbits.web 7 years ago.
Update on the customize panel template

Download all attachments as: .zip

Change History (5)

#1 @rabmalin
7 years ago

  • Component changed from General to Customize
  • Keywords needs-patch added

#2 @westonruter
7 years ago

  • Focuses javascript added
  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to 4.5

@drebbits.web
7 years ago

Update on the customize panel template

#3 @drebbits.web
7 years ago

  • Keywords has-patch added; needs-patch removed

#4 @westonruter
7 years ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 36374:

Customizer: Hide help toggle button in panel when no description is supplied.

This aligns with the .customize-panel-description element which is also excluded if there is no description.

Props drebbits.web.
Fixes #35540.

Note: See TracTickets for help on using tickets.