WordPress.org

Make WordPress Core

Ticket #16433: 16433.2.diff

File 16433.2.diff, 1.2 KB (added by merty, 7 years ago)

This should be the proper way to do it

  • wp-includes/comment-template.php

     
    10581058        if ( get_option('comment_registration') && !$user_ID )
    10591059                $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>';
    10601060        else
    1061                 $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>";
     1061                $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")' title='" . esc_html( sprintf( __('Leave a Reply to %s'), $comment->comment_author ) . ' #' . $comment->comment_ID ) . "'>$reply_text</a>";
    10621062        return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);
    10631063}
    10641064