function accessibility_content_field_attach_view_alter

cis7 accessibility_content.module accessibility_content_field_attach_view_alter(&$output, $context)
cle7 accessibility_content.module accessibility_content_field_attach_view_alter(&$output, $context)
elmsmedia7 accessibility_content.module accessibility_content_field_attach_view_alter(&$output, $context)
icor7 accessibility_content.module accessibility_content_field_attach_view_alter(&$output, $context)
meedjum_blog7 accessibility_content.module accessibility_content_field_attach_view_alter(&$output, $context)
mooc7 accessibility_content.module accessibility_content_field_attach_view_alter(&$output, $context)

Implements hook_field_attach_view_alter().

File

sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module, line 52

Code

function accessibility_content_field_attach_view_alter(&$output, $context) {
  if (user_access('check content for accessibility')) {
    foreach ($output as $field_key => $field) {
      if (is_array($field) && isset($field['#field_name'])) {
        $field = field_info_instance($field['#entity_type'], $field['#field_name'], $field['#bundle']);
        if (isset($field['accessibility_content']) && $field['accessibility_content']) {
          module_load_include('inc', 'accessibility_content', 'accessibility_content');
          accessibility_content_init();
          $output[$field_key]['#pre_render'][] = '_accessibility_content_field_pre_render';
        }
      }
    }
  }
}