hook_nodewords_type_id
- Versions
- 6
hook_nodewords_type_id(&$result, $arg)
The hook is used from the module to determinate the type of the object associated with the currently viewed page (node, user, taxonomy term), and the ID of the object.
Parameters
&$result the array used to write the result.
$arg the array as obtained from arg().
Code
contrib/nodewords/nodewords.api.php, line 150
<?php
function hook_nodewords_type_id(&$result, $arg) {
if ($arg[0] == 'user') {
// User page paths: user/$uid.
if (isset($arg[1]) && is_numeric($arg[1])) {
$result['type'] = NODEWORDS_TYPE_USER;
$result['id'] = $arg[1];
}
}
}
?>


