locale_field_attach_view_alter
- Versions
- 7
locale_field_attach_view_alter(&$output, $context)
Implements hook_field_attach_view_alter().
Code
modules/locale/locale.module, line 474
<?php
function locale_field_attach_view_alter(&$output, $context) {
// In locale_field_fallback_view() we might call field_attach_view(). The
// static variable avoids unnecessary recursion.
static $recursion;
// Do not apply fallback rules if disabled or if Locale is not registered as a
// translation handler.
if (!$recursion && variable_get('locale_field_fallback_view', TRUE) && field_multilingual_check_translation_handlers($context['obj_type'], 'locale')) {
$recursion = TRUE;
module_load_include('inc', 'locale', 'locale.field');
locale_field_fallback_view($output, $context);
$recursion = FALSE;
}
}
?>Login or register to post comments 