function nodewords_list in Nodewords: D6 Meta Tags 6.2
list the available meta tags.
File
- ./
nodewords.admin.inc, line 471 - Administration forms.
Code
function nodewords_list() {
$tags = nodewords_get_tags();
$form = array(
'tags' => array(
'#tree' => TRUE,
),
);
$types = _nodewords_types();
$widgets = _nodewords_widgets();
$destination = drupal_get_destination();
foreach ($tags as $tagid => $tag) {
$form['tags'][$tagid] = array(
'tagid' => array(
'#type' => 'value',
'#value' => $tagid,
),
'name' => array(
'#value' => check_plain($tag->name),
),
'type' => array(
'#value' => $tag->widget != 'alias' ? check_plain($types[$tag->type]['title']) : t('Ignored'),
),
'widget' => array(
'#value' => check_plain($widgets[$tag->widget]['title']),
),
'description' => array(
'#value' => check_plain($tag->description),
),
'weight' => array(
'#type' => 'weight',
'#default_value' => $tag->weight,
),
'edit' => array(
'#value' => l(t('edit'), 'admin/content/nodewords/' . $tagid),
),
'delete' => array(
'#value' => l(t('delete'), 'admin/content/nodewords/' . $tagid . '/delete', array(
'query' => $destination,
)),
),
);
}
$form['buttons'] = array(
'submit' => array(
'#type' => 'submit',
'#value' => t('Save meta tags'),
'#disabled' => count($tags) == 0,
'#submit' => array(
'nodewords_list_submit_save',
),
'#weight' => 0,
),
'#weight' => 50,
);
return $form;
}