You are here

function nodewords_extra_dc_title_form in Nodewords: D6 Meta Tags 6

Same name and namespace in other branches
  1. 6.2 nodewords_extra/includes/nodewords_extra.nodewords.tags.inc \nodewords_extra_dc_title_form()

Set the form fields used to implement the options for the meta tag.

File

nodewords_extra/nodewords_extra.module, line 515
Define extra meta tags for Drupal pages.

Code

function nodewords_extra_dc_title_form(&$form, $content, $options) {
  $form['dcterms.title'] = array(
    '#tree' => TRUE,
    '#weight' => -198,
  );
  $form['dcterms.title']['value'] = array(
    '#type' => 'textfield',
    '#title' => t('Dublin Core: Title'),
    '#description' => t('Enter an alternative title. Do not use the value already used for the HTML tag TITLE, or you will probably get warning reports about duplicated titles from the search engines.'),
    '#default_value' => empty($content['value']) ? '' : $content['value'],
    '#size' => 60,
    '#maxlength' => variable_get('nodewords_max_size', 350),
  );

  // Show the current default.
  if ($options['type'] != NODEWORDS_TYPE_DEFAULT) {

    // Load the current default.
    if (!empty($options['default']['dcterms.title']['value'])) {
      $default = $options['default']['dcterms.title']['value'];
    }
    else {
      $default = t('Not set.');
    }
    $form['dcterms.title']['value']['#description'] .= '<br />' . t('The default is: %default', array(
      '%default' => $default,
    ));
  }
}