You are here

function hook_nodewords_tags_info in Nodewords: D6 Meta Tags 6

Same name and namespace in other branches
  1. 6.2 nodewords.api.php \hook_nodewords_tags_info()

This hook declares the meta tags implemented by the module.

Return value

A nested array containing the following values:

  • attributes - the tag attributes used when outputting the tag.
  • callback - the string used to built the name of the functions called for any meta tags operations.
  • context - the contexts in which the meta tags are allowed (and denied).
  • label - the label used as title in the fieldset for the form field shown in the form to edit the meta tags values.
  • multiple - if set to TRUE, splits the tag value on each line break and outputs each item as a fully separate copy of the tag; best used when the form uses a textarea instead of a textfield.
  • permission - the permission associated with the form fields used to edit the meta tags values; this permission is used only when the meta tag edit form fields are shown in a form that is accessible not only from the administrators users (in example, in the node edit form, or in the user profile form).
  • templates - the templates used when the meta tag is output.
  • weight - the weight used to order the meta tags before to output them; the lighter meta tag will be output first. See API.txt for a list of the weights of all included meta tags.
3 functions implement hook_nodewords_tags_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

nodewords_basic_nodewords_tags_info in nodewords_basic/nodewords_basic.module
Implements hook_nodewords_tags_info().
nodewords_extra_nodewords_tags_info in nodewords_extra/nodewords_extra.module
Implements hook_nodewords_tags_info().
nodewords_og_nodewords_tags_info in nodewords_og/nodewords_og.module
Implementation of hook_nodewords_tags_info()
2 invocations of hook_nodewords_tags_info()
nodewords_get_possible_tags in ./nodewords.module
Query all the modules implementing meta tags and return the list of meta tags.
nodewords_requirements in ./nodewords.install
Implements hook_requirements().

File

./nodewords.api.php, line 50
. Nodewords hooks.

Code

function hook_nodewords_tags_info() {
  $tags = array(
    'dcterms.title' => array(
      'callback' => 'nodewords_extra_dc_title',
      'context' => array(
        'denied' => array(
          NODEWORDS_TYPE_DEFAULT,
        ),
      ),
      'label' => t('Dublin Core title'),
      'permission' => 'edit meta tag Dublin Core TITLE',
      'templates' => array(
        'head' => array(
          'dcterms.title' => NODEWORDS_META,
        ),
      ),
    ),
    'location' => array(
      'callback' => 'nodewords_extra_location',
      'label' => t('Location'),
      'permission' => 'edit location meta tag',
      'templates' => array(
        'geo.position' => NODEWORDS_META,
        'icbm' => NODEWORDS_META,
      ),
    ),
  );
  return $tags;
}