Adds a "Peep This Post" link to every post and page, so your readers can share entries on Gatorpeeps. Shortens URLs in advance.
Cached short URLs are saved to the postmeta table when a visitor views posts. For any future pageloads, those URLs are loaded, instead of pinging the Th8.us server (or is.gd, TinyURL, etc.). This works, because as long as the post's permalink doesn't change, the short URL from the third-party service doesn't change.
The cache is invalidated by setting the existing short URLs in the postmeta table to "getnew" as needed. By reusing the old fields instead of replacing them, I don't bump up the meta_id counter needlessly. When the next person visits that post, the get_tweet_this_short_url function in Tweet This sees this and gets a new short URL.
What triggers a cached URL as invalid? When you save a post (including editing and publishing), the cache is invalidated in case you changed the permalink. Secondly, when you change URL services under Settings > Tweet This or change permalink structures under Options > Permalinks, all the cached URLs are set to "getnew". If you move your blog to a different directory or domain name, just change URL services and then change back to trigger a refresh on the cache.
When you deactivate the plugin, all the cached URLs are deleted.
Because I'd have to fetch a short URL if it did, and the permalink for the post isn't set yet. It would be something like /?p=1, which would just waste an entry in GatorURL service's database.
Requires: 1.5 or higher
Compatible up to: 2.7.1
Last Updated: 2009-5-18
Downloads: 457




