mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 11:44:33 +00:00
Ensure that a has_children parameter is given to Walker::start_el().
Adds unit tests. Props scribu, obenland. Fixes #14041. git-svn-id: https://develop.svn.wordpress.org/trunk@28824 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1784,7 +1784,7 @@ class Walker_Comment extends Walker {
|
||||
$add_below = 'div-comment';
|
||||
}
|
||||
?>
|
||||
<<?php echo $tag; ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?> id="comment-<?php comment_ID(); ?>">
|
||||
<<?php echo $tag; ?> <?php comment_class( $this->has_children ? 'parent' : '' ); ?> id="comment-<?php comment_ID(); ?>">
|
||||
<?php if ( 'div' != $args['style'] ) : ?>
|
||||
<div id="div-comment-<?php comment_ID(); ?>" class="comment-body">
|
||||
<?php endif; ?>
|
||||
@@ -1830,7 +1830,7 @@ class Walker_Comment extends Walker {
|
||||
protected function html5_comment( $comment, $depth, $args ) {
|
||||
$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
|
||||
?>
|
||||
<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
|
||||
<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '' ); ?>>
|
||||
<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
|
||||
<footer class="comment-meta">
|
||||
<div class="comment-author vcard">
|
||||
|
||||
Reference in New Issue
Block a user