WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#13240 closed defect (bug) (fixed)

Menu Widget shouldn't output a blank title

Reported by: mattwiebe Owned by: azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

The Menu widget currently prints out a blank title. (i.e. a blank title will print out as <h2 class="widgettitle"></h2>) This causes undesirable styling situations and is inconsistent with how the Text widget omits blank titles.

My patch adds a check to make sure the title isn't empty before printing it.

Attachments (2)

title_check.diff (498 bytes) - added by mattwiebe 4 years ago.
dont_output_empty_title.diff (468 bytes) - added by ptahdunbar 4 years ago.

Download all attachments as: .zip

Change History (4)

mattwiebe4 years ago

comment:1 nacin4 years ago

It can be changed to just !empty. No need for isset.

comment:2 ryan4 years ago

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

(In [14644]) Don't output empty title. Props mattwiebe, ptahdunbar. fixes #13240

Note: See TracTickets for help on using tickets.