template_process_field
function template_process_field
template_process_field(&$variables, $hook)
Theme process function for theme_field() and field.tpl.php.
See also
Related topics
File
- modules/field/field.module, line 1098
- Attach custom data fields to Drupal entities.
Code
function template_process_field(&$variables, $hook) { // The default theme implementation is a function, so template_process() does // not automatically run, so we need to flatten the classes and attributes // here. For best performance, only call drupal_attributes() when needed, and // note that template_preprocess_field() does not initialize the // *_attributes_array variables. $variables['classes'] = implode(' ', $variables['classes_array']); $variables['attributes'] = empty($variables['attributes_array']) ? '' : drupal_attributes($variables['attributes_array']); $variables['title_attributes'] = empty($variables['title_attributes_array']) ? '' : drupal_attributes($variables['title_attributes_array']); $variables['content_attributes'] = empty($variables['content_attributes_array']) ? '' : drupal_attributes($variables['content_attributes_array']); foreach ($variables['items'] as $delta => $item) { $variables['item_attributes'][$delta] = empty($variables['item_attributes_array'][$delta]) ? '' : drupal_attributes($variables['item_attributes_array'][$delta]); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.module/function/template_process_field/7.x