function fe_taxonomy_vocabulary_load in Features Extra 6
Return the vocabulary object matching a vocabulary machine name.
File
- ./
fe_taxonomy.module, line 273
Code
function fe_taxonomy_vocabulary_load($machine_name) {
$table = 'fe_taxonomy_vocabulary';
$vid = db_result(db_query("SELECT vid FROM {{$table}} WHERE machine_name = '%s'", $machine_name));
if (!empty($vid)) {
$vocab = taxonomy_vocabulary_load($vid);
$vocab->machine_name = $machine_name;
}
else {
$vocab = FALSE;
}
return $vocab;
}