Highlight Author Comments - WordPress Plugin Review
I’ve noticed on some blogs that when the author of the post comments on the post (e.g. in reply to another comment) that those comments stand out from the rest of the comments. I really like this feature and would like to have this on all my themes. What would be ideal is if I wouldn’t have to modify the theme to add this support.
Enter the Highlight Author Comments plugin by Rob Marsh. With this plugin all you have to do is activate it and optionally set the CSS style for how the author comments should be modified.
Overall Grade: A
Plugin Name: Highlight Author Comments Plugin URI: http://rmarsh.com/plugins/highlight-comments/ WordPress Plugin URI: http://wordpress.org/extend/plugins/highlight-author-comments/ Version: 1.0.0 Description: Automatically applies a distinctive style to comments by the post’s author. Author: Rob Marsh, SJ Author URI: http://rmarsh.com/
Installation
Simply copy the files for the plugin to the wp-contents/plugins folder. I placed it in a folder called highlight-author-comments. Nothing else is required.
Configuration
No configuration is required, although you might want to perform some to configure how author comments will appear. The default style is to pad the author’s comments by one character (padding: 1em). The author’s web site includes some additional suggestions:
padding-left: 20pxbackground-color: #FFFF95(a yellow color)border-left: 1em solid #DDD; padding: 1embackground: white url(http://www.yourblog.com/images/fluffy-clouds.gif)background-color: silver; margin-left: -2em; padding: 1em 1em 1em 2em
As of the writing of this post, I am using this:
border-left: solid 2px #DCDCDC;
background-color: #FFFF95;
line-height: 1.6em;
padding: 1em
Note that if you include a semicolon on the end of the last entry there will be two semicolons in the generated HTML - not really a biggie, but I thought I’d mention it anyway.
Conclusion
This plugin works really well. The only problem I found with it is that it doesn’t work if the author email address doesn’t match exactly. This was easily remedied by adding calls to
strtolower around them before comparing on line 31:
if ( strtolower($comment->comment_author_email) !== strtolower(get_the_author_email()) )
I’ve made this modification available as a download.
Resources
Highlight-Author-Comments-1.0.1.zip (2.9 KiB, 1,237 hits)




Leave a Reply