Вроде как вот эта:
function get_comment_reply_link( $args = array(), $comment = null, $post = null ) {
$defaults = array(
'add_below' => 'comment',
'respond_id' => 'respond',
'reply_text' => __( 'Reply' ),
'reply_to_text' => __( 'Reply to %s' ),
'login_text' => __( 'Log in to Reply' ),
'depth' => 0,
'before' => '',
'after' => ''
);
$args = wp_parse_args( $args, $defaults );
if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] ) {
return;
}
$comment = get_comment( $comment );
if ( empty( $post ) ) {
$post = $comment->comment_post_ID;
}
$post = get_post( $post );
if ( ! comments_open( $post->ID ) ) {
return false;
}
$args = apply_filters( 'comment_reply_link_args', $args, $comment, $post );
if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {
$link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
esc_url( wp_login_url( get_permalink() ) ),
$args['login_text']
);
} else {
$onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "%2$s", "%3$s", "%4$s" )',
$args['add_below'], $comment->comment_ID, $args['respond_id'], $post->ID
);
$link = sprintf( "<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>",
esc_url( add_query_arg( 'replytocom', $comment->comment_ID, get_permalink( $post->ID ) ) ) . "#" . $args['respond_id'],
$onclick,
esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ),
$args['reply_text']
);
}
return apply_filters( 'comment_reply_link', $args['before'] . $link . $args['after'], $args, $comment, $post );
}
function comment_reply_link($args = array(), $comment = null, $post = null) {
echo get_comment_reply_link($args, $comment, $post);
}
Это код из файла comment-template.php движка ВП.
_____________
Простите, если туплю...