function nat_get_term in Node Auto Term [NAT] 6.2
Same name and namespace in other branches
- 5 nat.module \nat_get_term()
- 6 nat.module \nat_get_term()
- 7.2 nat.module \nat_get_term()
- 7 nat.module \nat_get_term()
Retrieve the first / single NAT term associated with a node optionally restricted by vocabulary.
Parameters
$nid: The node ID of the node whose NAT-term is to be retrieved.
$vocabularies: An optional array of vocabulary IDs used to optionally retrict the retrieved term to a defined set of vocabularies.
1 call to nat_get_term()
File
- ./
nat.module, line 306 - NAT - node auto term - is a helper module that automatically creates a term using the same title as a node.
Code
function nat_get_term($nid, $vocabularies = array()) {
$terms = empty($vocabularies) ? nat_get_terms($nid) : nat_get_terms_by_vocabulary($nid, $vocabularies);
return array_shift($terms);
}