function freelinking_internal_tooltip in Freelinking 6.3
Build a tooltip for internal content.
Attempts to use description metatag, truncated to 200 characters.
Parameters
$type: Type of the Drupal object- such as node, comment, block.
$id: ID of the Drupal object. Useful for querying.
2 calls to freelinking_internal_tooltip()
- freelinking_nid_callback in plugins/
freelinking_nid.inc - freelinking_nodetitle_callback in plugins/
freelinking_nodetitle.inc - Replacement callback for nodetitle plugin
File
- ./
freelinking.utilities.inc, line 136 - Freelinking 3 Utilities
Code
function freelinking_internal_tooltip($type, $id) {
$description = '';
switch ($type) {
case 'node':
if (module_exists('nodewords')) {
if (function_exists('nodewords_get_tags')) {
$metatags = nodewords_get_tags('node', $id);
$description = $metatags['description'];
}
}
break;
}
$description = check_url($description);
return truncate_utf8($description, 200, FALSE, TRUE);
}