function themekey_redirect_domain_list_validate in ThemeKey 7.3
1 string reference to 'themekey_redirect_domain_list_validate'
- themekey_redirect_block_configure in themekey_redirect/
themekey_redirect.module - Implements hook_block_configure().
File
- themekey_redirect/
themekey_redirect.module, line 322 - 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_domain_list_validate($element) {
if (!empty($element['#value'])) {
$domain_selector = themekey_redirect_parse_domain_selector($element['#value']);
foreach ($domain_selector as $url => $link) {
@($parts = parse_url($url));
if (!isset($parts['host']) || !isset($parts['scheme'])) {
form_set_error('domain_list', t('The url %url is not valid.', array(
'%url' => $url,
)));
}
}
}
}