Adding buttons to wp-admin/edit-comments

You can use two filters for that:

  • manage_edit-comments_columns – to add a column header on comments table
  • manage_comments_custom_column – to add the content of each row for that column

So you would have something like this:

function myplugin_comment_columns( $columns )
{
    $columns['my_custom_column'] = __( 'My Category' );
    return $columns;
}
add_filter( 'manage_edit-comments_columns', 'myplugin_comment_columns' );

function myplugin_comment_column( $column, $comment_ID )
{
    if ( 'my_custom_column' == $column ) {
        echo '<a href="' . admin_url('/my-action.php?id=' . $comment_ID) . '">My button</a>';
    }
}
add_filter( 'manage_comments_custom_column', 'myplugin_comment_column', 10, 2 );