Make WordPress Core

Opened 6 years ago

Closed 6 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:


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 6 years ago.
dont_output_empty_title.diff (468 bytes) - added by ptahdunbar 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 @nacin
6 years ago

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

#2 @ryan
6 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.