[wp-hackers] Rewriting Comments for html5 validity

Matthew Simo matthew.a.simo at gmail.com
Mon Feb 1 17:57:25 UTC 2010


Hi all, I'm working on rewriting the comments for html5 but I'm having
issues filtering the start_lvl, end_lvl, & end_el. They are in
the Walker_Comment class, is that what's causing the filtering problem? How
can I get around this?


In the html5 spec we'll be using the <article> to wrap our comments, and
nest them if it is applicable. I can handle starting the individual comment
easy enough but getting rid of that trailing </li> is giving me trouble.

Basically this is what needs to be displayed when wp_list_comments is
called:

<article>
<!-- comment stuff -->

  <article class="child_comment">
  <!-- comment stuff -->
  </article>

</article>


Any ideas? I'm passing style=article & my callback function that handles the
new comment ( <?php
wp_list_comments('style=article&callback=html5_comment'); ?> ), I just can't
get the previously stated functions to filter.


Thanks a lot!
Matthew Simo


More information about the wp-hackers mailing list