function nodewords_block in Nodewords: D6 Meta Tags 5
Implementation of hook_block().
File
- ./
nodewords.module, line 11 - Assign META tags to nodes, vocabularies, terms and pages.
Code
function nodewords_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks = array();
$blocks[0] = array(
'info' => t('Meta tags'),
);
return $blocks;
case 'view':
$block = array();
switch ($delta) {
case 0:
$tags = nodewords_get();
if (isset($tags['keywords'])) {
$tags['keywords'] = str_replace(',', ', ', $tags['keywords']);
}
$block['subject'] = t('Meta tags');
$block['content'] = theme('nodewords_content', $tags);
break;
}
return $block;
}
}