• Uncategorised
  • 0

Modding Twitter-Digest

I have started using Twitter Digest to post a daily update of all my tweets. Unfortunately it had got itself into a bit of a loop, and was posting tweets that were anouncing new blog posts. Ooooh, lots of track back pings!

Twitter Digest allows you to ignore @replies. So i found where it was doing that

// Are we dropping replies?
if (get_option('ws_td_drop_replies') && preg_match('/^@.*/', $tw_data->text)) {
continue;
}

and used that as the basis for ignoring tweets anouncing new blog posts, by adding in the entry

// Eddie Brown Mod - drop posts that have been anounced on twitter.
if (preg_match('/^New blog post:.*/', $tw_data->text)) {
continue;
}

I checked the regular expression using Regex Plant: Online regular expression tester

You may also like...