function nodeorder_term_can_be_ordered in Node Order 7
Same name and namespace in other branches
- 6 nodeorder.module \nodeorder_term_can_be_ordered()
Returns TRUE if the term is in an orderable vocabulary.
1 call to nodeorder_term_can_be_ordered()
- nodeorder_order_access in ./
nodeorder.module - Custom access function which determines whether or not the user is allowed to reorder nodes and if the link should be shown at all.
File
- ./
nodeorder.module, line 704 - Nodeorder module.
Code
function nodeorder_term_can_be_ordered($tid) {
$cid = 'nodeorder:term_can_be_ordered:' . $tid;
if (($cache = cache_get($cid)) && !empty($cache->data)) {
return $cache->data;
}
else {
$term = taxonomy_term_load($tid);
$term_can_be_ordered = nodeorder_vocabulary_can_be_ordered($term->vid);
// @todo: Why is this cached? Ordering is on a vocabulary level.
// Permanently cache the value for easy reuse.
cache_set($cid, $term_can_be_ordered, 'cache');
return $term_can_be_ordered;
}
}