function domaincontext_context_condition_domain::condition_values in Domain Context 6
Same name and namespace in other branches
- 7 plugins/domaincontext_context_condition_domain.inc \domaincontext_context_condition_domain::condition_values()
File
- plugins/
domaincontext_context_condition_domain.inc, line 12 - Context plugin to supply the domain as a context condition.
Class
- domaincontext_context_condition_domain
- Expose domains as a context condition.
Code
function condition_values() {
$values = array();
$format = domain_select_format();
foreach (domain_domains() as $data) {
$data['domain_id'] == 0 ? $key = -1 : ($key = $data['domain_id']);
if ($data['valid'] || user_access('access inactive domains')) {
$values[$key] = empty($format) ? check_plain($data['sitename']) : $data['sitename'];
}
}
return $values;
}