You are here

function drupal_commons_config_taxonomy in Drupal Commons 6.2

Same name and namespace in other branches
  1. 6 drupal_commons.profile \drupal_commons_config_taxonomy()

Configure taxonomy

Add and configure vocabularies

1 string reference to 'drupal_commons_config_taxonomy'
drupal_commons_profile_tasks in ./drupal_commons.profile
Perform any final installation tasks for this profile.

File

./drupal_commons.profile, line 194

Code

function drupal_commons_config_taxonomy() {

  // Add free-tagging vocabulary for content
  $vocab = array(
    'name' => st('Tags'),
    'description' => st('Free-tagging vocabulary for all content items'),
    'multiple' => '0',
    'required' => '0',
    'hierarchy' => '0',
    'relations' => '1',
    'tags' => '1',
    'module' => 'taxonomy',
  );
  taxonomy_save_vocabulary($vocab);

  // Store the vocabulary id
  variable_set('commons_tags_vid', $vocab['vid']);
}