Add delete and spam actions

The first snippet of code should be added to your functions.php of your wordpress theme. Once added you will need to open comments.php and add the second snippet of code to the location you wish to display the delete and spam links. These links will only be displayed for users with the ability to edit posts.



function delete_comment_link($id) {
if (current_user_can('edit_post')) {
echo '| <a href="'.admin_url("comment.php?action=cdc&c=$id").'">del</a> ';
echo '| <a href="'.admin_url("comment.php?action=cdc&dt=spam&c=$id").'">spam</a>';


Leave a comment