function enterprise_base_init in Enterprise Base 7
Implements hook_init()
Probably not the best way of doing this but it was the only way that runs after features have been installed.
File
- ./
enterprise_base.install, line 47 - Installation code for Advanced Forum.
Code
function enterprise_base_init() {
if (!variable_get('enterprise_base_installed', FALSE) && taxonomy_vocabulary_machine_name_load('categories')) {
// Add in Uncategorized taxonomy term.
$vocab = taxonomy_vocabulary_machine_name_load('categories');
$term = new stdClass();
$term->vid = $vocab->vid;
$term->name = 'Uncategorized';
$term->vocabulary_machine_name = 'categories';
taxonomy_term_save($term);
variable_set('enterprise_base_installed', TRUE);
}
}