Skip to content

Instantly share code, notes, and snippets.

@matiskay
Created January 4, 2012 16:59
Show Gist options
  • Save matiskay/1560974 to your computer and use it in GitHub Desktop.
Save matiskay/1560974 to your computer and use it in GitHub Desktop.
Get the vocabulary id using the machine name
<?php
function util_get_vid($machine_name) {
$voc = taxonomy_vocabulary_machine_name_load($machine_name);
return $voc->vid;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment