Can you apply a class to the comment if the comment author has a particular role in the site (e.g. Editor)? At the moment I have one users details hardwired in the comments.php code so if the comment is from them a class of admin is added. but it would be great to have a group of people – even better if it were against a user id, rather than a hackable name and email!
Here’s the relevant bit from what I’m using at the moment:
<?php $author = array(
"highlight" => "admin",
"email" => "[email protected]",
"name" => "Webmaster"
);
<li id="comment-<?php comment_ID(); ?>" class="<?php
/* Highlighting class for author or regular striping class for others */
/* Get current author name/e-mail */
$this_name = $comment->comment_author;
$this_email = $comment->comment_author_email;
/* Compare to $author array values */
if (strcasecmp($this_name, $author["name"])==0 && strcasecmp($this_email, $author["email"])==0)
_e($author["highlight"]);
else
_e($thiscomment);
?>">
?>
Any help would be greatly appreciated!