How to add a custom field to the comments “Quick Edit” screen?

Here’s the function responsible for rendering the comments quick edit form: wp_comment_reply.

Looking at its code, it seems you can short-circuit it using the wp_comment_reply filter. That only lets you start from scratch though (e.g. you can’t add to the existing form).

The only way around this that I can think of is some (unholy) code like:

function your_custom_quick_edit_form($content) {
    remove_filter('wp_comment_reply', 'your_custom_quick_edit_form', 10, 2);

    ob_start();
    wp_comment_reply();
    $content = ob_get_clean();

    // Do horrible stuff here with str_replace and the likes
    $content = str_replace('<fieldset class="comment-reply">', '<fieldset class="comment-reply">I shouldn\'t be here', $content);

    return $content;
}

add_filter('wp_comment_reply', 'your_custom_quick_edit_form', 10);

But really, you probably shouldn’t do that. It seems this area of the dashboard isn’t really meant for customization.