function _simplenews_mail_url in Simplenews 5
Convert URL to absolute URL
Strings containing ':/' are regarded absolute and not converted. Any 'mailto:' is stripped from the text.
Parameters
string $url: URL to be converted
Return value
string Absolute url
2 calls to _simplenews_mail_url()
- _simplenews_mail_uri in ./
simplenews.module - Format URL and link text for in-line display in plain text message.
- _simplenews_mail_urls in ./
simplenews.module - Collect and store URLs
File
- ./
simplenews.module, line 1489
Code
function _simplenews_mail_url($url) {
if (preg_match('@://@', $url)) {
return $url;
}
elseif (preg_match('!mailto:!i', $url)) {
return str_replace('mailto:', '', $url);
}
else {
return url($url, NULL, NULL, 1);
}
}