[wp-trac] [WordPress Trac] #10948: wp_list_comments() always assumes walker will echo.
WordPress Trac
noreply at wordpress.org
Thu Dec 19 12:43:10 UTC 2013
#10948: wp_list_comments() always assumes walker will echo.
-------------------------+---------------------
Reporter: MikeLittle | Owner: nacin
Type: enhancement | Status: closed
Priority: normal | Milestone: 3.8
Component: Comments | Version: 2.8.6
Severity: normal | Resolution: fixed
Keywords: has-patch |
-------------------------+---------------------
Comment (by needle):
@MikeLittle when the walker was first introduced, it didn't allow for
wrapping comments in ordered lists, just unordered ones. So, way back
when, I implemented a custom walker to generate output using `<ol>` tags
by overriding `start_lvl()` and `end_lvl()` and echoing ordered list
markup. I realise that the walker has supported `<ol>` for a long time
now, but as with many projects, because nothing broke when that was
introduced, it got overlooked and my custom walker remained in place.
But since `start_lvl()` and `end_lvl()` now (properly) use `$output`
instead of echoing, I only just noticed that I was getting spurious
ordered lists being written into the markup by my custom walker's methods.
But because this only happens when there are ''nested'' comments, it was
not immediately obvious.
Having said all of that, I suspect that my theme is probably one of the
few to do this (or have done this). I just wanted to highlight that any
custom walker that overrides `start_lvl()` and/or `end_lvl()` will be
affected.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10948#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list