Matt Kirman

Introducing Cirrus: CloudApp powered WordPress shortlinks

As of today I’m open-sourcing my custom WordPress CloudApp powered shortlink generator Cirrus. Developed ~9 months ago I’ve been using it on and off on my own blog so that I have a unified shortlink presence.

Cirrus has been tested on WordPress 3.3.2 (latest version as of time of posting) and PHP 5.3. It’s fully compatible with both the Free and Pro versions of CloudApp.

Demo

http://mtt.io/HBJF → http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/

Installation

Source code is available for download on GitHub or, if you would prefer to install the plugin through the WordPress admin interface, you can do so by downloading a zipped version here.


Cirrus settings page

Once the plugin is installed successfully you will then need to navigate to the Cirrus settings page (found at Settings > Cirrus) and add your CloudApp credentials. At this point you will probably want to click “Add shortlinks to existing posts” (not recommended if you’re using the free version of CloudApp). Depending on the size of your blog this may take some time.

Usage

Cirrus does not replace the existing WordPress functionality instead adding the custom field cirrus_shortlink to posts. On the plus side it makes uninstalling the plugin easy, however you will have to modify your theme files if you want to expose the shortlink to your readers.

Where you want the link to show up add the following to your theme file (this assumes that you’re currently in the Loop):

<?
  $custom_fields = get_post_custom();
  echo $custom_fields['cirrus_shortlink'][0];
?>

Limitations

Shortlinks are only generated for posts, that means categories, tags and pages are not included. This may be resolved in a future update, or if you’d like to patch it yourself I’m accepting GitHub pull requests.

Comments