Closed (won't fix)
Project:
Drupal core
Version:
6.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2010 at 03:31 UTC
Updated:
19 Jun 2013 at 11:09 UTC
I have this function in like, 6 of my modules. I've seen it in dozens of contributed modules. Every time a developer wishes to present the user with a checkbox or select list of vocabularies, they have to write this function. I think it would make for a good inclusion in Drupal core.
/**
* Return vocabularies in a format that can be used with FAPI
*
* @return array A keyed array of vocabularies
*/
function taxonomy_get_vocabularies_fapi() {
$vocabs = taxonomy_get_vocabularies();
$options = array();
foreach ($vocabs as $vocab) {
$options[$vocab->vid] = $vocab->name;
}
return $options;
}
Comments
Comment #1
thedavidmeister commentedThis function is not in core in D8+ and we aren't changing the API in D7-
Please don't set an issue to "needs review" unless it has at least one tested patch posted to the thread.