Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Text Filter Suite

Description

  • Plugin link: Text Filter Suite
  • Plugin version: 1.4
  • Requires at least: WordPress 1.5
  • Tested up to: WordPress 4.3
  • Last updated: June 3, 2015
  • Rating: 5/5
  • Downloads: 3,599 Download ZIP

The Text Filter Suite ("TFS", hereafter) is a WordPress plugin which adds some new text filtering functions. In a sense, the core TFS functions could be considered a "meta filter", because they actually provide a framework that let you construct new filters fairly easily. They also provide an easy way to apply filters to post content and comments on a per-post basis.

Huh? Can you repeat that in English?

Okay, let's try a real-world example. A common feature on many web sites is the automatic handling of acronyms. You'll often see an acronym such as "XHTML" displayed in an alternate style, and when you hover your mouse pointer over it, you get a tool-tip which displays the definition ("eXtended HyperText Markup Language", in this case). You don't want to have to type in the markup for this every time you post something, and automation is what computers are for, right? So, there are several plugins available to handle this sort of automated text subsitution.

TFS comes with the "TFS Acronymit" plugin to perform this function. It's based on Matt Mullenweg's original "Acronymit" function, but with a couple of improvements. In Matt's original function, you had to keep the acronym list sorted, longest-to-shortest, and it could get confused by recursive acronyms like 'PHP' ("PHP Hyptertext Processor") or GNU ("GNU's Not Unix"). TFS Acronymit does not have those restrictions.

For those who think that expansion of technical acronyms is "teh sux0r" (i.e. "boring"), TFS comes with a variety of more entertaining filters. The current set includes "chef", "fudd", "jive", "kraut", "pirate", and of course, the aforementioned "acronymit". As a word of caution, the "jive" and "kraut" filters are not what you would call "politically correct".

Changelog

1.4 - 2015-06-03

  • Added '?filter=foo' URL option back in, with a whitelist of allowed functions.

1.3 - 2012-09-18

  • Fixed PHP opening shorttag in tfs-acroymit.php
  • Eliminated PHP warnings in debug mode
  • Removed all closing ?> php tags per WP standards
  • Killed generic 'filter' $_REQUEST variable checking

1.2 - 2010-12-10

  • Added this changelog to the readme
  • Moved the is_feed() handling into the init, to avoid breaking in WordPress 3.1.
  • Added notes about the filters being CPU intensive.

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
Bookmark the permalink.

21 Responses to Text Filter Suite

  1. Pingback: Make Your WordPress Site Talk Like a Pirate - Dougal Campbell's geek ramblings

  2. Pingback: Yarrr! Talk Like a Pirate Day Is Almost Upon Us! - Dougal Campbell's geek ramblings

  3. Pingback: Dougal Campbell: Yarrr! Talk Like a Pirate Day Is Almost Upon Us!

  4. I love this Plugin. I use it as a demonstration for my students on the possible in WordPress Plugins and it triggers their imagination. Well, it isn’t working this quarter. Caught me completely off-guard.

    It’s been modularized, and we’ve activated the core plus a language filter, and it isn’t working on our test sites.

    We are using these on InstantWP installations, so is it calling from an API or something?

    I was so disappointed to not have it dazzle the students. :( If you could help me figure out if it is an InstantWP issue or the Plugin needs updating, I would appreciate it. Thanks!

  5. I found one solution: Each post must use the custom field to activate it. ARGGGG.

    Is there a global setting?

  6. Ah, looking back, I see that I removed the ?filter=foo feature, because I was afraid it might be a security issue. I’ll do a new release, add it back in, with a whitelist of allowed functions.

  7. Can’t find the setting? Found the filter added but can’t find how to activate it for the whole site. These folks are brilliant but we’re not even close to covering custom functions. ๐Ÿ˜€

    And I’m showing off this post to them, so say hi to a whole bunch of newbies learning WordPress in college for their future careers (and degree programs). WAVE!

  8. Hello, students!

    There’s no settings. It’s always been a simple plugin. You can manually filter any given page by adding, for example, ?filter=pirate to the URL. But here’s some easy access links:

    pirate
    chef
    fudd

    One day I’ll rewrite this thing, merge the pieces, and give it proper settings.

  9. Lisa Presley says:

    @dougal…hi! From Lorelle’s class… *WAVE* Thanks for fixing this for us. You have made Lorelle a very happy camper!

  10. Drew Telegin says:

    You made Lorelle’s day and she told us how helpful you have been! Thanks! *WAVE*

  11. *Waving Back* Hey there! Thanks the fix so we can see your cool plugin in action.

  12. I’m just glad to see that somebody can learn something from my silly plugin!

  13. Dustin Bronn says:

    Thank you very much for fixing

Leave a Reply

%d bloggers like this: