Few interesting bits I noticed:
- There's a nice new function in the
wp.com stats plugin that you might find useful. function get_shortlink( $post_id, $force_numeric = false ). Could be handy for some theming action.
- The shortlink is part of the
wp.com system, so you have the shortlinks even if you don't see the button there.
- BTW, if you leave post_id empty or zero, the generated shortlink links to your blog's home page.
- You'll also find that the plugin adds a <link rel="shortlink"> into the wp_head. The rel=shortlink is starting to be a highly supported microformat standard. Hopefully we'll start to see Twitter clients and the like take advantage of it soon.
- Another thing it does is a bit less obvious, the shortlink is added to the HTTP headers using the Link: method, for clients wishing to save bandwidth by only doing a HEAD request.
- The shortlink method uses an algorithmic generation method. That is, it doesn't have to have the server generate it every time. Your blog is assigned an internal ID number, and that, combined with your post id number, creates the link. Side benefits of this are that a) changing the permalink doesn't change the shortlink, and b) very fast redirection since there's only one lookup for your blog's id in the
wp.com stats system, not a lookup table for each and every possible permalink.
- Every shortlink takes the form
http://wp.me/stuff-more. Only the "more" changes for each post. The stuff part is your blog id, the more part is your post id. Both encoded, of course.