diff options
Diffstat (limited to 'sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc')
-rw-r--r-- | sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc b/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc new file mode 100644 index 000000000..062450c70 --- /dev/null +++ b/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc @@ -0,0 +1,25 @@ +<?php + +/** + * @file + * Definition of views_handler_filter_vocabulary_machine_name. + */ + +/** + * Filter by vocabulary machine name. + * + * @ingroup views_filter_handlers + */ +class views_handler_filter_vocabulary_machine_name extends views_handler_filter_in_operator { + function get_value_options() { + if (isset($this->value_options)) { + return; + } + + $this->value_options = array(); + $vocabularies = taxonomy_get_vocabularies(); + foreach ($vocabularies as $voc) { + $this->value_options[$voc->machine_name] = $voc->name; + } + } +} |