You are here

node.inc in Nodewords: D6 Meta Tags 6.3

Same filename and directory in other branches
  1. 6 includes/node.inc
  2. 6.2 includes/node.inc

Integration file for node.module.

File

includes/node.inc
View source
<?php

/**
 * @file
 * Integration file for node.module.
 */

/**
 * Implements hook_metatags_type().
 */
function node_metatags_type(&$result, $arg) {
  if ($arg[0] == 'node') {

    // Node paths: node/$nid.
    $bool = isset($arg[1]) && is_numeric($arg[1]) && ($node = menu_get_object());
    if ($bool) {
      $bool = $node->type == 'poll' && isset($arg[2]) && in_array($arg[2], array(
        'edit',
        'results',
      )) || !isset($arg[2]);
      if ($bool) {
        $result['type'] = NODEWORDS_TYPE_NODE;
        $result['id'] = $node->nid;
        $result['sid'] = $node->vid;
      }
    }
  }
}

Functions

Namesort descending Description
node_metatags_type Implements hook_metatags_type().