You are here

function nodewords_extra_geo_placename_form in Nodewords: D6 Meta Tags 6

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

File

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

Code

function nodewords_extra_geo_placename_form(&$form, $content, $options) {
  $form['geo.placename'] = array(
    '#tree' => TRUE,
    '#weight' => -151,
  );
  $form['geo.placename']['value'] = array(
    '#type' => 'textfield',
    '#title' => t('Geotagging: Placename'),
    '#description' => t('Usually used to store the address of the location this content is based in or related to.'),
    '#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']['geo.placename']['value'])) {
      $default = $options['default']['geo.placename']['value'];
    }
    else {
      $default = t('Not set.');
    }
    $form['geo.placename']['value']['#description'] .= '<br />' . t('The default is: %default', array(
      '%default' => $default,
    ));
  }
}