function rdf_preprocess_taxonomy_term
Same name in other branches
- 9 core/modules/rdf/rdf.module \rdf_preprocess_taxonomy_term()
- 8.9.x core/modules/rdf/rdf.module \rdf_preprocess_taxonomy_term()
Implements MODULE_preprocess_HOOK().
File
-
modules/
rdf/ rdf.module, line 723
Code
function rdf_preprocess_taxonomy_term(&$variables) {
// Adds the RDF type of the term and the term name in a <meta> tag.
$term = $variables['term'];
$term_label_meta = array(
'#tag' => 'meta',
'#attributes' => array(
'about' => url('taxonomy/term/' . $term->tid),
'typeof' => $term->rdf_mapping['rdftype'],
'property' => $term->rdf_mapping['name']['predicates'],
'content' => $term->name,
),
);
drupal_add_html_head($term_label_meta, 'rdf_term_label');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.