function notifications_node_nid2autocomplete in Notifications 7
Same name and namespace in other branches
- 6.4 includes/node.inc \notifications_node_nid2autocomplete()
- 6 notifications.node.inc \notifications_node_nid2autocomplete()
- 6.2 notifications.node.inc \notifications_node_nid2autocomplete()
- 6.3 notifications.node.inc \notifications_node_nid2autocomplete()
Generates 'title [nid:$nid]' for the autocomplete field
File
- includes/
node.inc, line 58 - Notifications node API for use by plug-in modules providing node related features
Code
function notifications_node_nid2autocomplete($nid, $subscription = NULL) {
if ($node = node_load($nid)) {
return check_plain($node->title) . ' [nid:' . $nid . ']';
}
else {
return t('Not found');
}
}