Greetings,
The following simple improvement may give developers big abilities:
taxonomy_form_all() function has the following line:
$vocabularies = taxonomy_get_vocabularies();
taxonomy_get_vocabularies() returns all vocabularies.
That will be very good if we can have one more parameter $type in taxonomy_form_all() function to control whether I want to get terms from all vocabularies or only from those which associated with specified type ($node_type).
The patch is simple:
1. Add $type = null in taxonomy_get_vocabularies() as the last parameter.
2. Change taxonomy_get_vocabularies() call to:
$vocabularies = taxonomy_get_vocabularies($types);
currently, it is possible to simply create another function but I thought about extending taxonomy API.
Thanks.
Comments
Comment #1
magico commentedComment #2
LAs4n commentedMoving to cvs.
Comment #3
isaac77 commentedWhile creating a module settings page, I ran into a situation where precisely this feature would be very useful. +1
Thanks ARDAS for opening this issue. One note: I believe that taxonomy_get_vocabularies only accepts a single content type as a parameter. So the change shoud be
$vocabularies = taxonomy_get_vocabularies($type);rather than
$vocabularies = taxonomy_get_vocabularies($types);Comment #4
deviantintegral commentedComment #5
xjmThis is no longer applicable with the D7 taxonomy API. Please open a new issue if you have an API feature request for D8.