You are here

function taxonomy_vocabulary_machine_name_load in Drupal 7

Return the vocabulary object matching a vocabulary machine name.

Parameters

$name: The vocabulary's machine name.

Return value

The vocabulary object with all of its metadata, if exists, FALSE otherwise. Results are statically cached.

See also

taxonomy_vocabulary_load()

3 calls to taxonomy_vocabulary_machine_name_load()
taxonomy_allowed_values in modules/taxonomy/taxonomy.module
Returns the set of valid terms for a taxonomy field.
taxonomy_autocomplete_validate in modules/taxonomy/taxonomy.module
Form element validate handler for taxonomy term autocomplete element.
taxonomy_help in modules/taxonomy/taxonomy.module
Implements hook_help().
1 string reference to 'taxonomy_vocabulary_machine_name_load'
taxonomy_form_vocabulary in modules/taxonomy/taxonomy.admin.inc
Form builder for the vocabulary editing form.

File

modules/taxonomy/taxonomy.module, line 1381
Enables the organization of content into categories.

Code

function taxonomy_vocabulary_machine_name_load($name) {
  $vocabularies = taxonomy_vocabulary_load_multiple(NULL, array(
    'machine_name' => $name,
  ));
  return reset($vocabularies);
}