function custom_breadcrumbs_taxonomy_node_get_recent_term in Custom Breadcrumbs 7.2
Same name and namespace in other branches
- 6.2 custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc \custom_breadcrumbs_taxonomy_node_get_recent_term()
Returns the most recently selected term for a given node.
Parameters
object $node: The node object.
Return value
string The previously selected taxonomy term object that also belongs to the node.
1 call to custom_breadcrumbs_taxonomy_node_get_recent_term()
- custom_breadcrumbs_taxonomy_node_get_term in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.inc - Returns the previous selected term or the lightest term for a given node.
File
- custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.inc, line 145 - Helper functions for custom_breadcrumbs_taxonomy.
Code
function custom_breadcrumbs_taxonomy_node_get_recent_term($node) {
$terms = custom_breadcrumbs_taxonomy_node_get_terms($node);
$tid = _custom_breadcrumbs_taxonomy_recent_term();
if (is_array($terms) && !empty($terms) && !is_null($tid)) {
return isset($terms[$tid]) ? taxonomy_term_load($tid) : NULL;
}
}