You are here

function event_taxonomy_filter in Event 5

Same name and namespace in other branches
  1. 5.2 event.module \event_taxonomy_filter()
3 calls to event_taxonomy_filter()
event_calendar_data in ./event.module
Returns an array of nodes that occur on a given date. Handles content type and taxonomy filters.
event_filter_node in ./event.module
event_filter_nodes in ./event.module

File

./event.module, line 1253

Code

function event_taxonomy_filter($node, $terms) {
  if ($tids = taxonomy_node_get_terms($node->nid)) {
    foreach ($tids as $tid => $term) {
      if (in_array($tid, $terms)) {
        return TRUE;
      }
    }
  }
  return FALSE;
}