I'm trying to output a "delete comment" link on the front-end. Here's my attempt so far:
printf( '<a href="%s">%s</a>', wp_nonce_url( admin_url( "comment.php?c=$comment_id&action=deletecomment" ), 'delete-comment_' . $comment_id ), __( 'Delete comment', 'text-domain' ) );
edit_comment cap to the author role. However, when I log in as an author and click on Delete comment, I get the following message on a white screen of death:
Sorry, you are not allowed to edit comments on this post.
Thank you for creating with WordPress.
How can I output a permanently delete comment link which works?