You are here

function context_condition_node_taxonomy::condition_values in Context 6.3

Same name and namespace in other branches
  1. 6 plugins/context_condition_node_taxonomy.inc \context_condition_node_taxonomy::condition_values()
  2. 7.3 plugins/context_condition_node_taxonomy.inc \context_condition_node_taxonomy::condition_values()

Condition values.

Overrides context_condition_node::condition_values

File

plugins/context_condition_node_taxonomy.inc, line 7

Class

context_condition_node_taxonomy
Expose node taxonomy terms as a context condition.

Code

function condition_values() {
  $values = array();
  if (module_exists('taxonomy')) {
    foreach (taxonomy_get_vocabularies() as $vocab) {
      if (empty($vocab->tags)) {
        foreach (taxonomy_get_tree($vocab->vid) as $term) {
          $values[$term->tid] = check_plain($term->name);
        }
      }
    }
  }
  return $values;
}