<?php
// $Id: nodewords_extra.module,v 1.1.2.63 2010/04/18 14:16:48 kiam Exp $

/**
 * @file
 * Define extra meta tags for Drupal pages.
 */

/**
 * Implements hook_form_FORM_ID_alter().
 */
function nodewords_extra_form_nodewords_settings_form_alter(&$form, &$form_state) {
  $form['metatags_creation']['nodewords_add_dc_schema'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add the Dublin Core schema meta tag'),
    '#default_value' => variable_get('nodewords_add_dc_schema', FALSE),
  );
}

/**
 * Implements hook_menu().
 */
function nodewords_extra_menu() {
  $items = array();

  $items['labels.rdf'] = array(
    'title' => 'ICRA labels',
    'page callback' => 'nodewords_extra_verification_content',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

  return $items;
}

/**
 * Implements hook_nodewords_api().
 */
function nodewords_extra_nodewords_api() {
  return array(
    'api' => '1.12',
    'path' => '',
  );
}

function nodewords_extra_verification_content() {
  drupal_set_header('Content-Type: application/rdf+xml; charset=utf-8');

  print variable_get('nodewords_icra_validation_content', '');
}
