How to use the is.gd URL shortener with leenk.me

I've written about using bit.ly and su.pr before, but this is how you can use the is.gd URL shortener -- if that's your cup of tea. To use the is.gd URL shortener, simply add this code to your theme's functions.php file:

function custom_leenkme_url_shortener( $api_url, $url ) {  
  
	$isgd_api ="http://is.gd/create.php";  
  
	$isgd_args = array(  
				'url' => $url,
				'format' => 'simple'
			);  
  
	return $isgd_api . '?' .  http_build_query( $isgd_args );  
  
}  
add_filter( 'leenkme_url_shortener', 'custom_leenkme_url_shortener', 10, 2 );  

And that's it. By the way, I'm working on a big update for the leenk.me plugin, so you won't have to use this code anymore. It will be integrated right into the plugin's user interface.

Let me know if you run into any trouble.

This entry was posted in Custom URL Shorteners, plugin. Bookmark the permalink.


2 Responses to How to use the is.gd URL shortener with leenk.me

  1. Pingback: Joseph