You are here

function hashtags_enable in Hashtags 6.2

Same name and namespace in other branches
  1. 6 hashtags.install \hashtags_enable()
  2. 7.2 hashtags.install \hashtags_enable()
  3. 7 hashtags.install \hashtags_enable()

hook_enable().

File

./hashtags.install, line 6

Code

function hashtags_enable() {
  if (!variable_get('hashtags_vocabulary', 0)) {

    // Create hashtags taxonomy
    $vocabulary = array(
      'name' => t('Hashtags'),
      'multiple' => 1,
      'tags' => 1,
      'required' => 0,
      'hierarchy' => 1,
      'relations' => 0,
      'module' => 'hashtags',
      'weight' => -10,
    );
    taxonomy_save_vocabulary($vocabulary);
    variable_set('hashtags_vocabulary', $vocabulary['vid']);
  }
}