WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#15939 closed defect (bug) (fixed)

single_cat_title() functionality changed in 3.1

Reported by: Viper007Bond Owned by:
Milestone: 3.1 Priority: lowest
Severity: minor Version: 3.1
Component: Template Keywords: has-patch commit
Focuses: Cc:

Description

r15598 changed how single_cat_title() works -- it now always returns a value. If the function is used properly, this is not an issue. However many, many themes stuck an echo in front of the function. Yes, this is incorrect, but in the past this echo'ed null and so it was no problem. However now that the function returns no matter what, lots of themes are getting double output.

So even though if used properly nothing is wrong, I suggest we not return any value if the display parameter is set. This will better match previous functionality and lessen the impact of any improperly written themes.

Attachments (1)

15939.diff (346 bytes) - added by scribu 3 years ago.

Download all attachments as: .zip

Change History (3)

scribu3 years ago

comment:1 scribu3 years ago

  • Keywords has-patch commit added

comment:2 nacin3 years ago

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

(In [17107]) echo OR return, not both, in single_term_title(). props Viper007Bond, fixes #15939.

Note: See TracTickets for help on using tickets.