You are here

agls.module in AGLS Metadata 7

Allows users and system to add AGLS meta tags to Drupal pages.

File

agls.module
View source
<?php

/**
 * @file
 * Allows users and system to add AGLS meta tags to Drupal pages.
 */

/**
 * Implements hook_ctools_plugin_api().
 */
function agls_ctools_plugin_api($owner, $api) {
  if ($owner == 'metatag' && $api == 'metatag') {
    return array(
      'version' => 1,
    );
  }
}

/**
 * Implements hook_preprocess_html().
 */
function agls_preprocess_html(&$variables) {
  $element = array(
    '#tag' => 'link',
    '#attributes' => array(
      'rel' => 'schema.AGLSTERMS',
      'href' => 'http://www.agls.gov.au/agls/terms/',
    ),
  );
  drupal_add_html_head($element, 'agls_schema');
  $variables['rdf_namespaces'] .= "\n  xmlns:AGLSTERMS=\"http://www.agls.gov.au/agls/terms/\"";
}

Functions

Namesort descending Description
agls_ctools_plugin_api Implements hook_ctools_plugin_api().
agls_preprocess_html Implements hook_preprocess_html().