You are here

function template_process_entity_property in Entity API 7

Theme process function for theme_entity_property().

Taken over from template_process_field()

See also

theme_entity_property()

File

theme/entity.theme.inc, line 122
Holds entity module's theme functions.

Code

function template_process_entity_property(&$variables, $hook) {
  $element = $variables['elements'];

  // 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['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']);
}