Last active
August 29, 2015 13:57
-
-
Save auzeonfung/9833831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="tsukkomi"> | |
<?php if ($depth == get_option('thread_comments_depth')) : ?> <!-- 评论深度等于设置的最大深度 --> | |
<!-- 将第二个参数改为父一级评论的id --> | |
<a onclick="return addComment.moveForm( 'comment-<?php comment_ID() ?>','<?php echo $comment->comment_parent; ?>', 'respond','<?php echo $comment->comment_post_ID; ?>'" href="#comment-<?php comment_ID() ?>" class="comment-reply-link">回复</a> | |
<?php else: ?> | |
<!-- 正常情况 --> | |
<a onclick="return addComment.moveForm( 'comment-<?php comment_ID() ?>','<?php comment_ID() ?>', 'respond','<?php echo $comment->comment_post_ID; ?>'" href="#comment-<?php comment_ID() ?>" class="comment-reply-link" >回复</a> | |
<?php endif; ?> | |
</span> | |
Outpt: | |
========================= | |
<span class="tsukkomi"> | |
<!-- 正常情况 --> | |
<a onclick="return addComment.moveForm( 'comment-13','13', 'respond','1'" href="#comment-13" class="comment-reply-link">回复</a> | |
</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment