_rdf_set_field_rel_attribute

_rdf_set_field_rel_attribute(&$variables)

Transforms the field property attribute into a rel attribute.

File

core/modules/rdf/rdf.module, line 286
Enables semantically enriched output for Drupal sites in the form of RDFa.

Code

function _rdf_set_field_rel_attribute(&$variables) {
  // Swap the regular field property attribute and use the rel attribute
  // instead so that it plays well with the RDFa markup when only a link is
  // present in the field output, for example in the case of the uid field.
  if (!empty($variables['attributes']['property'])) {
    $variables['attributes']['rel'] = $variables['attributes']['property'];
    unset($variables['attributes']['property']);
  }
}
doc_Drupal
2016-10-29 09:57:18
Comments
Leave a Comment

Please login to continue.