Comments: Don't print an empty HTML markup when comment_reply_link() returns no link.

props obenland.
fixes #29895.

git-svn-id: https://develop.svn.wordpress.org/trunk@29908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-10-15 21:55:31 +00:00
parent e6d26285cc
commit 5d7e30e7d9

View File

@ -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
}