Quick fix to get Simple Tags plugin working with WordPress 2.9+

Note: There’s a new version of Simple Tags that works with WP 2.9.1 so no need for this hack anymore.

If you’re using the Simple Tags plugin, you might be holding off on upgrading to WordPress 2.9.1 because this plugin is only Compatible up to: 2.8.

Well, turns out the plugin does actually seem to work with WP 2.9.x — but you have to make a quick edit to the plugin file itself. Now, normally i’m not a fan of hacking plugin files to get things working because your changes would be lost with each new release. But, in this case, i figured that when the author does decide to release an update, i would be ok with losing these changes because they would no longer be necessary anyway.

Note: if you’re not comfortable editing plugin files directly (although this edit is really easy), then maybe you should wait until the author releases an official update. Otherwise, i’ve included the bit of code here for reference.

To get Simple Tags working with WP 2.9+

1) Open simple-tags.php and find the line:

if ( strpos($wp_version, '2.7') !== false || strpos($wp_version, '2.8') !== false ) {

2) Change that to:

if ( strpos($wp_version, '2.7') !== false || strpos($wp_version, '2.8') !== false || strpos($wp_version, '2.9') !== false ) {

That’s right, it’s just a matter of adding the additional condition which allows WP version 2.9 to work.

As always, be sure to backup and test this fix on your own site before going live.

This fix was found / documented here:
- http://www.wordpress-fr.net/support/viewtopic.php?pid=173448#p173448
- http://www.herewithme.fr/simple-tags-et-wordpress-2-8#comment-34072

Comments 5

  1. Yael K. Miller wrote:

    This code produces an error because of the quotation marks. The below works.

    if ( strpos($wp_version, '2.7') !== false || strpos($wp_version, '2.8') !== false || strpos($wp_version, '2.9') !== false ) {

    Posted 05 Jan 2010 at 8:04 pm
  2. Yael K. Miller wrote:

    Oops, the curly quotes got put in automatically. They should be straight quotes.

    Posted 05 Jan 2010 at 8:04 pm
  3. elran wrote:

    yes, it’s true.. watch out for the curly quotes (if copy/pasting this code)

    Posted 05 Jan 2010 at 8:49 pm
  4. elran wrote:

    ok, i’ve fixed the issue. it seems an old plugin was causing all my code bits to have curly quotes which created problems for people when copy/pasting the content.

    anyway, i’ve disabled the plugin in question and now the curly quotes have returned to normal quotes which are safe for copy/pasting.

    Posted 05 Jan 2010 at 10:19 pm
  5. elran wrote:

    looks like there’s a new version of Simple Tags that seems to work fine with WP 2.9.1 so no need for this hack anymore.

    Posted 13 Jan 2010 at 5:06 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *