function nodewords_extra_dc_contributor_form 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_contributor_form()
Set the form fields used to implement the options for the meta tag.
File
- nodewords_extra/
nodewords_extra.module, line 232 - Define extra meta tags for Drupal pages.
Code
function nodewords_extra_dc_contributor_form(&$form, $content, $options) {
$form['dcterms.contributor'] = array(
'#tree' => TRUE,
'#weight' => -178,
);
$form['dcterms.contributor']['value'] = array(
'#type' => 'textarea',
'#title' => t('Dublin Core: Contributor'),
'#description' => t('Enter the name(s) of an entity responsible for making contributions to the resource. Examples of a contributor include a person, an organization, or a service. Multiple names may be added, one per line, up to a maximum of %count characters.', array(
'%count' => variable_get('nodewords_max_size', 350),
)),
'#default_value' => empty($content['value']) ? '' : $content['value'],
'#cols' => 60,
'#rows' => 2,
'#wysiwyg' => FALSE,
);
// Show the current default.
if ($options['type'] != NODEWORDS_TYPE_DEFAULT) {
// Load the current default.
if (!empty($options['default']['dcterms.contributor']['value'])) {
$default = $options['default']['dcterms.contributor']['value'];
}
else {
$default = t('Not set.');
}
$form['dcterms.contributor']['value']['#description'] .= '<br />' . t('The default is: %default', array(
'%default' => $default,
));
}
}