ID)); // Delete the first element, as it is the current comment $comments = array_slice($comments, 1); foreach ($comments as $comment) { // First matching post is the cited author's last comment if (strcasecmp($matches[1], $comment->comment_author) == 0) { $cid = $comment->comment_ID; $lnk = get_permalink($post->ID); // Link the author name to the comment anchor return preg_replace( '/^@([^:]+): /', '@\1: ', $content); } } } return $content; } add_filter('comment_text', 'at_reply_filter'); ?>