[wp-hackers] Uneasy over the Walkers

Simon Wheatley simon at sweetinteraction.com
Thu Mar 26 15:22:23 GMT 2009

Maybe I'm approaching things wrongly, but the Walker classes make me
feel uneasy? As I type I'm extending Walker_Comment because I need
some different markup for my comments and (AFAICT) that means I have
to extend the Walker_Comment, override the start_el method and then
pass my new Walker to wp_list_comments. Which seems a pretty
significant act for what I would expect to be a simple template tweak.

The root of my disquiet is the amount of markup tangled up in the
Walker methods... it seems backwards, and is moving away from
logic/display code separation; not to mention making it non-trivial to
re-template the comments section. I understand that this is
complicated recursive code, but surely there's a better way?

No answers, sorry, just questions...

Thanks for listening.


Sweet Interaction Ltd is Registered in England/Wales, no. 6610741
Registered office: 7 Malton Av, Manchester, M21 8AT

More information about the wp-hackers mailing list