You are here

function nodewords_extra_dc_publisher_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_publisher_form()

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

File

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

Code

function nodewords_extra_dc_publisher_form(&$form, $content, $options) {
  $form['dcterms.publisher'] = array(
    '#tree' => TRUE,
  );
  $form['dcterms.publisher']['value'] = array(
    '#type' => 'textfield',
    '#title' => t('Dublin Core: Publisher'),
    '#description' => t('Enter a name of an entity responsible for making the resource available. Examples of a publisher include a person, an organization, or a service.'),
    '#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.publisher']['value'])) {
      $default = $options['default']['dcterms.publisher']['value'];
    }
    else {
      $default = t('Not set.');
    }
    $form['dcterms.publisher']['value']['#description'] .= '<br />' . t('The default is: %default', array(
      '%default' => $default,
    ));
  }
}