You are here

function _site_disclaimer_checkbox_label_all_translations in Site Disclaimer 7

Same name and namespace in other branches
  1. 6 site_disclaimer.admin.inc \_site_disclaimer_checkbox_label_all_translations()

Get an associative array keyed by langcode of all checkbox label translations.

1 call to _site_disclaimer_checkbox_label_all_translations()
_site_disclaimer_prep_allowed_paths in ./site_disclaimer.admin.inc
Create 'site_disclaimer_allow_nodes' variable from links found in:

File

./site_disclaimer.admin.inc, line 14
Administration settings for Site Disclaimer module.

Code

function _site_disclaimer_checkbox_label_all_translations() {
  $ret = array();
  if (module_exists('i18n_variable')) {
    $languages = language_list();
    $value_und = i18n_variable_get('site_disclaimer_checkbox_label', 'und', '');
    foreach ($languages as $langcode => $language) {
      $value = i18n_variable_get('site_disclaimer_checkbox_label', $langcode, $value_und);
      if (!empty($value)) {
        $ret[$langcode] = filter_xss_admin($value);
      }
    }
  }
  else {
    global $language;
    $ret[$language->language] = filter_xss_admin(variable_get('site_disclaimer_checkbox_label', SITE_DISCLAIMER_DEFAULT_CHECKBOX_LABEL));
  }
  return $ret;
}