function media_gallery_create_taxonomy_vocab in Media Gallery 7.2
Same name and namespace in other branches
- 7 media_gallery.install \media_gallery_create_taxonomy_vocab()
Helper function to create required taxonomy vocabulary.
1 call to media_gallery_create_taxonomy_vocab()
- media_gallery_install in ./
media_gallery.install - Implements hook_install().
File
- ./
media_gallery.install, line 876 - Install file for media_gallery. Includes field and instance definitions.
Code
function media_gallery_create_taxonomy_vocab() {
$t = get_t();
$vocabulary = (object) array(
'name' => 'Gallery collections',
'description' => $t('Groups of rich media galleries'),
'machine_name' => 'gallery_collections',
);
taxonomy_vocabulary_save($vocabulary);
variable_set('media_gallery_collection_vid', $vocabulary->vid);
return $vocabulary;
}