function themekey_redirect_parse_domain_selector in ThemeKey 7.3
2 calls to themekey_redirect_parse_domain_selector()
- themekey_redirect_block_save in themekey_redirect/
themekey_redirect.module - Implements hook_block_save().
- themekey_redirect_domain_list_validate in themekey_redirect/
themekey_redirect.module
File
- themekey_redirect/
themekey_redirect.module, line 380 - Define rules to redirect the user to a different domain. The common use-case is to setup sub-domains for mobile sites. In this case you can configure ThemeKey Redirect to detect mobile clients and redirect the user accordingly. In ThemeKey itself you…
Code
function themekey_redirect_parse_domain_selector($domain_selector_string) {
$domain_selector = array();
$domain_selector_string = trim($domain_selector_string, " \r\n");
$lines = explode("\n", $domain_selector_string);
foreach ($lines as $line) {
@(list($url, $link) = explode('|', $line));
$url = trim($url, " \r\n");
$link = trim($link, " \r\n");
$domain_selector[$url] = $link ? $link : $url;
}
return $domain_selector;
}