function gotwo_get_url in Go - url redirects 5
Return the GO url for a given link
1 call to gotwo_get_url()
- _gotwo_filter in ./
gotwo.module - This function will strip the <go> link into it's parts, save the link with the title to the database and returns a HTML based link for the replacement in the content.
File
- ./
gotwo.module, line 219 - Module that provides easy to use redirection links. A redirection link would be like: http://examples.org/go/a_label http://examples.org/go/123546 http://examples.org/go/or/like/this
Code
function gotwo_get_url($url, $src = false, $flags = gotwo_CREATE) {
$res = gotwo_get($url, $src, $flags);
if (!$res) {
return url($url);
}
if (variable_get('gotwo_numeric', false)) {
return url('go/' . $res->gid);
}
return url('go/' . $res->src);
}