summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.tokens.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/system/system.tokens.inc b/modules/system/system.tokens.inc
index 07afe5deb..01687f0c2 100644
--- a/modules/system/system.tokens.inc
+++ b/modules/system/system.tokens.inc
@@ -48,6 +48,10 @@ function system_token_info() {
'name' => t("URL"),
'description' => t("The URL of the site's front page."),
);
+ $site['url-brief'] = array(
+ 'name' => t("URL (brief)"),
+ 'description' => t("The URL of the site's front page without the protocol."),
+ );
$site['login-url'] = array(
'name' => t("Login page"),
'description' => t("The URL of the site's login page."),
@@ -181,6 +185,10 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a
$replacements[$original] = url('<front>', $url_options);
break;
+ case 'url-brief':
+ $replacements[$original] = preg_replace('!^https?://!', '', url('<front>', $url_options));
+ break;
+
case 'login-url':
$replacements[$original] = url('user', $url_options);
break;