[wp-trac] [WordPress Trac] #15939: single_cat_title() functionality changed in 3.1

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 21 21:21:14 UTC 2010


#15939: single_cat_title() functionality changed in 3.1
--------------------------+-----------------
 Reporter:  Viper007Bond  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  lowest        |  Milestone:  3.1
Component:  Template      |    Version:  3.1
 Severity:  minor         |   Keywords:
--------------------------+-----------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15939>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list