function nodewords_extra_dc_creator_prepare in Nodewords: D6 Meta Tags 6
Same name and namespace in other branches
- 6.2 nodewords_extra/includes/nodewords_extra.nodewords.tags.inc \nodewords_extra_dc_creator_prepare()
Set the meta tag content.
File
- nodewords_extra/
nodewords_extra.module, line 332 - Define extra meta tags for Drupal pages.
Code
function nodewords_extra_dc_creator_prepare(&$tags, $content, $options) {
$auto = FALSE;
// The manually assigned value.
if (!empty($content['value'])) {
$tags['dcterms.creator'] = $content['value'];
}
elseif ($options['type'] == NODEWORDS_TYPE_NODE && !empty($content['auto'])) {
$auto = TRUE;
}
elseif (!empty($options['default']['dcterms.creator']['value'])) {
$tags['dcterms.creator'] = $options['default']['dcterms.creator']['value'];
}
elseif ($options['type'] == NODEWORDS_TYPE_NODE && !empty($options['default']['dcterms.creator']['auto'])) {
$auto = TRUE;
}
if ($auto) {
$node = node_load($options['id']);
$tags['dcterms.creator'] = $node->name;
}
}