function _biblio_install_add_biblio_roles in Bibliography Module 7.3
Add biblio roles vocabulary and terms.
2 calls to _biblio_install_add_biblio_roles()
- biblio_install in ./
biblio.install - Implements hook_install().
- biblio_update_7300 in ./
biblio.install - Upgrade Biblio schema to 3.x.
File
- ./
biblio.install, line 24 - Install file for the biblio module.
Code
function _biblio_install_add_biblio_roles() {
if (!($vocabulary = taxonomy_vocabulary_machine_name_load('biblio_roles'))) {
$vocabulary = new stdClass();
$vocabulary->name = 'Biblio roles';
$vocabulary->machine_name = 'biblio_roles';
taxonomy_vocabulary_save($vocabulary);
}
$term = new stdClass();
$term->name = "Author";
$term->vid = $vocabulary->vid;
taxonomy_term_save($term);
$term = new stdClass();
$term->name = "Editor";
$term->vid = $vocabulary->vid;
taxonomy_term_save($term);
}