function hook_domainwarnings in Domain Access 6.2
Same name and namespace in other branches
- 5 API.php \hook_domainwarnings()
- 7.2 domain.api.php \hook_domainwarnings()
Allows a warning message to be printed when entering specific forms that may have values that vary on each domain.
NOTE: The responding module is required to check that the user has access to this form setting. Failure to check access on the form elements may introduce a security risk.
Return value
An associative array where the keys form_id values representing forms that require warnings. The value should return a link for where the form may be set for the current domain. If no link exists, you should pass NULL as the value.
These values are subject to token replacement, using the syntax %value, where %NAME may be any element of the $_domain array.
Related topics
2 functions implement hook_domainwarnings()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_conf_domainwarnings in domain_conf/
domain_conf.module - Implement hook_domainwarnings()
- domain_theme_domainwarnings in domain_theme/
domain_theme.module - Implement hook_domainwarnings()
1 invocation of hook_domainwarnings()
- domain_warning_check in ./
domain.module - Sets a message to the site admin.
File
- ./
API.php, line 334 - API documentation file.
Code
function hook_domainwarnings() {
// These are the forms for variables set by Domain Conf.
$forms = array(
'system_admin_theme_settings',
'system_date_time_settings',
'system_site_information_settings',
'system_site_maintenance_settings',
);
$return = array();
foreach ($forms as $key) {
$return[$key] = 'admin/build/domain/path/%domain_id';
}
return $return;
}