Make WordPress Core

Ticket #16893: comment-template.php.17522.diff

File comment-template.php.17522.diff, 1.5 KB (added by joelhardi, 14 years ago)

changes "reply" links in comments list to form buttons

  • comment-template.php

     
    10571057        $link = '';
    10581058
    10591059        if ( get_option('comment_registration') && !$user_ID )
    1060                 $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>';
     1060                $link = '<form action="'.  esc_url(wp_login_url()) .'" method="get">'.
     1061                        '<button class="comment-reply-login" value="'.
     1062                        esc_url(get_permalink()) .'" type="submit" name="redirect_to">'.
     1063                        $login_text .'</button></form>';
    10611064        else
    1062                 $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>";
     1065                $link = '<form action="#'. $respond_id .'" method="get">'.
     1066                        '<button class="comment-reply-link" value="'.
     1067                        $comment->comment_ID .'" onclick="return addComment.moveForm(\''.
     1068                        $add_below .'-'. $comment->comment_ID .'\', \''.
     1069                        $comment->comment_ID .'\', \''. $respond_id .'\', \''. $post->ID.
     1070                        '\')" type="submit" name="replytocom">'.
     1071                        $reply_text .'</button></form>';
    10631072        return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);
    10641073}
    10651074