Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Pirate filter fix

Michael Heilemann wrote:

> Hey Dougal.
>
> I get the following error when I try to comment on my site with the
> pirate plugin turned on:
>
> Database error: [You have an error in your SQL syntax. Check the manual
> [...]
>
> I’m running 1.2. Any ideas?
>
> – Mike
> http://binarybonsai.com


Doh! I forgot to announce the fix for that! I discovered the problem on Friday, but I didn’t have time to write it up, and then later I forgot about it.

At the end of tfs-pirate.php, change the final if statement. Instead of

  add_filter('all','pirate');

Do:

  add_filter('the_content','pirate');
  add_filter('comment_text','pirate');

Or just re-download the package, I've updated it with the fix.

About Dougal

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding in PHP or Perl, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in Pirates, Plugins, TalkLikeAPirate, WordPress and tagged , , . Bookmark the permalink.

4 Responses to Pirate filter fix

  1. Pingback: Citypress CVS

  2. ryoken says:

    i shoulda known the zip wouldn’t be fixed…

  3. I updated both the zip and the tarball with the fixed version of tfs-pirate.php.

  4. win says:

    In your free time, take a look at the pages about…

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>