diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-03 06:47:23 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-03 06:47:23 +0000 |
commit | 0d8515deb750fe2a02ee6f9f12860caceed7248f (patch) | |
tree | 9898c0801cec5188f8e54229a2760a4ff15f44f5 /modules/rdf/rdf.module | |
parent | 3b2d24af0b8ca83415310e2b328cc60fa830837b (diff) | |
download | brdo-0d8515deb750fe2a02ee6f9f12860caceed7248f.tar.gz brdo-0d8515deb750fe2a02ee6f9f12860caceed7248f.tar.bz2 |
#552478 by pwolanin, samj, dropcube, and sun: Improve link/header API and support on node/comment pages rel=canonical and rel=shortlink standards.
Diffstat (limited to 'modules/rdf/rdf.module')
-rw-r--r-- | modules/rdf/rdf.module | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module index b520bfb96..7da53d86b 100644 --- a/modules/rdf/rdf.module +++ b/modules/rdf/rdf.module @@ -384,10 +384,17 @@ function rdf_preprocess_node(&$variables) { // In full node mode, the title is not displayed by node.tpl.php so it is // added in the head tag of the HTML page. if ($variables['page']) { - $title_attributes['property'] = empty($variables['node']->rdf_mapping['title']['predicates']) ? NULL : $variables['node']->rdf_mapping['title']['predicates']; - $title_attributes['content'] = $variables['node_title']; - $title_attributes['about'] = $variables['node_url']; - drupal_add_html_head('<meta' . drupal_attributes($title_attributes) . ' />'); + $element = array( + '#tag' => 'meta', + '#attributes' => array( + 'content' => $variables['node_title'], + 'about' => $variables['node_url'], + ), + ); + if (!empty($variables['node']->rdf_mapping['title']['predicates'])) { + $element['#attributes']['property'] = $variables['node']->rdf_mapping['title']['predicates']; + } + drupal_add_html_head($element, 'rdf_node'); } // Adds RDFa markup for the date. |