summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-10 05:58:13 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-10 05:58:13 +0000
commitf6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2 (patch)
treeff1b9dcdb4d8c64fea7470194b5c36d0253f4260 /modules/taxonomy/taxonomy.module
parente916edc798f891fdb08e2fae9684afc02e3de9d3 (diff)
downloadbrdo-f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2.tar.gz
brdo-f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2.tar.bz2
#488542 by yched: Allow field UI to be attached to any fieldable entity.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module24
1 files changed, 20 insertions, 4 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index a8996514d..4c9b0988f 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -24,12 +24,28 @@ function taxonomy_permission() {
function taxonomy_fieldable_info() {
$return = array(
'taxonomy_term' => array(
- 'name' => t('Taxonomy term'),
- 'id key' => 'tid',
- 'bundle key' => 'vocabulary_machine_name',
- 'bundles' => taxonomy_vocabulary_get_names(),
+ 'label' => t('Taxonomy term'),
+ 'object keys' => array(
+ 'id' => 'tid',
+ 'bundle' => 'vocabulary_machine_name',
+ ),
+ 'bundle keys' => array(
+ 'bundle' => 'machine_name',
+ ),
+ 'bundles' => array(),
),
);
+ foreach (taxonomy_get_vocabularies() as $vocabulary) {
+ $return['taxonomy_term']['bundles'][$vocabulary->machine_name] = array(
+ 'label' => $vocabulary->name,
+ 'admin' => array(
+ 'path' => 'admin/content/taxonomy/%taxonomy_vocabulary',
+ 'real path' => 'admin/content/taxonomy/' . $vocabulary->vid,
+ 'bundle argument' => 3,
+ 'access arguments' => array('administer taxonomy'),
+ ),
+ );
+ }
return $return;
}