function fences_preprocess_entity in Fences 7
Same name and namespace in other branches
- 7.2 fences.module \fences_preprocess_entity()
 
Preprocess variables for entity.
File
- ./
fences.module, line 229  - Fences is a module providing configurable field wrappers.
 
Code
function fences_preprocess_entity(&$variables) {
  if ($variables['elements']['#entity_type'] == 'field_collection_item') {
    // Replace the default "field_collection_item" suggestion with fences'.
    if (($pos = array_search('field_collection_item', $variables['theme_hook_suggestions'])) !== FALSE) {
      $variables['theme_hook_suggestions'][$pos] = 'entity__fences_no_wrapper';
    }
  }
}