function domain_views_views_query_substitutions in Domain Views 7
Implements hook_views_query_substitutions ()
File
- ./
domain_views.views.inc, line 391 - Provides the views data and handlers for domain.module.
Code
function domain_views_views_query_substitutions($view) {
$domain = domain_get_domain();
$default = domain_default();
$return = array(
'***CURRENT_DOMAIN***' => $domain['domain_id'],
'***PRIMARY_DOMAIN***' => $default['domain_id'],
);
// Ensure compatibility with 7.x.2 and 7.x.3.
if (isset($domain['machine_name'])) {
$return['***CURRENT_DOMAIN_MACHINE_NAME***'] = $domain['machine_name'];
$return['***PRIMARY_DOMAIN_MACHINE_NAME***'] = $default['machine_name'];
}
return $return;
}