You are here

function _google_tag_variable_info_domain in GoogleTagManager 7.2

Implements hook_variable_info().

File

includes/variable.inc, line 186
Contains the variable definitions.

Code

function _google_tag_variable_info_domain($options) {

  // @todo Does google_tag_condition_filter() obviate this gate check?
  if (!module_exists('domain')) {
    return array();
  }
  $options = array();
  foreach (domain_domains() as $key => $value) {
    $options[$value['machine_name']] = $value['sitename'];
  }
  $toggle = 'domain_toggle';
  $list = 'domain_list';
  $plural = 'domains';
  $config = compact(array(
    'toggle',
    'list',
    'plural',
    'options',
  ));
  return _google_tag_variable_info_generic($config, $options);
}