[wp-hackers] Rewriting Comments for html5 validity
scribu
scribu at gmail.com
Mon Feb 1 18:27:43 UTC 2010
Instead of a callback, you'll have to create your own walker class and pass
it as an argument:
class My_Comment_Walker extends WP_Comment_Walker {
function start_lvl() {
}
}
I hope you get the ideea.
On Mon, Feb 1, 2010 at 7:57 PM, Matthew Simo <matthew.a.simo at gmail.com>wrote:
> 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
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
http://scribu.net
More information about the wp-hackers
mailing list