summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/taxonomy/taxonomy.module18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 8e70c5a84..cad3049f8 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -573,6 +573,24 @@ function taxonomy_terms_static_reset() {
}
/**
+ * Generate a set of options for selecting a term from all vocabularies.
+ */
+function taxonomy_form_all() {
+ $vocabularies = taxonomy_get_vocabularies();
+ $options = array();
+ foreach ($vocabularies as $vid => $vocabulary) {
+ $tree = taxonomy_get_tree($vid);
+ if ($tree && (count($tree) > 0)) {
+ $options[$vocabulary->name] = array();
+ foreach ($tree as $term) {
+ $options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
+ }
+ }
+ }
+ return $options;
+}
+
+/**
* Return an array of all vocabulary objects.
*
* @param $type