function nodewords_taxonomy in Nodewords: D6 Meta Tags 5
Same name and namespace in other branches
- 6.3 nodewords.module \nodewords_taxonomy()
- 6 nodewords.module \nodewords_taxonomy()
- 6.2 nodewords.module \nodewords_taxonomy()
Implementation of hook_taxonomy().
File
- ./
nodewords.module, line 251 - Assign META tags to nodes, vocabularies, terms and pages.
Code
function nodewords_taxonomy($op, $type, $object = NULL) {
if ($type == 'term') {
$id = $object['tid'];
}
elseif ($type == 'vocabulary') {
$id = $object['vid'];
}
else {
return;
}
switch ($op) {
case 'delete':
if (user_access('edit meta tags')) {
_nodewords_delete($type, $id);
}
break;
case 'insert':
case 'update':
if (isset($object['nodewords']) && user_access('edit meta tags')) {
_nodewords_set($type, $id, $object['nodewords']);
}
break;
}
}