I'm a Wordpress user, and have been for as many years as I've been developing (which is a lot, now that I think about it..man, I feel old sometimes). However, I'm primarily a ColdFusion developer, and always want to share the CF love whenever possible.
Installation of the plugin is simple. Download the .zip file and upload it into your Wordpress plugin repository (either FTP or via the admin interface) and activate it.
There are two methods of use.
The first is as a shortcode, which can be used within the content editor for any page or post.
The default shortcode is as follows:
This will use the default title / lead text and output the link like so:
Short URL: <a href="http://cfml.us/Mf" class="">http://cfml.us/Mf</a>
We can override this a little and specify a different lead text (or nothing at all) and provide a class name for the link using the inline attributes:
[cfmlus_link title="Any other title here" class="my_link_class"]
The second option is to set a function directly within your template code to output the link wherever you want to:
<?php show_cfmlus_link(); ?>
Saved and Stored
When a new URL is generated for the parent page using the plugin, the shortened URL is saved as a custom post meta value. This removes any possible issues with duplicate URLs being generated for the same long URL, and it only needs to be created once.
The code is available to download from Github now: https://github.com/coldfumonkeh/cfml.us-Wordpress-plugin