Articles Comments

Marco Luthe Online! » WordPress Stuff » Fix for “Ingoal’s Twitter Updater” v2.06

Fix for “Ingoal’s Twitter Updater” v2.06

Twitter Updater” by Ingo “Ingoal” Hildebrandt is a nice WordPress plugin that sends an update to your Twitter account (a so-called “Tweet”) whenever a post is published and/or edited.

Unfortunately, some things still don’t seem to work:

  • Tweets are also send even if you only save a draft (due to the “save_post” hook).
  • Scheduled (future) posts do not “fire” a tweet… instead, nothing happens.
  • If I remember correctly, there were problems with slashes in the post title.

The original v2.06 of the plugin makes use of the $_POST variables to check if the post was a draft first and to get the post title. Unfortunately, a scheduled post can not be handled that way.

But there is a solution:
Since WP 2.3, there are a few so-called “Post Status Transition” hooks that allow you to hook into WordPress when a post changes the status from e.g. “future” to “publish”.

I used that hook to handle scheduled posts.

Also, I got rid of the $_POST check for the post title. Instead, I use “get_post($post_ID)” to determine the post title, therefore there is no need to check and replace slashes, I guess.

You can download the fixed version here.

Remember: you should only use this fix as long as Ingo hasn’t updated his plugin.

@Ingo:
It would be nice to be mentioned if my changes will make it into a future version update. Please notify me as soon as you have updated the plugin, so that I can link to it from here and take my fix from the server.

[Update from 2008-10-18]

Ingo has updated his plugin to v2.07 (thanks for the credits), so please go and download the plugin from his website.

Filed under: WordPress Stuff · Tags: , , , , , ,

  • Okay...tested on ingoal.info and yup, it fixes the mentioned issues (btw I think I fixed all the slash and ampersand issues a while back, if there are still any left, let me know)...thanks again for your fix...I've released your modded version as version 2.07 (the only thing I changed is the standard tinyurl prefix (from ---> to @) as I like this shorter version ;-)) and linked to your site...cya around
  • Sure will!
blog comments powered by Disqus