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

magico’s picture

Version: 4.6.6 » x.y.z
LAs4n’s picture

Version: x.y.z » 7.x-dev

Moving to cvs.

isaac77’s picture

While 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);

deviantintegral’s picture

Version: 7.x-dev » 8.x-dev
xjm’s picture

Status: Active » Closed (won't fix)

This is no longer applicable with the D7 taxonomy API. Please open a new issue if you have an API feature request for D8.