<?php
// $Id: basic_metatags.module,v 1.1.2.12 2009/09/22 16:19:34 kiam Exp $

/**
 * @file
 * Allows users to add basic meta tags to node, user profile, and taxonomy term pages.
 */

/**
 * @addtogroup basic_metatags
 * @{
 */

/**
 * Include the file for the meta tag definitions.
 */
module_load_include('inc', 'basic_metatags', 'basic_metatags.metatags');

/**
 * Implementation of hook_nodewords_api().
 */
function basic_metatags_nodewords_api() {
  return array(
    'version' => 1.1,
  );
}

/**
 * Implementation of hook_nodewords_tags_info().
 */
function basic_metatags_nodewords_tags_info() {
  $tags = array(
    'abstract' => array(
      'tag:db:type' => 'string',
      'tag:function:prefix' => 'basic_metatags_abstract',
      'tag:template' => array('abstract' => NODEWORDS_META),
      'widget:label' => t('Abstract'),
      'widget:permission' => 'edit abstract meta tag',
    ),
    'canonical' => array(
      'tag:context:denied' => array('default', 'errorpage', 'offline', 'tracker'),
      'tag:db:type' => 'string',
      'tag:function:prefix' => 'basic_metatags_canonical',
      'tag:template' => array('canonical' => NODEWORDS_LINK_REL),
      'widget:label' => t('Canonical URL'),
      'widget:permission' => 'edit canonical URL meta tag',
    ),
    'copyright' => array(
      'tag:db:type' => 'string',
      'tag:function:prefix' => 'basic_metatags_copyright',
      'tag:template' => array('copyright' => NODEWORDS_META),
      'widget:label' => t('Copyright'),
      'widget:permission' => 'edit copyright meta tag',
    ),
    'description' => array(
      'tag:db:type' => 'string',
      'tag:function:prefix' => 'basic_metatags_description',
      'tag:template' => array('description' => NODEWORDS_META),
      'tag:template:index' => '<h3>%content</h3>',
      'widget:label' => t('Description'),
      'widget:permission' => 'edit description meta tag',
    ),
    'keywords' => array(
      'tag:db:type' => 'string',
      'tag:function:prefix' => 'basic_metatags_keywords',
      'tag:template' => array('keywords' => NODEWORDS_META),
      'tag:template:index' => '<h2>%content</h2>',
      'widget:label' => t('Keywords'),
      'widget:permission' => 'edit keywords meta tag',
    ),
    'revisit-after' => array(
      'tag:db:type' => 'string',
      'tag:function:prefix' => 'basic_metatags_revisit_after',
      'tag:template' => array('revisit-after' => NODEWORDS_META),
      'widget:label' => t('Revisit after'),
      'widget:permission' => 'edit revisit meta tag',
    ),
    'robots' => array(
      'tag:db:type' => 'array',
      'tag:function:prefix' => 'basic_metatags_robots',
      'tag:template' => array('robots' => NODEWORDS_META),
      'widget:label' => t('Robots'),
      'widget:permission' => 'edit robots meta tag',
    ),
  );

  return $tags;
}

/**
 * @} End of "addtogroup nodewords".
 */
