You are here

function rdf_preprocess_image in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/rdf/rdf.module \rdf_preprocess_image()
  2. 9 core/modules/rdf/rdf.module \rdf_preprocess_image()
  3. 10 core/modules/rdf/rdf.module \rdf_preprocess_image()

Implements MODULE_preprocess_HOOK().

File

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

Code

function rdf_preprocess_image(&$variables) {

  // Adds the RDF type for image. We cannot use the usual entity-based mapping
  // to get 'foaf:Image' because image does not have its own entity type or
  // bundle.
  $variables['attributes']['typeof'] = array(
    'foaf:Image',
  );
}