Comments: Don't print an empty HTML markup when `comment_reply_link()` returns no link.
props obenland. fixes #29895. Built from https://develop.svn.wordpress.org/trunk@29908 git-svn-id: http://core.svn.wordpress.org/trunk@29662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b89c915ed6
commit
bf16aac8e1
|
@ -1839,9 +1839,16 @@ class Walker_Comment extends Walker {
|
|||
|
||||
<?php comment_text( get_comment_id(), array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
|
||||
<div class="reply">
|
||||
<?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
</div>
|
||||
<?php
|
||||
comment_reply_link( array_merge( $args, array(
|
||||
'add_below' => $add_below,
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
'before' => '<div class="reply">',
|
||||
'after' => '</div>'
|
||||
) ) );
|
||||
?>
|
||||
|
||||
<?php if ( 'div' != $args['style'] ) : ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -1889,9 +1896,15 @@ class Walker_Comment extends Walker {
|
|||
<?php comment_text(); ?>
|
||||
</div><!-- .comment-content -->
|
||||
|
||||
<div class="reply">
|
||||
<?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
||||
</div><!-- .reply -->
|
||||
<?php
|
||||
comment_reply_link( array_merge( $args, array(
|
||||
'add_below' => 'div-comment',
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
'before' => '<div class="reply">',
|
||||
'after' => '</div>'
|
||||
) ) );
|
||||
?>
|
||||
</article><!-- .comment-body -->
|
||||
<?php
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue