WordPress doesn’t. This controlled by your theme.
Thread Starter
Henry
(@henrywright-1)
I’m 95% sure WordPress does! The callback is controlled by my theme yes, but there is no </li>
in that yet one is being outputted!
Can you replicate the problem using the default Twenty Thirteen theme with all plugins deactivated?
Thread Starter
Henry
(@henrywright-1)
I’m not entirely sure it’s a problem. I think it is intentional on the part of WordPress.
I can show you an example. Take a look at the custom callback function mytheme_comment
on this page:
http://codex.wordpress.org/Function_Reference/wp_list_comments
You’ll see a tag is opened by line: <<?php echo $tag ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id="comment-<?php comment_ID() ?>">
. However the tag isn’t closed which indicates it is closed automatically by WordPress.
You’ll be able to replicate on a fresh install, default theme, no plugins activated.
Now do you see what I mean? My question is why does WordPress do it this way?
Thread Starter
Henry
(@henrywright-1)
(@henrywright-1)
10 years, 6 months ago
Why does WordPress automatically add either a
</li>
</div>
tag at the end of each comment?