This shortcode add short url with tinyurl API service.
In your shortcode plugin configuration, add this tip:
Code: Select all
// Add Shortcode: {Tiny url='http://www.bludit.com'}
Shortcode::add('Tiny', function ($attributes) {
// Extract
extract($attributes);
$url = (isset($url)) ? file_get_contents('http://tinyurl.com/api-create.php?url='.$url) : '';
// return
return $url;
});
Code: Select all
{Tiny url='http://www.bludit.com'}
Code: Select all
http://tinyurl.com/gs3zxbp