function resp_img_entity_view_alter in Responsive images and styles 7
Same name and namespace in other branches
- 7.2 resp_img.module \resp_img_entity_view_alter()
Implements hook_entity_view_alter().
File
- ./
resp_img.module, line 348
Code
function resp_img_entity_view_alter(&$build, $type) {
foreach (element_children($build) as $child) {
if (isset($build[$child]['#field_name'])) {
if (variable_get('resp_img_' . $build['#entity_type'] . '_' . $build['#bundle'] . '_' . $build[$child]['#field_name'], 0)) {
$build[$child]['#post_render'][] = 'resp_img_post_render';
}
}
}
}