robot with a heart

Says Something Else

April 30, 2009, 4:05 pm

Download

Download from WordPress Codex

What This Does…

SaysSomethingElse replaces the default “SoAndSo says:” in Wordpress comment threads with whatever you specify. If you specify more than one replacement, SaysSomethingElse will randomly pick from your collection of specified words.

Why…

Wordpress 2.7 introduced comment threading and included a new function called wp_list_comments() that would simply dump out all the comments with correct markup for comment threading. For the most part, everything wp_list_comments() does is pretty good. It gives you good markup that you can easily style with css–nice and clean separation of content and presentation–and some options…

However one thing that bugged me was that there was no option to replace “says:” with something else. After some digging I found that the only way to change “says:” to something else is to write your own callback function to display threaded comments. That’s a lot of work just to change one thing (and honestly it’s not really that important). So instead of writing my own callback function I wrote this simple dummy plugin. It’s pretty straight-forward. It expects the default markup given by WordPress’s wp_list_comments.

Change Log

  • 1.0 Initial Release
  • 1.0.1 Fixed bug by adding stripslashes to JS output.

6 Comments

Subscribe to this comment feed via RSS

Leave a Reply