function rdf_preprocess_taxonomy_term
rdf_preprocess_taxonomy_term(&$variables)
Implements MODULE_preprocess_HOOK().
File
- modules/rdf/rdf.module, line 723
- Enables semantically enriched output for Drupal sites in the form of RDFa.
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'); }
© 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!rdf!rdf.module/function/rdf_preprocess_taxonomy_term/7.x